components

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

This section is empty.

Types ¶

type ActiveSubscriptions ¶ added in v0.4.17

type ActiveSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type ActiveSubscriptionsType
}

func CreateActiveSubscriptionsInteger ¶ added in v0.4.17

func CreateActiveSubscriptionsInteger(integer int64) ActiveSubscriptions

func CreateActiveSubscriptionsNumber ¶ added in v0.4.17

func CreateActiveSubscriptionsNumber(number float64) ActiveSubscriptions

func (ActiveSubscriptions) MarshalJSON ¶ added in v0.4.17

func (u ActiveSubscriptions) MarshalJSON() ([]byte, error)

func (*ActiveSubscriptions) UnmarshalJSON ¶ added in v0.4.17

func (u *ActiveSubscriptions) UnmarshalJSON(data []byte) error

type ActiveSubscriptionsType ¶ added in v0.4.17

type ActiveSubscriptionsType string
const (
	ActiveSubscriptionsTypeInteger ActiveSubscriptionsType = "integer"
	ActiveSubscriptionsTypeNumber  ActiveSubscriptionsType = "number"
)

type ActiveUserByEvent ¶ added in v0.12.0

type ActiveUserByEvent struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type ActiveUserByEventType
}

func CreateActiveUserByEventInteger ¶ added in v0.12.0

func CreateActiveUserByEventInteger(integer int64) ActiveUserByEvent

func CreateActiveUserByEventNumber ¶ added in v0.12.0

func CreateActiveUserByEventNumber(number float64) ActiveUserByEvent

func (ActiveUserByEvent) MarshalJSON ¶ added in v0.12.0

func (u ActiveUserByEvent) MarshalJSON() ([]byte, error)

func (*ActiveUserByEvent) UnmarshalJSON ¶ added in v0.12.0

func (u *ActiveUserByEvent) UnmarshalJSON(data []byte) error

type ActiveUserByEventType ¶ added in v0.12.0

type ActiveUserByEventType string
const (
	ActiveUserByEventTypeInteger ActiveUserByEventType = "integer"
	ActiveUserByEventTypeNumber  ActiveUserByEventType = "number"
)

type Address ¶

type Address struct {
	Line1      *string              `json:"line1,omitempty"`
	Line2      *string              `json:"line2,omitempty"`
	PostalCode *string              `json:"postal_code,omitempty"`
	City       *string              `json:"city,omitempty"`
	State      *string              `json:"state,omitempty"`
	Country    AddressCountryAlpha2 `json:"country"`
}

func (*Address) GetCity ¶

func (a *Address) GetCity() *string

func (*Address) GetCountry ¶

func (a *Address) GetCountry() AddressCountryAlpha2

func (*Address) GetLine1 ¶

func (a *Address) GetLine1() *string

func (*Address) GetLine2 ¶

func (a *Address) GetLine2() *string

func (*Address) GetPostalCode ¶

func (a *Address) GetPostalCode() *string

func (*Address) GetState ¶

func (a *Address) GetState() *string

func (Address) MarshalJSON ¶ added in v0.8.4

func (a Address) MarshalJSON() ([]byte, error)

func (*Address) UnmarshalJSON ¶ added in v0.8.4

func (a *Address) UnmarshalJSON(data []byte) error

type AddressCountryAlpha2 ¶ added in v0.15.1

type AddressCountryAlpha2 string
const (
	AddressCountryAlpha2Ad AddressCountryAlpha2 = "AD"
	AddressCountryAlpha2Ae AddressCountryAlpha2 = "AE"
	AddressCountryAlpha2Af AddressCountryAlpha2 = "AF"
	AddressCountryAlpha2Ag AddressCountryAlpha2 = "AG"
	AddressCountryAlpha2Ai AddressCountryAlpha2 = "AI"
	AddressCountryAlpha2Al AddressCountryAlpha2 = "AL"
	AddressCountryAlpha2Am AddressCountryAlpha2 = "AM"
	AddressCountryAlpha2Ao AddressCountryAlpha2 = "AO"
	AddressCountryAlpha2Aq AddressCountryAlpha2 = "AQ"
	AddressCountryAlpha2Ar AddressCountryAlpha2 = "AR"
	AddressCountryAlpha2As AddressCountryAlpha2 = "AS"
	AddressCountryAlpha2At AddressCountryAlpha2 = "AT"
	AddressCountryAlpha2Au AddressCountryAlpha2 = "AU"
	AddressCountryAlpha2Aw AddressCountryAlpha2 = "AW"
	AddressCountryAlpha2Ax AddressCountryAlpha2 = "AX"
	AddressCountryAlpha2Az AddressCountryAlpha2 = "AZ"
	AddressCountryAlpha2Ba AddressCountryAlpha2 = "BA"
	AddressCountryAlpha2Bb AddressCountryAlpha2 = "BB"
	AddressCountryAlpha2Bd AddressCountryAlpha2 = "BD"
	AddressCountryAlpha2Be AddressCountryAlpha2 = "BE"
	AddressCountryAlpha2Bf AddressCountryAlpha2 = "BF"
	AddressCountryAlpha2Bg AddressCountryAlpha2 = "BG"
	AddressCountryAlpha2Bh AddressCountryAlpha2 = "BH"
	AddressCountryAlpha2Bi AddressCountryAlpha2 = "BI"
	AddressCountryAlpha2Bj AddressCountryAlpha2 = "BJ"
	AddressCountryAlpha2Bl AddressCountryAlpha2 = "BL"
	AddressCountryAlpha2Bm AddressCountryAlpha2 = "BM"
	AddressCountryAlpha2Bn AddressCountryAlpha2 = "BN"
	AddressCountryAlpha2Bo AddressCountryAlpha2 = "BO"
	AddressCountryAlpha2Bq AddressCountryAlpha2 = "BQ"
	AddressCountryAlpha2Br AddressCountryAlpha2 = "BR"
	AddressCountryAlpha2Bs AddressCountryAlpha2 = "BS"
	AddressCountryAlpha2Bt AddressCountryAlpha2 = "BT"
	AddressCountryAlpha2Bv AddressCountryAlpha2 = "BV"
	AddressCountryAlpha2Bw AddressCountryAlpha2 = "BW"
	AddressCountryAlpha2By AddressCountryAlpha2 = "BY"
	AddressCountryAlpha2Bz AddressCountryAlpha2 = "BZ"
	AddressCountryAlpha2Ca AddressCountryAlpha2 = "CA"
	AddressCountryAlpha2Cc AddressCountryAlpha2 = "CC"
	AddressCountryAlpha2Cd AddressCountryAlpha2 = "CD"
	AddressCountryAlpha2Cf AddressCountryAlpha2 = "CF"
	AddressCountryAlpha2Cg AddressCountryAlpha2 = "CG"
	AddressCountryAlpha2Ch AddressCountryAlpha2 = "CH"
	AddressCountryAlpha2Ci AddressCountryAlpha2 = "CI"
	AddressCountryAlpha2Ck AddressCountryAlpha2 = "CK"
	AddressCountryAlpha2Cl AddressCountryAlpha2 = "CL"
	AddressCountryAlpha2Cm AddressCountryAlpha2 = "CM"
	AddressCountryAlpha2Cn AddressCountryAlpha2 = "CN"
	AddressCountryAlpha2Co AddressCountryAlpha2 = "CO"
	AddressCountryAlpha2Cr AddressCountryAlpha2 = "CR"
	AddressCountryAlpha2Cu AddressCountryAlpha2 = "CU"
	AddressCountryAlpha2Cv AddressCountryAlpha2 = "CV"
	AddressCountryAlpha2Cw AddressCountryAlpha2 = "CW"
	AddressCountryAlpha2Cx AddressCountryAlpha2 = "CX"
	AddressCountryAlpha2Cy AddressCountryAlpha2 = "CY"
	AddressCountryAlpha2Cz AddressCountryAlpha2 = "CZ"
	AddressCountryAlpha2De AddressCountryAlpha2 = "DE"
	AddressCountryAlpha2Dj AddressCountryAlpha2 = "DJ"
	AddressCountryAlpha2Dk AddressCountryAlpha2 = "DK"
	AddressCountryAlpha2Dm AddressCountryAlpha2 = "DM"
	AddressCountryAlpha2Do AddressCountryAlpha2 = "DO"
	AddressCountryAlpha2Dz AddressCountryAlpha2 = "DZ"
	AddressCountryAlpha2Ec AddressCountryAlpha2 = "EC"
	AddressCountryAlpha2Ee AddressCountryAlpha2 = "EE"
	AddressCountryAlpha2Eg AddressCountryAlpha2 = "EG"
	AddressCountryAlpha2Eh AddressCountryAlpha2 = "EH"
	AddressCountryAlpha2Er AddressCountryAlpha2 = "ER"
	AddressCountryAlpha2Es AddressCountryAlpha2 = "ES"
	AddressCountryAlpha2Et AddressCountryAlpha2 = "ET"
	AddressCountryAlpha2Fi AddressCountryAlpha2 = "FI"
	AddressCountryAlpha2Fj AddressCountryAlpha2 = "FJ"
	AddressCountryAlpha2Fk AddressCountryAlpha2 = "FK"
	AddressCountryAlpha2Fm AddressCountryAlpha2 = "FM"
	AddressCountryAlpha2Fo AddressCountryAlpha2 = "FO"
	AddressCountryAlpha2Fr AddressCountryAlpha2 = "FR"
	AddressCountryAlpha2Ga AddressCountryAlpha2 = "GA"
	AddressCountryAlpha2Gb AddressCountryAlpha2 = "GB"
	AddressCountryAlpha2Gd AddressCountryAlpha2 = "GD"
	AddressCountryAlpha2Ge AddressCountryAlpha2 = "GE"
	AddressCountryAlpha2Gf AddressCountryAlpha2 = "GF"
	AddressCountryAlpha2Gg AddressCountryAlpha2 = "GG"
	AddressCountryAlpha2Gh AddressCountryAlpha2 = "GH"
	AddressCountryAlpha2Gi AddressCountryAlpha2 = "GI"
	AddressCountryAlpha2Gl AddressCountryAlpha2 = "GL"
	AddressCountryAlpha2Gm AddressCountryAlpha2 = "GM"
	AddressCountryAlpha2Gn AddressCountryAlpha2 = "GN"
	AddressCountryAlpha2Gp AddressCountryAlpha2 = "GP"
	AddressCountryAlpha2Gq AddressCountryAlpha2 = "GQ"
	AddressCountryAlpha2Gr AddressCountryAlpha2 = "GR"
	AddressCountryAlpha2Gs AddressCountryAlpha2 = "GS"
	AddressCountryAlpha2Gt AddressCountryAlpha2 = "GT"
	AddressCountryAlpha2Gu AddressCountryAlpha2 = "GU"
	AddressCountryAlpha2Gw AddressCountryAlpha2 = "GW"
	AddressCountryAlpha2Gy AddressCountryAlpha2 = "GY"
	AddressCountryAlpha2Hk AddressCountryAlpha2 = "HK"
	AddressCountryAlpha2Hm AddressCountryAlpha2 = "HM"
	AddressCountryAlpha2Hn AddressCountryAlpha2 = "HN"
	AddressCountryAlpha2Hr AddressCountryAlpha2 = "HR"
	AddressCountryAlpha2Ht AddressCountryAlpha2 = "HT"
	AddressCountryAlpha2Hu AddressCountryAlpha2 = "HU"
	AddressCountryAlpha2Id AddressCountryAlpha2 = "ID"
	AddressCountryAlpha2Ie AddressCountryAlpha2 = "IE"
	AddressCountryAlpha2Il AddressCountryAlpha2 = "IL"
	AddressCountryAlpha2Im AddressCountryAlpha2 = "IM"
	AddressCountryAlpha2In AddressCountryAlpha2 = "IN"
	AddressCountryAlpha2Io AddressCountryAlpha2 = "IO"
	AddressCountryAlpha2Iq AddressCountryAlpha2 = "IQ"
	AddressCountryAlpha2Ir AddressCountryAlpha2 = "IR"
	AddressCountryAlpha2Is AddressCountryAlpha2 = "IS"
	AddressCountryAlpha2It AddressCountryAlpha2 = "IT"
	AddressCountryAlpha2Je AddressCountryAlpha2 = "JE"
	AddressCountryAlpha2Jm AddressCountryAlpha2 = "JM"
	AddressCountryAlpha2Jo AddressCountryAlpha2 = "JO"
	AddressCountryAlpha2Jp AddressCountryAlpha2 = "JP"
	AddressCountryAlpha2Ke AddressCountryAlpha2 = "KE"
	AddressCountryAlpha2Kg AddressCountryAlpha2 = "KG"
	AddressCountryAlpha2Kh AddressCountryAlpha2 = "KH"
	AddressCountryAlpha2Ki AddressCountryAlpha2 = "KI"
	AddressCountryAlpha2Km AddressCountryAlpha2 = "KM"
	AddressCountryAlpha2Kn AddressCountryAlpha2 = "KN"
	AddressCountryAlpha2Kp AddressCountryAlpha2 = "KP"
	AddressCountryAlpha2Kr AddressCountryAlpha2 = "KR"
	AddressCountryAlpha2Kw AddressCountryAlpha2 = "KW"
	AddressCountryAlpha2Ky AddressCountryAlpha2 = "KY"
	AddressCountryAlpha2Kz AddressCountryAlpha2 = "KZ"
	AddressCountryAlpha2La AddressCountryAlpha2 = "LA"
	AddressCountryAlpha2Lb AddressCountryAlpha2 = "LB"
	AddressCountryAlpha2Lc AddressCountryAlpha2 = "LC"
	AddressCountryAlpha2Li AddressCountryAlpha2 = "LI"
	AddressCountryAlpha2Lk AddressCountryAlpha2 = "LK"
	AddressCountryAlpha2Lr AddressCountryAlpha2 = "LR"
	AddressCountryAlpha2Ls AddressCountryAlpha2 = "LS"
	AddressCountryAlpha2Lt AddressCountryAlpha2 = "LT"
	AddressCountryAlpha2Lu AddressCountryAlpha2 = "LU"
	AddressCountryAlpha2Lv AddressCountryAlpha2 = "LV"
	AddressCountryAlpha2Ly AddressCountryAlpha2 = "LY"
	AddressCountryAlpha2Ma AddressCountryAlpha2 = "MA"
	AddressCountryAlpha2Mc AddressCountryAlpha2 = "MC"
	AddressCountryAlpha2Md AddressCountryAlpha2 = "MD"
	AddressCountryAlpha2Me AddressCountryAlpha2 = "ME"
	AddressCountryAlpha2Mf AddressCountryAlpha2 = "MF"
	AddressCountryAlpha2Mg AddressCountryAlpha2 = "MG"
	AddressCountryAlpha2Mh AddressCountryAlpha2 = "MH"
	AddressCountryAlpha2Mk AddressCountryAlpha2 = "MK"
	AddressCountryAlpha2Ml AddressCountryAlpha2 = "ML"
	AddressCountryAlpha2Mm AddressCountryAlpha2 = "MM"
	AddressCountryAlpha2Mn AddressCountryAlpha2 = "MN"
	AddressCountryAlpha2Mo AddressCountryAlpha2 = "MO"
	AddressCountryAlpha2Mp AddressCountryAlpha2 = "MP"
	AddressCountryAlpha2Mq AddressCountryAlpha2 = "MQ"
	AddressCountryAlpha2Mr AddressCountryAlpha2 = "MR"
	AddressCountryAlpha2Ms AddressCountryAlpha2 = "MS"
	AddressCountryAlpha2Mt AddressCountryAlpha2 = "MT"
	AddressCountryAlpha2Mu AddressCountryAlpha2 = "MU"
	AddressCountryAlpha2Mv AddressCountryAlpha2 = "MV"
	AddressCountryAlpha2Mw AddressCountryAlpha2 = "MW"
	AddressCountryAlpha2Mx AddressCountryAlpha2 = "MX"
	AddressCountryAlpha2My AddressCountryAlpha2 = "MY"
	AddressCountryAlpha2Mz AddressCountryAlpha2 = "MZ"
	AddressCountryAlpha2Na AddressCountryAlpha2 = "NA"
	AddressCountryAlpha2Nc AddressCountryAlpha2 = "NC"
	AddressCountryAlpha2Ne AddressCountryAlpha2 = "NE"
	AddressCountryAlpha2Nf AddressCountryAlpha2 = "NF"
	AddressCountryAlpha2Ng AddressCountryAlpha2 = "NG"
	AddressCountryAlpha2Ni AddressCountryAlpha2 = "NI"
	AddressCountryAlpha2Nl AddressCountryAlpha2 = "NL"
	AddressCountryAlpha2No AddressCountryAlpha2 = "NO"
	AddressCountryAlpha2Np AddressCountryAlpha2 = "NP"
	AddressCountryAlpha2Nr AddressCountryAlpha2 = "NR"
	AddressCountryAlpha2Nu AddressCountryAlpha2 = "NU"
	AddressCountryAlpha2Nz AddressCountryAlpha2 = "NZ"
	AddressCountryAlpha2Om AddressCountryAlpha2 = "OM"
	AddressCountryAlpha2Pa AddressCountryAlpha2 = "PA"
	AddressCountryAlpha2Pe AddressCountryAlpha2 = "PE"
	AddressCountryAlpha2Pf AddressCountryAlpha2 = "PF"
	AddressCountryAlpha2Pg AddressCountryAlpha2 = "PG"
	AddressCountryAlpha2Ph AddressCountryAlpha2 = "PH"
	AddressCountryAlpha2Pk AddressCountryAlpha2 = "PK"
	AddressCountryAlpha2Pl AddressCountryAlpha2 = "PL"
	AddressCountryAlpha2Pm AddressCountryAlpha2 = "PM"
	AddressCountryAlpha2Pn AddressCountryAlpha2 = "PN"
	AddressCountryAlpha2Pr AddressCountryAlpha2 = "PR"
	AddressCountryAlpha2Ps AddressCountryAlpha2 = "PS"
	AddressCountryAlpha2Pt AddressCountryAlpha2 = "PT"
	AddressCountryAlpha2Pw AddressCountryAlpha2 = "PW"
	AddressCountryAlpha2Py AddressCountryAlpha2 = "PY"
	AddressCountryAlpha2Qa AddressCountryAlpha2 = "QA"
	AddressCountryAlpha2Re AddressCountryAlpha2 = "RE"
	AddressCountryAlpha2Ro AddressCountryAlpha2 = "RO"
	AddressCountryAlpha2Rs AddressCountryAlpha2 = "RS"
	AddressCountryAlpha2Ru AddressCountryAlpha2 = "RU"
	AddressCountryAlpha2Rw AddressCountryAlpha2 = "RW"
	AddressCountryAlpha2Sa AddressCountryAlpha2 = "SA"
	AddressCountryAlpha2Sb AddressCountryAlpha2 = "SB"
	AddressCountryAlpha2Sc AddressCountryAlpha2 = "SC"
	AddressCountryAlpha2Sd AddressCountryAlpha2 = "SD"
	AddressCountryAlpha2Se AddressCountryAlpha2 = "SE"
	AddressCountryAlpha2Sg AddressCountryAlpha2 = "SG"
	AddressCountryAlpha2Sh AddressCountryAlpha2 = "SH"
	AddressCountryAlpha2Si AddressCountryAlpha2 = "SI"
	AddressCountryAlpha2Sj AddressCountryAlpha2 = "SJ"
	AddressCountryAlpha2Sk AddressCountryAlpha2 = "SK"
	AddressCountryAlpha2Sl AddressCountryAlpha2 = "SL"
	AddressCountryAlpha2Sm AddressCountryAlpha2 = "SM"
	AddressCountryAlpha2Sn AddressCountryAlpha2 = "SN"
	AddressCountryAlpha2So AddressCountryAlpha2 = "SO"
	AddressCountryAlpha2Sr AddressCountryAlpha2 = "SR"
	AddressCountryAlpha2Ss AddressCountryAlpha2 = "SS"
	AddressCountryAlpha2St AddressCountryAlpha2 = "ST"
	AddressCountryAlpha2Sv AddressCountryAlpha2 = "SV"
	AddressCountryAlpha2Sx AddressCountryAlpha2 = "SX"
	AddressCountryAlpha2Sy AddressCountryAlpha2 = "SY"
	AddressCountryAlpha2Sz AddressCountryAlpha2 = "SZ"
	AddressCountryAlpha2Tc AddressCountryAlpha2 = "TC"
	AddressCountryAlpha2Td AddressCountryAlpha2 = "TD"
	AddressCountryAlpha2Tf AddressCountryAlpha2 = "TF"
	AddressCountryAlpha2Tg AddressCountryAlpha2 = "TG"
	AddressCountryAlpha2Th AddressCountryAlpha2 = "TH"
	AddressCountryAlpha2Tj AddressCountryAlpha2 = "TJ"
	AddressCountryAlpha2Tk AddressCountryAlpha2 = "TK"
	AddressCountryAlpha2Tl AddressCountryAlpha2 = "TL"
	AddressCountryAlpha2Tm AddressCountryAlpha2 = "TM"
	AddressCountryAlpha2Tn AddressCountryAlpha2 = "TN"
	AddressCountryAlpha2To AddressCountryAlpha2 = "TO"
	AddressCountryAlpha2Tr AddressCountryAlpha2 = "TR"
	AddressCountryAlpha2Tt AddressCountryAlpha2 = "TT"
	AddressCountryAlpha2Tv AddressCountryAlpha2 = "TV"
	AddressCountryAlpha2Tw AddressCountryAlpha2 = "TW"
	AddressCountryAlpha2Tz AddressCountryAlpha2 = "TZ"
	AddressCountryAlpha2Ua AddressCountryAlpha2 = "UA"
	AddressCountryAlpha2Ug AddressCountryAlpha2 = "UG"
	AddressCountryAlpha2Um AddressCountryAlpha2 = "UM"
	AddressCountryAlpha2Us AddressCountryAlpha2 = "US"
	AddressCountryAlpha2Uy AddressCountryAlpha2 = "UY"
	AddressCountryAlpha2Uz AddressCountryAlpha2 = "UZ"
	AddressCountryAlpha2Va AddressCountryAlpha2 = "VA"
	AddressCountryAlpha2Vc AddressCountryAlpha2 = "VC"
	AddressCountryAlpha2Ve AddressCountryAlpha2 = "VE"
	AddressCountryAlpha2Vg AddressCountryAlpha2 = "VG"
	AddressCountryAlpha2Vi AddressCountryAlpha2 = "VI"
	AddressCountryAlpha2Vn AddressCountryAlpha2 = "VN"
	AddressCountryAlpha2Vu AddressCountryAlpha2 = "VU"
	AddressCountryAlpha2Wf AddressCountryAlpha2 = "WF"
	AddressCountryAlpha2Ws AddressCountryAlpha2 = "WS"
	AddressCountryAlpha2Ye AddressCountryAlpha2 = "YE"
	AddressCountryAlpha2Yt AddressCountryAlpha2 = "YT"
	AddressCountryAlpha2Za AddressCountryAlpha2 = "ZA"
	AddressCountryAlpha2Zm AddressCountryAlpha2 = "ZM"
	AddressCountryAlpha2Zw AddressCountryAlpha2 = "ZW"
)

func (AddressCountryAlpha2) ToPointer ¶ added in v0.15.1

func (*AddressCountryAlpha2) UnmarshalJSON ¶ added in v0.15.1

func (e *AddressCountryAlpha2) UnmarshalJSON(data []byte) error

type AddressDict ¶ added in v0.12.0

type AddressDict struct {
	Line1      *string `json:"line1,omitempty"`
	Line2      *string `json:"line2,omitempty"`
	PostalCode *string `json:"postal_code,omitempty"`
	City       *string `json:"city,omitempty"`
	State      *string `json:"state,omitempty"`
	Country    string  `json:"country"`
}

func (*AddressDict) GetCity ¶ added in v0.12.0

func (a *AddressDict) GetCity() *string

func (*AddressDict) GetCountry ¶ added in v0.12.0

func (a *AddressDict) GetCountry() string

func (*AddressDict) GetLine1 ¶ added in v0.12.0

func (a *AddressDict) GetLine1() *string

func (*AddressDict) GetLine2 ¶ added in v0.12.0

func (a *AddressDict) GetLine2() *string

func (*AddressDict) GetPostalCode ¶ added in v0.12.0

func (a *AddressDict) GetPostalCode() *string

func (*AddressDict) GetState ¶ added in v0.12.0

func (a *AddressDict) GetState() *string

func (AddressDict) MarshalJSON ¶ added in v0.12.0

func (a AddressDict) MarshalJSON() ([]byte, error)

func (*AddressDict) UnmarshalJSON ¶ added in v0.12.0

func (a *AddressDict) UnmarshalJSON(data []byte) error

type AddressInput ¶ added in v0.9.0

type AddressInput struct {
	Line1      *string                        `json:"line1,omitempty"`
	Line2      *string                        `json:"line2,omitempty"`
	PostalCode *string                        `json:"postal_code,omitempty"`
	City       *string                        `json:"city,omitempty"`
	State      *string                        `json:"state,omitempty"`
	Country    AddressInputCountryAlpha2Input `json:"country"`
}

func (*AddressInput) GetCity ¶ added in v0.9.0

func (a *AddressInput) GetCity() *string

func (*AddressInput) GetCountry ¶ added in v0.9.0

func (*AddressInput) GetLine1 ¶ added in v0.9.0

func (a *AddressInput) GetLine1() *string

func (*AddressInput) GetLine2 ¶ added in v0.9.0

func (a *AddressInput) GetLine2() *string

func (*AddressInput) GetPostalCode ¶ added in v0.9.0

func (a *AddressInput) GetPostalCode() *string

func (*AddressInput) GetState ¶ added in v0.9.0

func (a *AddressInput) GetState() *string

func (AddressInput) MarshalJSON ¶ added in v0.16.0

func (a AddressInput) MarshalJSON() ([]byte, error)

func (*AddressInput) UnmarshalJSON ¶ added in v0.16.0

func (a *AddressInput) UnmarshalJSON(data []byte) error

type AddressInputCountryAlpha2Input ¶ added in v0.15.1

type AddressInputCountryAlpha2Input string
const (
	AddressInputCountryAlpha2InputAd AddressInputCountryAlpha2Input = "AD"
	AddressInputCountryAlpha2InputAe AddressInputCountryAlpha2Input = "AE"
	AddressInputCountryAlpha2InputAf AddressInputCountryAlpha2Input = "AF"
	AddressInputCountryAlpha2InputAg AddressInputCountryAlpha2Input = "AG"
	AddressInputCountryAlpha2InputAi AddressInputCountryAlpha2Input = "AI"
	AddressInputCountryAlpha2InputAl AddressInputCountryAlpha2Input = "AL"
	AddressInputCountryAlpha2InputAm AddressInputCountryAlpha2Input = "AM"
	AddressInputCountryAlpha2InputAo AddressInputCountryAlpha2Input = "AO"
	AddressInputCountryAlpha2InputAq AddressInputCountryAlpha2Input = "AQ"
	AddressInputCountryAlpha2InputAr AddressInputCountryAlpha2Input = "AR"
	AddressInputCountryAlpha2InputAs AddressInputCountryAlpha2Input = "AS"
	AddressInputCountryAlpha2InputAt AddressInputCountryAlpha2Input = "AT"
	AddressInputCountryAlpha2InputAu AddressInputCountryAlpha2Input = "AU"
	AddressInputCountryAlpha2InputAw AddressInputCountryAlpha2Input = "AW"
	AddressInputCountryAlpha2InputAx AddressInputCountryAlpha2Input = "AX"
	AddressInputCountryAlpha2InputAz AddressInputCountryAlpha2Input = "AZ"
	AddressInputCountryAlpha2InputBa AddressInputCountryAlpha2Input = "BA"
	AddressInputCountryAlpha2InputBb AddressInputCountryAlpha2Input = "BB"
	AddressInputCountryAlpha2InputBd AddressInputCountryAlpha2Input = "BD"
	AddressInputCountryAlpha2InputBe AddressInputCountryAlpha2Input = "BE"
	AddressInputCountryAlpha2InputBf AddressInputCountryAlpha2Input = "BF"
	AddressInputCountryAlpha2InputBg AddressInputCountryAlpha2Input = "BG"
	AddressInputCountryAlpha2InputBh AddressInputCountryAlpha2Input = "BH"
	AddressInputCountryAlpha2InputBi AddressInputCountryAlpha2Input = "BI"
	AddressInputCountryAlpha2InputBj AddressInputCountryAlpha2Input = "BJ"
	AddressInputCountryAlpha2InputBl AddressInputCountryAlpha2Input = "BL"
	AddressInputCountryAlpha2InputBm AddressInputCountryAlpha2Input = "BM"
	AddressInputCountryAlpha2InputBn AddressInputCountryAlpha2Input = "BN"
	AddressInputCountryAlpha2InputBo AddressInputCountryAlpha2Input = "BO"
	AddressInputCountryAlpha2InputBq AddressInputCountryAlpha2Input = "BQ"
	AddressInputCountryAlpha2InputBr AddressInputCountryAlpha2Input = "BR"
	AddressInputCountryAlpha2InputBs AddressInputCountryAlpha2Input = "BS"
	AddressInputCountryAlpha2InputBt AddressInputCountryAlpha2Input = "BT"
	AddressInputCountryAlpha2InputBv AddressInputCountryAlpha2Input = "BV"
	AddressInputCountryAlpha2InputBw AddressInputCountryAlpha2Input = "BW"
	AddressInputCountryAlpha2InputBy AddressInputCountryAlpha2Input = "BY"
	AddressInputCountryAlpha2InputBz AddressInputCountryAlpha2Input = "BZ"
	AddressInputCountryAlpha2InputCa AddressInputCountryAlpha2Input = "CA"
	AddressInputCountryAlpha2InputCc AddressInputCountryAlpha2Input = "CC"
	AddressInputCountryAlpha2InputCd AddressInputCountryAlpha2Input = "CD"
	AddressInputCountryAlpha2InputCf AddressInputCountryAlpha2Input = "CF"
	AddressInputCountryAlpha2InputCg AddressInputCountryAlpha2Input = "CG"
	AddressInputCountryAlpha2InputCh AddressInputCountryAlpha2Input = "CH"
	AddressInputCountryAlpha2InputCi AddressInputCountryAlpha2Input = "CI"
	AddressInputCountryAlpha2InputCk AddressInputCountryAlpha2Input = "CK"
	AddressInputCountryAlpha2InputCl AddressInputCountryAlpha2Input = "CL"
	AddressInputCountryAlpha2InputCm AddressInputCountryAlpha2Input = "CM"
	AddressInputCountryAlpha2InputCn AddressInputCountryAlpha2Input = "CN"
	AddressInputCountryAlpha2InputCo AddressInputCountryAlpha2Input = "CO"
	AddressInputCountryAlpha2InputCr AddressInputCountryAlpha2Input = "CR"
	AddressInputCountryAlpha2InputCv AddressInputCountryAlpha2Input = "CV"
	AddressInputCountryAlpha2InputCw AddressInputCountryAlpha2Input = "CW"
	AddressInputCountryAlpha2InputCx AddressInputCountryAlpha2Input = "CX"
	AddressInputCountryAlpha2InputCy AddressInputCountryAlpha2Input = "CY"
	AddressInputCountryAlpha2InputCz AddressInputCountryAlpha2Input = "CZ"
	AddressInputCountryAlpha2InputDe AddressInputCountryAlpha2Input = "DE"
	AddressInputCountryAlpha2InputDj AddressInputCountryAlpha2Input = "DJ"
	AddressInputCountryAlpha2InputDk AddressInputCountryAlpha2Input = "DK"
	AddressInputCountryAlpha2InputDm AddressInputCountryAlpha2Input = "DM"
	AddressInputCountryAlpha2InputDo AddressInputCountryAlpha2Input = "DO"
	AddressInputCountryAlpha2InputDz AddressInputCountryAlpha2Input = "DZ"
	AddressInputCountryAlpha2InputEc AddressInputCountryAlpha2Input = "EC"
	AddressInputCountryAlpha2InputEe AddressInputCountryAlpha2Input = "EE"
	AddressInputCountryAlpha2InputEg AddressInputCountryAlpha2Input = "EG"
	AddressInputCountryAlpha2InputEh AddressInputCountryAlpha2Input = "EH"
	AddressInputCountryAlpha2InputEr AddressInputCountryAlpha2Input = "ER"
	AddressInputCountryAlpha2InputEs AddressInputCountryAlpha2Input = "ES"
	AddressInputCountryAlpha2InputEt AddressInputCountryAlpha2Input = "ET"
	AddressInputCountryAlpha2InputFi AddressInputCountryAlpha2Input = "FI"
	AddressInputCountryAlpha2InputFj AddressInputCountryAlpha2Input = "FJ"
	AddressInputCountryAlpha2InputFk AddressInputCountryAlpha2Input = "FK"
	AddressInputCountryAlpha2InputFm AddressInputCountryAlpha2Input = "FM"
	AddressInputCountryAlpha2InputFo AddressInputCountryAlpha2Input = "FO"
	AddressInputCountryAlpha2InputFr AddressInputCountryAlpha2Input = "FR"
	AddressInputCountryAlpha2InputGa AddressInputCountryAlpha2Input = "GA"
	AddressInputCountryAlpha2InputGb AddressInputCountryAlpha2Input = "GB"
	AddressInputCountryAlpha2InputGd AddressInputCountryAlpha2Input = "GD"
	AddressInputCountryAlpha2InputGe AddressInputCountryAlpha2Input = "GE"
	AddressInputCountryAlpha2InputGf AddressInputCountryAlpha2Input = "GF"
	AddressInputCountryAlpha2InputGg AddressInputCountryAlpha2Input = "GG"
	AddressInputCountryAlpha2InputGh AddressInputCountryAlpha2Input = "GH"
	AddressInputCountryAlpha2InputGi AddressInputCountryAlpha2Input = "GI"
	AddressInputCountryAlpha2InputGl AddressInputCountryAlpha2Input = "GL"
	AddressInputCountryAlpha2InputGm AddressInputCountryAlpha2Input = "GM"
	AddressInputCountryAlpha2InputGn AddressInputCountryAlpha2Input = "GN"
	AddressInputCountryAlpha2InputGp AddressInputCountryAlpha2Input = "GP"
	AddressInputCountryAlpha2InputGq AddressInputCountryAlpha2Input = "GQ"
	AddressInputCountryAlpha2InputGr AddressInputCountryAlpha2Input = "GR"
	AddressInputCountryAlpha2InputGs AddressInputCountryAlpha2Input = "GS"
	AddressInputCountryAlpha2InputGt AddressInputCountryAlpha2Input = "GT"
	AddressInputCountryAlpha2InputGu AddressInputCountryAlpha2Input = "GU"
	AddressInputCountryAlpha2InputGw AddressInputCountryAlpha2Input = "GW"
	AddressInputCountryAlpha2InputGy AddressInputCountryAlpha2Input = "GY"
	AddressInputCountryAlpha2InputHk AddressInputCountryAlpha2Input = "HK"
	AddressInputCountryAlpha2InputHm AddressInputCountryAlpha2Input = "HM"
	AddressInputCountryAlpha2InputHn AddressInputCountryAlpha2Input = "HN"
	AddressInputCountryAlpha2InputHr AddressInputCountryAlpha2Input = "HR"
	AddressInputCountryAlpha2InputHt AddressInputCountryAlpha2Input = "HT"
	AddressInputCountryAlpha2InputHu AddressInputCountryAlpha2Input = "HU"
	AddressInputCountryAlpha2InputId AddressInputCountryAlpha2Input = "ID"
	AddressInputCountryAlpha2InputIe AddressInputCountryAlpha2Input = "IE"
	AddressInputCountryAlpha2InputIl AddressInputCountryAlpha2Input = "IL"
	AddressInputCountryAlpha2InputIm AddressInputCountryAlpha2Input = "IM"
	AddressInputCountryAlpha2InputIn AddressInputCountryAlpha2Input = "IN"
	AddressInputCountryAlpha2InputIo AddressInputCountryAlpha2Input = "IO"
	AddressInputCountryAlpha2InputIq AddressInputCountryAlpha2Input = "IQ"
	AddressInputCountryAlpha2InputIs AddressInputCountryAlpha2Input = "IS"
	AddressInputCountryAlpha2InputIt AddressInputCountryAlpha2Input = "IT"
	AddressInputCountryAlpha2InputJe AddressInputCountryAlpha2Input = "JE"
	AddressInputCountryAlpha2InputJm AddressInputCountryAlpha2Input = "JM"
	AddressInputCountryAlpha2InputJo AddressInputCountryAlpha2Input = "JO"
	AddressInputCountryAlpha2InputJp AddressInputCountryAlpha2Input = "JP"
	AddressInputCountryAlpha2InputKe AddressInputCountryAlpha2Input = "KE"
	AddressInputCountryAlpha2InputKg AddressInputCountryAlpha2Input = "KG"
	AddressInputCountryAlpha2InputKh AddressInputCountryAlpha2Input = "KH"
	AddressInputCountryAlpha2InputKi AddressInputCountryAlpha2Input = "KI"
	AddressInputCountryAlpha2InputKm AddressInputCountryAlpha2Input = "KM"
	AddressInputCountryAlpha2InputKn AddressInputCountryAlpha2Input = "KN"
	AddressInputCountryAlpha2InputKr AddressInputCountryAlpha2Input = "KR"
	AddressInputCountryAlpha2InputKw AddressInputCountryAlpha2Input = "KW"
	AddressInputCountryAlpha2InputKy AddressInputCountryAlpha2Input = "KY"
	AddressInputCountryAlpha2InputKz AddressInputCountryAlpha2Input = "KZ"
	AddressInputCountryAlpha2InputLa AddressInputCountryAlpha2Input = "LA"
	AddressInputCountryAlpha2InputLb AddressInputCountryAlpha2Input = "LB"
	AddressInputCountryAlpha2InputLc AddressInputCountryAlpha2Input = "LC"
	AddressInputCountryAlpha2InputLi AddressInputCountryAlpha2Input = "LI"
	AddressInputCountryAlpha2InputLk AddressInputCountryAlpha2Input = "LK"
	AddressInputCountryAlpha2InputLr AddressInputCountryAlpha2Input = "LR"
	AddressInputCountryAlpha2InputLs AddressInputCountryAlpha2Input = "LS"
	AddressInputCountryAlpha2InputLt AddressInputCountryAlpha2Input = "LT"
	AddressInputCountryAlpha2InputLu AddressInputCountryAlpha2Input = "LU"
	AddressInputCountryAlpha2InputLv AddressInputCountryAlpha2Input = "LV"
	AddressInputCountryAlpha2InputLy AddressInputCountryAlpha2Input = "LY"
	AddressInputCountryAlpha2InputMa AddressInputCountryAlpha2Input = "MA"
	AddressInputCountryAlpha2InputMc AddressInputCountryAlpha2Input = "MC"
	AddressInputCountryAlpha2InputMd AddressInputCountryAlpha2Input = "MD"
	AddressInputCountryAlpha2InputMe AddressInputCountryAlpha2Input = "ME"
	AddressInputCountryAlpha2InputMf AddressInputCountryAlpha2Input = "MF"
	AddressInputCountryAlpha2InputMg AddressInputCountryAlpha2Input = "MG"
	AddressInputCountryAlpha2InputMh AddressInputCountryAlpha2Input = "MH"
	AddressInputCountryAlpha2InputMk AddressInputCountryAlpha2Input = "MK"
	AddressInputCountryAlpha2InputMl AddressInputCountryAlpha2Input = "ML"
	AddressInputCountryAlpha2InputMm AddressInputCountryAlpha2Input = "MM"
	AddressInputCountryAlpha2InputMn AddressInputCountryAlpha2Input = "MN"
	AddressInputCountryAlpha2InputMo AddressInputCountryAlpha2Input = "MO"
	AddressInputCountryAlpha2InputMp AddressInputCountryAlpha2Input = "MP"
	AddressInputCountryAlpha2InputMq AddressInputCountryAlpha2Input = "MQ"
	AddressInputCountryAlpha2InputMr AddressInputCountryAlpha2Input = "MR"
	AddressInputCountryAlpha2InputMs AddressInputCountryAlpha2Input = "MS"
	AddressInputCountryAlpha2InputMt AddressInputCountryAlpha2Input = "MT"
	AddressInputCountryAlpha2InputMu AddressInputCountryAlpha2Input = "MU"
	AddressInputCountryAlpha2InputMv AddressInputCountryAlpha2Input = "MV"
	AddressInputCountryAlpha2InputMw AddressInputCountryAlpha2Input = "MW"
	AddressInputCountryAlpha2InputMx AddressInputCountryAlpha2Input = "MX"
	AddressInputCountryAlpha2InputMy AddressInputCountryAlpha2Input = "MY"
	AddressInputCountryAlpha2InputMz AddressInputCountryAlpha2Input = "MZ"
	AddressInputCountryAlpha2InputNa AddressInputCountryAlpha2Input = "NA"
	AddressInputCountryAlpha2InputNc AddressInputCountryAlpha2Input = "NC"
	AddressInputCountryAlpha2InputNe AddressInputCountryAlpha2Input = "NE"
	AddressInputCountryAlpha2InputNf AddressInputCountryAlpha2Input = "NF"
	AddressInputCountryAlpha2InputNg AddressInputCountryAlpha2Input = "NG"
	AddressInputCountryAlpha2InputNi AddressInputCountryAlpha2Input = "NI"
	AddressInputCountryAlpha2InputNl AddressInputCountryAlpha2Input = "NL"
	AddressInputCountryAlpha2InputNo AddressInputCountryAlpha2Input = "NO"
	AddressInputCountryAlpha2InputNp AddressInputCountryAlpha2Input = "NP"
	AddressInputCountryAlpha2InputNr AddressInputCountryAlpha2Input = "NR"
	AddressInputCountryAlpha2InputNu AddressInputCountryAlpha2Input = "NU"
	AddressInputCountryAlpha2InputNz AddressInputCountryAlpha2Input = "NZ"
	AddressInputCountryAlpha2InputOm AddressInputCountryAlpha2Input = "OM"
	AddressInputCountryAlpha2InputPa AddressInputCountryAlpha2Input = "PA"
	AddressInputCountryAlpha2InputPe AddressInputCountryAlpha2Input = "PE"
	AddressInputCountryAlpha2InputPf AddressInputCountryAlpha2Input = "PF"
	AddressInputCountryAlpha2InputPg AddressInputCountryAlpha2Input = "PG"
	AddressInputCountryAlpha2InputPh AddressInputCountryAlpha2Input = "PH"
	AddressInputCountryAlpha2InputPk AddressInputCountryAlpha2Input = "PK"
	AddressInputCountryAlpha2InputPl AddressInputCountryAlpha2Input = "PL"
	AddressInputCountryAlpha2InputPm AddressInputCountryAlpha2Input = "PM"
	AddressInputCountryAlpha2InputPn AddressInputCountryAlpha2Input = "PN"
	AddressInputCountryAlpha2InputPr AddressInputCountryAlpha2Input = "PR"
	AddressInputCountryAlpha2InputPs AddressInputCountryAlpha2Input = "PS"
	AddressInputCountryAlpha2InputPt AddressInputCountryAlpha2Input = "PT"
	AddressInputCountryAlpha2InputPw AddressInputCountryAlpha2Input = "PW"
	AddressInputCountryAlpha2InputPy AddressInputCountryAlpha2Input = "PY"
	AddressInputCountryAlpha2InputQa AddressInputCountryAlpha2Input = "QA"
	AddressInputCountryAlpha2InputRe AddressInputCountryAlpha2Input = "RE"
	AddressInputCountryAlpha2InputRo AddressInputCountryAlpha2Input = "RO"
	AddressInputCountryAlpha2InputRs AddressInputCountryAlpha2Input = "RS"
	AddressInputCountryAlpha2InputRw AddressInputCountryAlpha2Input = "RW"
	AddressInputCountryAlpha2InputSa AddressInputCountryAlpha2Input = "SA"
	AddressInputCountryAlpha2InputSb AddressInputCountryAlpha2Input = "SB"
	AddressInputCountryAlpha2InputSc AddressInputCountryAlpha2Input = "SC"
	AddressInputCountryAlpha2InputSd AddressInputCountryAlpha2Input = "SD"
	AddressInputCountryAlpha2InputSe AddressInputCountryAlpha2Input = "SE"
	AddressInputCountryAlpha2InputSg AddressInputCountryAlpha2Input = "SG"
	AddressInputCountryAlpha2InputSh AddressInputCountryAlpha2Input = "SH"
	AddressInputCountryAlpha2InputSi AddressInputCountryAlpha2Input = "SI"
	AddressInputCountryAlpha2InputSj AddressInputCountryAlpha2Input = "SJ"
	AddressInputCountryAlpha2InputSk AddressInputCountryAlpha2Input = "SK"
	AddressInputCountryAlpha2InputSl AddressInputCountryAlpha2Input = "SL"
	AddressInputCountryAlpha2InputSm AddressInputCountryAlpha2Input = "SM"
	AddressInputCountryAlpha2InputSn AddressInputCountryAlpha2Input = "SN"
	AddressInputCountryAlpha2InputSo AddressInputCountryAlpha2Input = "SO"
	AddressInputCountryAlpha2InputSr AddressInputCountryAlpha2Input = "SR"
	AddressInputCountryAlpha2InputSs AddressInputCountryAlpha2Input = "SS"
	AddressInputCountryAlpha2InputSt AddressInputCountryAlpha2Input = "ST"
	AddressInputCountryAlpha2InputSv AddressInputCountryAlpha2Input = "SV"
	AddressInputCountryAlpha2InputSx AddressInputCountryAlpha2Input = "SX"
	AddressInputCountryAlpha2InputSz AddressInputCountryAlpha2Input = "SZ"
	AddressInputCountryAlpha2InputTc AddressInputCountryAlpha2Input = "TC"
	AddressInputCountryAlpha2InputTd AddressInputCountryAlpha2Input = "TD"
	AddressInputCountryAlpha2InputTf AddressInputCountryAlpha2Input = "TF"
	AddressInputCountryAlpha2InputTg AddressInputCountryAlpha2Input = "TG"
	AddressInputCountryAlpha2InputTh AddressInputCountryAlpha2Input = "TH"
	AddressInputCountryAlpha2InputTj AddressInputCountryAlpha2Input = "TJ"
	AddressInputCountryAlpha2InputTk AddressInputCountryAlpha2Input = "TK"
	AddressInputCountryAlpha2InputTl AddressInputCountryAlpha2Input = "TL"
	AddressInputCountryAlpha2InputTm AddressInputCountryAlpha2Input = "TM"
	AddressInputCountryAlpha2InputTn AddressInputCountryAlpha2Input = "TN"
	AddressInputCountryAlpha2InputTo AddressInputCountryAlpha2Input = "TO"
	AddressInputCountryAlpha2InputTr AddressInputCountryAlpha2Input = "TR"
	AddressInputCountryAlpha2InputTt AddressInputCountryAlpha2Input = "TT"
	AddressInputCountryAlpha2InputTv AddressInputCountryAlpha2Input = "TV"
	AddressInputCountryAlpha2InputTw AddressInputCountryAlpha2Input = "TW"
	AddressInputCountryAlpha2InputTz AddressInputCountryAlpha2Input = "TZ"
	AddressInputCountryAlpha2InputUa AddressInputCountryAlpha2Input = "UA"
	AddressInputCountryAlpha2InputUg AddressInputCountryAlpha2Input = "UG"
	AddressInputCountryAlpha2InputUm AddressInputCountryAlpha2Input = "UM"
	AddressInputCountryAlpha2InputUs AddressInputCountryAlpha2Input = "US"
	AddressInputCountryAlpha2InputUy AddressInputCountryAlpha2Input = "UY"
	AddressInputCountryAlpha2InputUz AddressInputCountryAlpha2Input = "UZ"
	AddressInputCountryAlpha2InputVa AddressInputCountryAlpha2Input = "VA"
	AddressInputCountryAlpha2InputVc AddressInputCountryAlpha2Input = "VC"
	AddressInputCountryAlpha2InputVe AddressInputCountryAlpha2Input = "VE"
	AddressInputCountryAlpha2InputVg AddressInputCountryAlpha2Input = "VG"
	AddressInputCountryAlpha2InputVi AddressInputCountryAlpha2Input = "VI"
	AddressInputCountryAlpha2InputVn AddressInputCountryAlpha2Input = "VN"
	AddressInputCountryAlpha2InputVu AddressInputCountryAlpha2Input = "VU"
	AddressInputCountryAlpha2InputWf AddressInputCountryAlpha2Input = "WF"
	AddressInputCountryAlpha2InputWs AddressInputCountryAlpha2Input = "WS"
	AddressInputCountryAlpha2InputYe AddressInputCountryAlpha2Input = "YE"
	AddressInputCountryAlpha2InputYt AddressInputCountryAlpha2Input = "YT"
	AddressInputCountryAlpha2InputZa AddressInputCountryAlpha2Input = "ZA"
	AddressInputCountryAlpha2InputZm AddressInputCountryAlpha2Input = "ZM"
	AddressInputCountryAlpha2InputZw AddressInputCountryAlpha2Input = "ZW"
)

func (AddressInputCountryAlpha2Input) ToPointer ¶ added in v0.15.1

func (*AddressInputCountryAlpha2Input) UnmarshalJSON ¶ added in v0.15.1

func (e *AddressInputCountryAlpha2Input) UnmarshalJSON(data []byte) error

type Aggregation ¶ added in v0.1.8

type Aggregation struct {
	CountAggregation    *CountAggregation    `queryParam:"inline" union:"member"`
	PropertyAggregation *PropertyAggregation `queryParam:"inline" union:"member"`
	UniqueAggregation   *UniqueAggregation   `queryParam:"inline" union:"member"`

	Type AggregationType
}

func CreateAggregationAvg ¶ added in v0.1.8

func CreateAggregationAvg(avg PropertyAggregation) Aggregation

func CreateAggregationCount ¶ added in v0.1.8

func CreateAggregationCount(count CountAggregation) Aggregation

func CreateAggregationMax ¶ added in v0.1.8

func CreateAggregationMax(max PropertyAggregation) Aggregation

func CreateAggregationMin ¶ added in v0.1.8

func CreateAggregationMin(min PropertyAggregation) Aggregation

func CreateAggregationSum ¶ added in v0.1.8

func CreateAggregationSum(sum PropertyAggregation) Aggregation

func CreateAggregationUnique ¶ added in v0.8.3

func CreateAggregationUnique(unique UniqueAggregation) Aggregation

func (Aggregation) MarshalJSON ¶ added in v0.1.8

func (u Aggregation) MarshalJSON() ([]byte, error)

func (*Aggregation) UnmarshalJSON ¶ added in v0.1.8

func (u *Aggregation) UnmarshalJSON(data []byte) error

type AggregationFunction ¶ added in v0.9.2

type AggregationFunction string
const (
	AggregationFunctionCount  AggregationFunction = "count"
	AggregationFunctionSum    AggregationFunction = "sum"
	AggregationFunctionMax    AggregationFunction = "max"
	AggregationFunctionMin    AggregationFunction = "min"
	AggregationFunctionAvg    AggregationFunction = "avg"
	AggregationFunctionUnique AggregationFunction = "unique"
)

func (AggregationFunction) ToPointer ¶ added in v0.9.2

func (*AggregationFunction) UnmarshalJSON ¶ added in v0.9.2

func (e *AggregationFunction) UnmarshalJSON(data []byte) error

type AggregationType ¶ added in v0.1.8

type AggregationType string
const (
	AggregationTypeAvg    AggregationType = "avg"
	AggregationTypeCount  AggregationType = "count"
	AggregationTypeMax    AggregationType = "max"
	AggregationTypeMin    AggregationType = "min"
	AggregationTypeSum    AggregationType = "sum"
	AggregationTypeUnique AggregationType = "unique"
)

type AlreadyActiveSubscriptionError ¶ added in v0.3.0

type AlreadyActiveSubscriptionError struct {
	Detail string `json:"detail"`
	// contains filtered or unexported fields
}

func (*AlreadyActiveSubscriptionError) GetDetail ¶ added in v0.3.0

func (a *AlreadyActiveSubscriptionError) GetDetail() string

func (*AlreadyActiveSubscriptionError) GetError ¶ added in v0.3.0

func (a *AlreadyActiveSubscriptionError) GetError() string

func (AlreadyActiveSubscriptionError) MarshalJSON ¶ added in v0.3.0

func (a AlreadyActiveSubscriptionError) MarshalJSON() ([]byte, error)

func (*AlreadyActiveSubscriptionError) UnmarshalJSON ¶ added in v0.3.0

func (a *AlreadyActiveSubscriptionError) UnmarshalJSON(data []byte) error

type Amount ¶ added in v0.12.0

type Amount struct {
	Number *float64 `queryParam:"inline" union:"member"`
	Str    *string  `queryParam:"inline" union:"member"`

	Type AmountType
}

Amount - The amount in cents.

func CreateAmountNumber ¶ added in v0.12.0

func CreateAmountNumber(number float64) Amount

func CreateAmountStr ¶ added in v0.12.0

func CreateAmountStr(str string) Amount

func (Amount) MarshalJSON ¶ added in v0.12.0

func (u Amount) MarshalJSON() ([]byte, error)

func (*Amount) UnmarshalJSON ¶ added in v0.12.0

func (u *Amount) UnmarshalJSON(data []byte) error

type AmountType ¶ added in v0.12.0

type AmountType string
const (
	AmountTypeNumber AmountType = "number"
	AmountTypeStr    AmountType = "str"
)

type AttachedCustomField ¶

type AttachedCustomField struct {
	// ID of the custom field.
	CustomFieldID string      `json:"custom_field_id"`
	CustomField   CustomField `json:"custom_field"`
	// Order of the custom field in the resource.
	Order int64 `json:"order"`
	// Whether the value is required for this custom field.
	Required bool `json:"required"`
}

AttachedCustomField - Schema of a custom field attached to a resource.

func (*AttachedCustomField) GetCustomField ¶

func (a *AttachedCustomField) GetCustomField() CustomField

func (*AttachedCustomField) GetCustomFieldCheckbox ¶

func (a *AttachedCustomField) GetCustomFieldCheckbox() *CustomFieldCheckbox

func (*AttachedCustomField) GetCustomFieldDate ¶

func (a *AttachedCustomField) GetCustomFieldDate() *CustomFieldDate

func (*AttachedCustomField) GetCustomFieldID ¶

func (a *AttachedCustomField) GetCustomFieldID() string

func (*AttachedCustomField) GetCustomFieldNumber ¶

func (a *AttachedCustomField) GetCustomFieldNumber() *CustomFieldNumber

func (*AttachedCustomField) GetCustomFieldSelect ¶

func (a *AttachedCustomField) GetCustomFieldSelect() *CustomFieldSelect

func (*AttachedCustomField) GetCustomFieldText ¶

func (a *AttachedCustomField) GetCustomFieldText() *CustomFieldText

func (*AttachedCustomField) GetOrder ¶

func (a *AttachedCustomField) GetOrder() int64

func (*AttachedCustomField) GetRequired ¶

func (a *AttachedCustomField) GetRequired() bool

type AttachedCustomFieldCreate ¶

type AttachedCustomFieldCreate struct {
	// ID of the custom field to attach.
	CustomFieldID string `json:"custom_field_id"`
	// Whether the value is required for this custom field.
	Required bool `json:"required"`
}

AttachedCustomFieldCreate - Schema to attach a custom field to a resource.

func (*AttachedCustomFieldCreate) GetCustomFieldID ¶

func (a *AttachedCustomFieldCreate) GetCustomFieldID() string

func (*AttachedCustomFieldCreate) GetRequired ¶

func (a *AttachedCustomFieldCreate) GetRequired() bool

func (AttachedCustomFieldCreate) MarshalJSON ¶ added in v0.9.1

func (a AttachedCustomFieldCreate) MarshalJSON() ([]byte, error)

func (*AttachedCustomFieldCreate) UnmarshalJSON ¶ added in v0.9.1

func (a *AttachedCustomFieldCreate) UnmarshalJSON(data []byte) error

type AuthorizationCodeTokenRequest ¶ added in v0.3.0

type AuthorizationCodeTokenRequest struct {
	ClientID     string `form:"name=client_id"`
	ClientSecret string `form:"name=client_secret"`
	Code         string `form:"name=code"`
	RedirectURI  string `form:"name=redirect_uri"`
	// contains filtered or unexported fields
}

func (*AuthorizationCodeTokenRequest) GetClientID ¶ added in v0.3.0

func (a *AuthorizationCodeTokenRequest) GetClientID() string

func (*AuthorizationCodeTokenRequest) GetClientSecret ¶ added in v0.3.0

func (a *AuthorizationCodeTokenRequest) GetClientSecret() string

func (*AuthorizationCodeTokenRequest) GetCode ¶ added in v0.3.0

func (*AuthorizationCodeTokenRequest) GetGrantType ¶ added in v0.3.0

func (a *AuthorizationCodeTokenRequest) GetGrantType() string

func (*AuthorizationCodeTokenRequest) GetRedirectURI ¶ added in v0.3.0

func (a *AuthorizationCodeTokenRequest) GetRedirectURI() string

func (AuthorizationCodeTokenRequest) MarshalJSON ¶ added in v0.3.0

func (a AuthorizationCodeTokenRequest) MarshalJSON() ([]byte, error)

func (*AuthorizationCodeTokenRequest) UnmarshalJSON ¶ added in v0.3.0

func (a *AuthorizationCodeTokenRequest) UnmarshalJSON(data []byte) error

type AuthorizeOrganization ¶

type AuthorizeOrganization struct {
	ID        string  `json:"id"`
	Slug      string  `json:"slug"`
	AvatarURL *string `json:"avatar_url"`
}

func (*AuthorizeOrganization) GetAvatarURL ¶

func (a *AuthorizeOrganization) GetAvatarURL() *string

func (*AuthorizeOrganization) GetID ¶

func (a *AuthorizeOrganization) GetID() string

func (*AuthorizeOrganization) GetSlug ¶

func (a *AuthorizeOrganization) GetSlug() string

func (AuthorizeOrganization) MarshalJSON ¶ added in v0.8.4

func (a AuthorizeOrganization) MarshalJSON() ([]byte, error)

func (*AuthorizeOrganization) UnmarshalJSON ¶ added in v0.8.4

func (a *AuthorizeOrganization) UnmarshalJSON(data []byte) error

type AuthorizeResponseOrganization ¶

type AuthorizeResponseOrganization struct {
	Client OAuth2ClientPublic `json:"client"`

	Sub               *AuthorizeOrganization  `json:"sub"`
	Scopes            []Scope                 `json:"scopes"`
	ScopeDisplayNames map[string]string       `json:"scope_display_names,omitempty"`
	Organizations     []AuthorizeOrganization `json:"organizations"`
	// contains filtered or unexported fields
}

func (*AuthorizeResponseOrganization) GetClient ¶

func (*AuthorizeResponseOrganization) GetOrganizations ¶

func (a *AuthorizeResponseOrganization) GetOrganizations() []AuthorizeOrganization

func (*AuthorizeResponseOrganization) GetScopeDisplayNames ¶ added in v0.13.0

func (a *AuthorizeResponseOrganization) GetScopeDisplayNames() map[string]string

func (*AuthorizeResponseOrganization) GetScopes ¶

func (a *AuthorizeResponseOrganization) GetScopes() []Scope

func (*AuthorizeResponseOrganization) GetSub ¶

func (*AuthorizeResponseOrganization) GetSubType ¶

func (a *AuthorizeResponseOrganization) GetSubType() string

func (AuthorizeResponseOrganization) MarshalJSON ¶

func (a AuthorizeResponseOrganization) MarshalJSON() ([]byte, error)

func (*AuthorizeResponseOrganization) UnmarshalJSON ¶

func (a *AuthorizeResponseOrganization) UnmarshalJSON(data []byte) error

type AuthorizeResponseUser ¶

type AuthorizeResponseUser struct {
	Client OAuth2ClientPublic `json:"client"`

	Sub               *AuthorizeUser    `json:"sub"`
	Scopes            []Scope           `json:"scopes"`
	ScopeDisplayNames map[string]string `json:"scope_display_names,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthorizeResponseUser) GetClient ¶

func (*AuthorizeResponseUser) GetScopeDisplayNames ¶ added in v0.13.0

func (a *AuthorizeResponseUser) GetScopeDisplayNames() map[string]string

func (*AuthorizeResponseUser) GetScopes ¶

func (a *AuthorizeResponseUser) GetScopes() []Scope

func (*AuthorizeResponseUser) GetSub ¶

func (a *AuthorizeResponseUser) GetSub() *AuthorizeUser

func (*AuthorizeResponseUser) GetSubType ¶

func (a *AuthorizeResponseUser) GetSubType() string

func (AuthorizeResponseUser) MarshalJSON ¶

func (a AuthorizeResponseUser) MarshalJSON() ([]byte, error)

func (*AuthorizeResponseUser) UnmarshalJSON ¶

func (a *AuthorizeResponseUser) UnmarshalJSON(data []byte) error

type AuthorizeUser ¶

type AuthorizeUser struct {
	ID        string  `json:"id"`
	Email     string  `json:"email"`
	AvatarURL *string `json:"avatar_url"`
}

func (*AuthorizeUser) GetAvatarURL ¶

func (a *AuthorizeUser) GetAvatarURL() *string

func (*AuthorizeUser) GetEmail ¶

func (a *AuthorizeUser) GetEmail() string

func (*AuthorizeUser) GetID ¶

func (a *AuthorizeUser) GetID() string

func (AuthorizeUser) MarshalJSON ¶ added in v0.8.4

func (a AuthorizeUser) MarshalJSON() ([]byte, error)

func (*AuthorizeUser) UnmarshalJSON ¶ added in v0.8.4

func (a *AuthorizeUser) UnmarshalJSON(data []byte) error

type AvailableScope ¶ added in v0.13.0

type AvailableScope string
const (
	AvailableScopeOpenid                        AvailableScope = "openid"
	AvailableScopeProfile                       AvailableScope = "profile"
	AvailableScopeEmail                         AvailableScope = "email"
	AvailableScopeUserRead                      AvailableScope = "user:read"
	AvailableScopeUserWrite                     AvailableScope = "user:write"
	AvailableScopeOrganizationsRead             AvailableScope = "organizations:read"
	AvailableScopeOrganizationsWrite            AvailableScope = "organizations:write"
	AvailableScopeCustomFieldsRead              AvailableScope = "custom_fields:read"
	AvailableScopeCustomFieldsWrite             AvailableScope = "custom_fields:write"
	AvailableScopeDiscountsRead                 AvailableScope = "discounts:read"
	AvailableScopeDiscountsWrite                AvailableScope = "discounts:write"
	AvailableScopeCheckoutLinksRead             AvailableScope = "checkout_links:read"
	AvailableScopeCheckoutLinksWrite            AvailableScope = "checkout_links:write"
	AvailableScopeCheckoutsRead                 AvailableScope = "checkouts:read"
	AvailableScopeCheckoutsWrite                AvailableScope = "checkouts:write"
	AvailableScopeTransactionsRead              AvailableScope = "transactions:read"
	AvailableScopeTransactionsWrite             AvailableScope = "transactions:write"
	AvailableScopePayoutsRead                   AvailableScope = "payouts:read"
	AvailableScopePayoutsWrite                  AvailableScope = "payouts:write"
	AvailableScopeProductsRead                  AvailableScope = "products:read"
	AvailableScopeProductsWrite                 AvailableScope = "products:write"
	AvailableScopeBenefitsRead                  AvailableScope = "benefits:read"
	AvailableScopeBenefitsWrite                 AvailableScope = "benefits:write"
	AvailableScopeEventsRead                    AvailableScope = "events:read"
	AvailableScopeEventsWrite                   AvailableScope = "events:write"
	AvailableScopeMetersRead                    AvailableScope = "meters:read"
	AvailableScopeMetersWrite                   AvailableScope = "meters:write"
	AvailableScopeFilesRead                     AvailableScope = "files:read"
	AvailableScopeFilesWrite                    AvailableScope = "files:write"
	AvailableScopeSubscriptionsRead             AvailableScope = "subscriptions:read"
	AvailableScopeSubscriptionsWrite            AvailableScope = "subscriptions:write"
	AvailableScopeCustomersRead                 AvailableScope = "customers:read"
	AvailableScopeCustomersWrite                AvailableScope = "customers:write"
	AvailableScopeMembersRead                   AvailableScope = "members:read"
	AvailableScopeMembersWrite                  AvailableScope = "members:write"
	AvailableScopeWalletsRead                   AvailableScope = "wallets:read"
	AvailableScopeWalletsWrite                  AvailableScope = "wallets:write"
	AvailableScopeDisputesRead                  AvailableScope = "disputes:read"
	AvailableScopeCustomerMetersRead            AvailableScope = "customer_meters:read"
	AvailableScopeCustomerSessionsWrite         AvailableScope = "customer_sessions:write"
	AvailableScopeMemberSessionsWrite           AvailableScope = "member_sessions:write"
	AvailableScopeCustomerSeatsRead             AvailableScope = "customer_seats:read"
	AvailableScopeCustomerSeatsWrite            AvailableScope = "customer_seats:write"
	AvailableScopeOrdersRead                    AvailableScope = "orders:read"
	AvailableScopeOrdersWrite                   AvailableScope = "orders:write"
	AvailableScopeRefundsRead                   AvailableScope = "refunds:read"
	AvailableScopeRefundsWrite                  AvailableScope = "refunds:write"
	AvailableScopePaymentsRead                  AvailableScope = "payments:read"
	AvailableScopeMetricsRead                   AvailableScope = "metrics:read"
	AvailableScopeMetricsWrite                  AvailableScope = "metrics:write"
	AvailableScopeWebhooksRead                  AvailableScope = "webhooks:read"
	AvailableScopeWebhooksWrite                 AvailableScope = "webhooks:write"
	AvailableScopeLicenseKeysRead               AvailableScope = "license_keys:read"
	AvailableScopeLicenseKeysWrite              AvailableScope = "license_keys:write"
	AvailableScopeCustomerPortalRead            AvailableScope = "customer_portal:read"
	AvailableScopeCustomerPortalWrite           AvailableScope = "customer_portal:write"
	AvailableScopeNotificationsRead             AvailableScope = "notifications:read"
	AvailableScopeNotificationsWrite            AvailableScope = "notifications:write"
	AvailableScopeNotificationRecipientsRead    AvailableScope = "notification_recipients:read"
	AvailableScopeNotificationRecipientsWrite   AvailableScope = "notification_recipients:write"
	AvailableScopeOrganizationAccessTokensRead  AvailableScope = "organization_access_tokens:read"
	AvailableScopeOrganizationAccessTokensWrite AvailableScope = "organization_access_tokens:write"
)

func (AvailableScope) ToPointer ¶ added in v0.13.0

func (e AvailableScope) ToPointer() *AvailableScope

func (*AvailableScope) UnmarshalJSON ¶ added in v0.13.0

func (e *AvailableScope) UnmarshalJSON(data []byte) error

type AverageOrderValue ¶ added in v0.4.17

type AverageOrderValue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type AverageOrderValueType
}

func CreateAverageOrderValueInteger ¶ added in v0.4.17

func CreateAverageOrderValueInteger(integer int64) AverageOrderValue

func CreateAverageOrderValueNumber ¶ added in v0.4.17

func CreateAverageOrderValueNumber(number float64) AverageOrderValue

func (AverageOrderValue) MarshalJSON ¶ added in v0.4.17

func (u AverageOrderValue) MarshalJSON() ([]byte, error)

func (*AverageOrderValue) UnmarshalJSON ¶ added in v0.4.17

func (u *AverageOrderValue) UnmarshalJSON(data []byte) error

type AverageOrderValueType ¶ added in v0.4.17

type AverageOrderValueType string
const (
	AverageOrderValueTypeInteger AverageOrderValueType = "integer"
	AverageOrderValueTypeNumber  AverageOrderValueType = "number"
)

type AverageRevenuePerUser ¶ added in v0.12.0

type AverageRevenuePerUser struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type AverageRevenuePerUserType
}

func CreateAverageRevenuePerUserInteger ¶ added in v0.12.0

func CreateAverageRevenuePerUserInteger(integer int64) AverageRevenuePerUser

func CreateAverageRevenuePerUserNumber ¶ added in v0.12.0

func CreateAverageRevenuePerUserNumber(number float64) AverageRevenuePerUser

func (AverageRevenuePerUser) MarshalJSON ¶ added in v0.12.0

func (u AverageRevenuePerUser) MarshalJSON() ([]byte, error)

func (*AverageRevenuePerUser) UnmarshalJSON ¶ added in v0.12.0

func (u *AverageRevenuePerUser) UnmarshalJSON(data []byte) error

type AverageRevenuePerUserType ¶ added in v0.12.0

type AverageRevenuePerUserType string
const (
	AverageRevenuePerUserTypeInteger AverageRevenuePerUserType = "integer"
	AverageRevenuePerUserTypeNumber  AverageRevenuePerUserType = "number"
)

type BalanceCreditOrderEvent ¶ added in v0.13.0

type BalanceCreditOrderEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata BalanceCreditOrderMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

BalanceCreditOrderEvent - An event created by Polar when an order is paid via customer balance.

func (*BalanceCreditOrderEvent) GetChildCount ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetChildCount() *int64

func (*BalanceCreditOrderEvent) GetCustomer ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetCustomer() *Customer

func (*BalanceCreditOrderEvent) GetCustomerID ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetCustomerID() *string

func (*BalanceCreditOrderEvent) GetCustomerIndividual ¶ added in v0.16.0

func (b *BalanceCreditOrderEvent) GetCustomerIndividual() *CustomerIndividual

func (*BalanceCreditOrderEvent) GetCustomerTeam ¶ added in v0.16.0

func (b *BalanceCreditOrderEvent) GetCustomerTeam() *CustomerTeam

func (*BalanceCreditOrderEvent) GetExternalCustomerID ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetExternalCustomerID() *string

func (*BalanceCreditOrderEvent) GetExternalMemberID ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetExternalMemberID() *string

func (*BalanceCreditOrderEvent) GetID ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetID() string

func (*BalanceCreditOrderEvent) GetLabel ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetLabel() string

func (*BalanceCreditOrderEvent) GetMemberID ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetMemberID() *string

func (*BalanceCreditOrderEvent) GetMetadata ¶ added in v0.13.0

func (*BalanceCreditOrderEvent) GetName ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetName() string

func (*BalanceCreditOrderEvent) GetOrganizationID ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetOrganizationID() string

func (*BalanceCreditOrderEvent) GetParentID ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetParentID() *string

func (*BalanceCreditOrderEvent) GetSource ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetSource() string

func (*BalanceCreditOrderEvent) GetTimestamp ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) GetTimestamp() time.Time

func (BalanceCreditOrderEvent) MarshalJSON ¶ added in v0.13.0

func (b BalanceCreditOrderEvent) MarshalJSON() ([]byte, error)

func (*BalanceCreditOrderEvent) UnmarshalJSON ¶ added in v0.13.0

func (b *BalanceCreditOrderEvent) UnmarshalJSON(data []byte) error

type BalanceCreditOrderMetadata ¶ added in v0.13.0

type BalanceCreditOrderMetadata struct {
	OrderID        string  `json:"order_id"`
	ProductID      *string `json:"product_id,omitempty"`
	SubscriptionID *string `json:"subscription_id,omitempty"`
	Amount         int64   `json:"amount"`
	Currency       string  `json:"currency"`
	TaxAmount      int64   `json:"tax_amount"`
	TaxState       *string `json:"tax_state,omitempty"`
	TaxCountry     *string `json:"tax_country,omitempty"`
	Fee            int64   `json:"fee"`
}

func (*BalanceCreditOrderMetadata) GetAmount ¶ added in v0.13.0

func (b *BalanceCreditOrderMetadata) GetAmount() int64

func (*BalanceCreditOrderMetadata) GetCurrency ¶ added in v0.13.0

func (b *BalanceCreditOrderMetadata) GetCurrency() string

func (*BalanceCreditOrderMetadata) GetFee ¶ added in v0.13.0

func (b *BalanceCreditOrderMetadata) GetFee() int64

func (*BalanceCreditOrderMetadata) GetOrderID ¶ added in v0.13.0

func (b *BalanceCreditOrderMetadata) GetOrderID() string

func (*BalanceCreditOrderMetadata) GetProductID ¶ added in v0.13.0

func (b *BalanceCreditOrderMetadata) GetProductID() *string

func (*BalanceCreditOrderMetadata) GetSubscriptionID ¶ added in v0.13.0

func (b *BalanceCreditOrderMetadata) GetSubscriptionID() *string

func (*BalanceCreditOrderMetadata) GetTaxAmount ¶ added in v0.13.0

func (b *BalanceCreditOrderMetadata) GetTaxAmount() int64

func (*BalanceCreditOrderMetadata) GetTaxCountry ¶ added in v0.13.0

func (b *BalanceCreditOrderMetadata) GetTaxCountry() *string

func (*BalanceCreditOrderMetadata) GetTaxState ¶ added in v0.13.0

func (b *BalanceCreditOrderMetadata) GetTaxState() *string

func (BalanceCreditOrderMetadata) MarshalJSON ¶ added in v0.13.0

func (b BalanceCreditOrderMetadata) MarshalJSON() ([]byte, error)

func (*BalanceCreditOrderMetadata) UnmarshalJSON ¶ added in v0.13.0

func (b *BalanceCreditOrderMetadata) UnmarshalJSON(data []byte) error

type BalanceDisputeEvent ¶ added in v0.13.0

type BalanceDisputeEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata BalanceDisputeMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

BalanceDisputeEvent - An event created by Polar when an order is disputed.

func (*BalanceDisputeEvent) GetChildCount ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetChildCount() *int64

func (*BalanceDisputeEvent) GetCustomer ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetCustomer() *Customer

func (*BalanceDisputeEvent) GetCustomerID ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetCustomerID() *string

func (*BalanceDisputeEvent) GetCustomerIndividual ¶ added in v0.16.0

func (b *BalanceDisputeEvent) GetCustomerIndividual() *CustomerIndividual

func (*BalanceDisputeEvent) GetCustomerTeam ¶ added in v0.16.0

func (b *BalanceDisputeEvent) GetCustomerTeam() *CustomerTeam

func (*BalanceDisputeEvent) GetExternalCustomerID ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetExternalCustomerID() *string

func (*BalanceDisputeEvent) GetExternalMemberID ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetExternalMemberID() *string

func (*BalanceDisputeEvent) GetID ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetID() string

func (*BalanceDisputeEvent) GetLabel ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetLabel() string

func (*BalanceDisputeEvent) GetMemberID ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetMemberID() *string

func (*BalanceDisputeEvent) GetMetadata ¶ added in v0.13.0

func (*BalanceDisputeEvent) GetName ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetName() string

func (*BalanceDisputeEvent) GetOrganizationID ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetOrganizationID() string

func (*BalanceDisputeEvent) GetParentID ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetParentID() *string

func (*BalanceDisputeEvent) GetSource ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetSource() string

func (*BalanceDisputeEvent) GetTimestamp ¶ added in v0.13.0

func (b *BalanceDisputeEvent) GetTimestamp() time.Time

func (BalanceDisputeEvent) MarshalJSON ¶ added in v0.13.0

func (b BalanceDisputeEvent) MarshalJSON() ([]byte, error)

func (*BalanceDisputeEvent) UnmarshalJSON ¶ added in v0.13.0

func (b *BalanceDisputeEvent) UnmarshalJSON(data []byte) error

type BalanceDisputeMetadata ¶ added in v0.13.0

type BalanceDisputeMetadata struct {
	TransactionID       string   `json:"transaction_id"`
	DisputeID           string   `json:"dispute_id"`
	OrderID             *string  `json:"order_id,omitempty"`
	OrderCreatedAt      *string  `json:"order_created_at,omitempty"`
	ProductID           *string  `json:"product_id,omitempty"`
	SubscriptionID      *string  `json:"subscription_id,omitempty"`
	Amount              int64    `json:"amount"`
	Currency            string   `json:"currency"`
	PresentmentAmount   int64    `json:"presentment_amount"`
	PresentmentCurrency string   `json:"presentment_currency"`
	TaxAmount           int64    `json:"tax_amount"`
	TaxState            *string  `json:"tax_state,omitempty"`
	TaxCountry          *string  `json:"tax_country,omitempty"`
	Fee                 int64    `json:"fee"`
	ExchangeRate        *float64 `json:"exchange_rate,omitempty"`
}

func (*BalanceDisputeMetadata) GetAmount ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetAmount() int64

func (*BalanceDisputeMetadata) GetCurrency ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetCurrency() string

func (*BalanceDisputeMetadata) GetDisputeID ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetDisputeID() string

func (*BalanceDisputeMetadata) GetExchangeRate ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetExchangeRate() *float64

func (*BalanceDisputeMetadata) GetFee ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetFee() int64

func (*BalanceDisputeMetadata) GetOrderCreatedAt ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetOrderCreatedAt() *string

func (*BalanceDisputeMetadata) GetOrderID ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetOrderID() *string

func (*BalanceDisputeMetadata) GetPresentmentAmount ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetPresentmentAmount() int64

func (*BalanceDisputeMetadata) GetPresentmentCurrency ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetPresentmentCurrency() string

func (*BalanceDisputeMetadata) GetProductID ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetProductID() *string

func (*BalanceDisputeMetadata) GetSubscriptionID ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetSubscriptionID() *string

func (*BalanceDisputeMetadata) GetTaxAmount ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetTaxAmount() int64

func (*BalanceDisputeMetadata) GetTaxCountry ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetTaxCountry() *string

func (*BalanceDisputeMetadata) GetTaxState ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetTaxState() *string

func (*BalanceDisputeMetadata) GetTransactionID ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) GetTransactionID() string

func (BalanceDisputeMetadata) MarshalJSON ¶ added in v0.13.0

func (b BalanceDisputeMetadata) MarshalJSON() ([]byte, error)

func (*BalanceDisputeMetadata) UnmarshalJSON ¶ added in v0.13.0

func (b *BalanceDisputeMetadata) UnmarshalJSON(data []byte) error

type BalanceDisputeReversalEvent ¶ added in v0.13.0

type BalanceDisputeReversalEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata BalanceDisputeMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

BalanceDisputeReversalEvent - An event created by Polar when a dispute is won and funds are reinstated.

func (*BalanceDisputeReversalEvent) GetChildCount ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetChildCount() *int64

func (*BalanceDisputeReversalEvent) GetCustomer ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetCustomer() *Customer

func (*BalanceDisputeReversalEvent) GetCustomerID ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetCustomerID() *string

func (*BalanceDisputeReversalEvent) GetCustomerIndividual ¶ added in v0.16.0

func (b *BalanceDisputeReversalEvent) GetCustomerIndividual() *CustomerIndividual

func (*BalanceDisputeReversalEvent) GetCustomerTeam ¶ added in v0.16.0

func (b *BalanceDisputeReversalEvent) GetCustomerTeam() *CustomerTeam

func (*BalanceDisputeReversalEvent) GetExternalCustomerID ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetExternalCustomerID() *string

func (*BalanceDisputeReversalEvent) GetExternalMemberID ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetExternalMemberID() *string

func (*BalanceDisputeReversalEvent) GetID ¶ added in v0.13.0

func (*BalanceDisputeReversalEvent) GetLabel ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetLabel() string

func (*BalanceDisputeReversalEvent) GetMemberID ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetMemberID() *string

func (*BalanceDisputeReversalEvent) GetMetadata ¶ added in v0.13.0

func (*BalanceDisputeReversalEvent) GetName ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetName() string

func (*BalanceDisputeReversalEvent) GetOrganizationID ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetOrganizationID() string

func (*BalanceDisputeReversalEvent) GetParentID ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetParentID() *string

func (*BalanceDisputeReversalEvent) GetSource ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetSource() string

func (*BalanceDisputeReversalEvent) GetTimestamp ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) GetTimestamp() time.Time

func (BalanceDisputeReversalEvent) MarshalJSON ¶ added in v0.13.0

func (b BalanceDisputeReversalEvent) MarshalJSON() ([]byte, error)

func (*BalanceDisputeReversalEvent) UnmarshalJSON ¶ added in v0.13.0

func (b *BalanceDisputeReversalEvent) UnmarshalJSON(data []byte) error

type BalanceOrderEvent ¶ added in v0.13.0

type BalanceOrderEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata BalanceOrderMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

BalanceOrderEvent - An event created by Polar when an order is paid.

func (*BalanceOrderEvent) GetChildCount ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetChildCount() *int64

func (*BalanceOrderEvent) GetCustomer ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetCustomer() *Customer

func (*BalanceOrderEvent) GetCustomerID ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetCustomerID() *string

func (*BalanceOrderEvent) GetCustomerIndividual ¶ added in v0.16.0

func (b *BalanceOrderEvent) GetCustomerIndividual() *CustomerIndividual

func (*BalanceOrderEvent) GetCustomerTeam ¶ added in v0.16.0

func (b *BalanceOrderEvent) GetCustomerTeam() *CustomerTeam

func (*BalanceOrderEvent) GetExternalCustomerID ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetExternalCustomerID() *string

func (*BalanceOrderEvent) GetExternalMemberID ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetExternalMemberID() *string

func (*BalanceOrderEvent) GetID ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetID() string

func (*BalanceOrderEvent) GetLabel ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetLabel() string

func (*BalanceOrderEvent) GetMemberID ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetMemberID() *string

func (*BalanceOrderEvent) GetMetadata ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetMetadata() BalanceOrderMetadata

func (*BalanceOrderEvent) GetName ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetName() string

func (*BalanceOrderEvent) GetOrganizationID ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetOrganizationID() string

func (*BalanceOrderEvent) GetParentID ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetParentID() *string

func (*BalanceOrderEvent) GetSource ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetSource() string

func (*BalanceOrderEvent) GetTimestamp ¶ added in v0.13.0

func (b *BalanceOrderEvent) GetTimestamp() time.Time

func (BalanceOrderEvent) MarshalJSON ¶ added in v0.13.0

func (b BalanceOrderEvent) MarshalJSON() ([]byte, error)

func (*BalanceOrderEvent) UnmarshalJSON ¶ added in v0.13.0

func (b *BalanceOrderEvent) UnmarshalJSON(data []byte) error

type BalanceOrderMetadata ¶ added in v0.13.0

type BalanceOrderMetadata struct {
	TransactionID       string   `json:"transaction_id"`
	OrderID             string   `json:"order_id"`
	ProductID           *string  `json:"product_id,omitempty"`
	SubscriptionID      *string  `json:"subscription_id,omitempty"`
	Amount              int64    `json:"amount"`
	NetAmount           *int64   `json:"net_amount,omitempty"`
	Currency            string   `json:"currency"`
	PresentmentAmount   int64    `json:"presentment_amount"`
	PresentmentCurrency string   `json:"presentment_currency"`
	TaxAmount           int64    `json:"tax_amount"`
	TaxState            *string  `json:"tax_state,omitempty"`
	TaxCountry          *string  `json:"tax_country,omitempty"`
	Fee                 int64    `json:"fee"`
	ExchangeRate        *float64 `json:"exchange_rate,omitempty"`
}

func (*BalanceOrderMetadata) GetAmount ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetAmount() int64

func (*BalanceOrderMetadata) GetCurrency ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetCurrency() string

func (*BalanceOrderMetadata) GetExchangeRate ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetExchangeRate() *float64

func (*BalanceOrderMetadata) GetFee ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetFee() int64

func (*BalanceOrderMetadata) GetNetAmount ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetNetAmount() *int64

func (*BalanceOrderMetadata) GetOrderID ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetOrderID() string

func (*BalanceOrderMetadata) GetPresentmentAmount ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetPresentmentAmount() int64

func (*BalanceOrderMetadata) GetPresentmentCurrency ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetPresentmentCurrency() string

func (*BalanceOrderMetadata) GetProductID ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetProductID() *string

func (*BalanceOrderMetadata) GetSubscriptionID ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetSubscriptionID() *string

func (*BalanceOrderMetadata) GetTaxAmount ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetTaxAmount() int64

func (*BalanceOrderMetadata) GetTaxCountry ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetTaxCountry() *string

func (*BalanceOrderMetadata) GetTaxState ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetTaxState() *string

func (*BalanceOrderMetadata) GetTransactionID ¶ added in v0.13.0

func (b *BalanceOrderMetadata) GetTransactionID() string

func (BalanceOrderMetadata) MarshalJSON ¶ added in v0.13.0

func (b BalanceOrderMetadata) MarshalJSON() ([]byte, error)

func (*BalanceOrderMetadata) UnmarshalJSON ¶ added in v0.13.0

func (b *BalanceOrderMetadata) UnmarshalJSON(data []byte) error

type BalanceRefundEvent ¶ added in v0.13.0

type BalanceRefundEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata BalanceRefundMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

BalanceRefundEvent - An event created by Polar when an order is refunded.

func (*BalanceRefundEvent) GetChildCount ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetChildCount() *int64

func (*BalanceRefundEvent) GetCustomer ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetCustomer() *Customer

func (*BalanceRefundEvent) GetCustomerID ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetCustomerID() *string

func (*BalanceRefundEvent) GetCustomerIndividual ¶ added in v0.16.0

func (b *BalanceRefundEvent) GetCustomerIndividual() *CustomerIndividual

func (*BalanceRefundEvent) GetCustomerTeam ¶ added in v0.16.0

func (b *BalanceRefundEvent) GetCustomerTeam() *CustomerTeam

func (*BalanceRefundEvent) GetExternalCustomerID ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetExternalCustomerID() *string

func (*BalanceRefundEvent) GetExternalMemberID ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetExternalMemberID() *string

func (*BalanceRefundEvent) GetID ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetID() string

func (*BalanceRefundEvent) GetLabel ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetLabel() string

func (*BalanceRefundEvent) GetMemberID ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetMemberID() *string

func (*BalanceRefundEvent) GetMetadata ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetMetadata() BalanceRefundMetadata

func (*BalanceRefundEvent) GetName ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetName() string

func (*BalanceRefundEvent) GetOrganizationID ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetOrganizationID() string

func (*BalanceRefundEvent) GetParentID ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetParentID() *string

func (*BalanceRefundEvent) GetSource ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetSource() string

func (*BalanceRefundEvent) GetTimestamp ¶ added in v0.13.0

func (b *BalanceRefundEvent) GetTimestamp() time.Time

func (BalanceRefundEvent) MarshalJSON ¶ added in v0.13.0

func (b BalanceRefundEvent) MarshalJSON() ([]byte, error)

func (*BalanceRefundEvent) UnmarshalJSON ¶ added in v0.13.0

func (b *BalanceRefundEvent) UnmarshalJSON(data []byte) error

type BalanceRefundMetadata ¶ added in v0.13.0

type BalanceRefundMetadata struct {
	TransactionID       string   `json:"transaction_id"`
	RefundID            string   `json:"refund_id"`
	OrderID             *string  `json:"order_id,omitempty"`
	OrderCreatedAt      *string  `json:"order_created_at,omitempty"`
	ProductID           *string  `json:"product_id,omitempty"`
	SubscriptionID      *string  `json:"subscription_id,omitempty"`
	Amount              int64    `json:"amount"`
	Currency            string   `json:"currency"`
	PresentmentAmount   int64    `json:"presentment_amount"`
	PresentmentCurrency string   `json:"presentment_currency"`
	RefundableAmount    *int64   `json:"refundable_amount,omitempty"`
	TaxAmount           int64    `json:"tax_amount"`
	TaxState            *string  `json:"tax_state,omitempty"`
	TaxCountry          *string  `json:"tax_country,omitempty"`
	Fee                 int64    `json:"fee"`
	ExchangeRate        *float64 `json:"exchange_rate,omitempty"`
}

func (*BalanceRefundMetadata) GetAmount ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetAmount() int64

func (*BalanceRefundMetadata) GetCurrency ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetCurrency() string

func (*BalanceRefundMetadata) GetExchangeRate ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetExchangeRate() *float64

func (*BalanceRefundMetadata) GetFee ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetFee() int64

func (*BalanceRefundMetadata) GetOrderCreatedAt ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetOrderCreatedAt() *string

func (*BalanceRefundMetadata) GetOrderID ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetOrderID() *string

func (*BalanceRefundMetadata) GetPresentmentAmount ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetPresentmentAmount() int64

func (*BalanceRefundMetadata) GetPresentmentCurrency ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetPresentmentCurrency() string

func (*BalanceRefundMetadata) GetProductID ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetProductID() *string

func (*BalanceRefundMetadata) GetRefundID ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetRefundID() string

func (*BalanceRefundMetadata) GetRefundableAmount ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetRefundableAmount() *int64

func (*BalanceRefundMetadata) GetSubscriptionID ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetSubscriptionID() *string

func (*BalanceRefundMetadata) GetTaxAmount ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetTaxAmount() int64

func (*BalanceRefundMetadata) GetTaxCountry ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetTaxCountry() *string

func (*BalanceRefundMetadata) GetTaxState ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetTaxState() *string

func (*BalanceRefundMetadata) GetTransactionID ¶ added in v0.13.0

func (b *BalanceRefundMetadata) GetTransactionID() string

func (BalanceRefundMetadata) MarshalJSON ¶ added in v0.13.0

func (b BalanceRefundMetadata) MarshalJSON() ([]byte, error)

func (*BalanceRefundMetadata) UnmarshalJSON ¶ added in v0.13.0

func (b *BalanceRefundMetadata) UnmarshalJSON(data []byte) error

type BalanceRefundReversalEvent ¶ added in v0.13.0

type BalanceRefundReversalEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata BalanceRefundMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

BalanceRefundReversalEvent - An event created by Polar when a refund is reverted.

func (*BalanceRefundReversalEvent) GetChildCount ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetChildCount() *int64

func (*BalanceRefundReversalEvent) GetCustomer ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetCustomer() *Customer

func (*BalanceRefundReversalEvent) GetCustomerID ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetCustomerID() *string

func (*BalanceRefundReversalEvent) GetCustomerIndividual ¶ added in v0.16.0

func (b *BalanceRefundReversalEvent) GetCustomerIndividual() *CustomerIndividual

func (*BalanceRefundReversalEvent) GetCustomerTeam ¶ added in v0.16.0

func (b *BalanceRefundReversalEvent) GetCustomerTeam() *CustomerTeam

func (*BalanceRefundReversalEvent) GetExternalCustomerID ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetExternalCustomerID() *string

func (*BalanceRefundReversalEvent) GetExternalMemberID ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetExternalMemberID() *string

func (*BalanceRefundReversalEvent) GetID ¶ added in v0.13.0

func (*BalanceRefundReversalEvent) GetLabel ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetLabel() string

func (*BalanceRefundReversalEvent) GetMemberID ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetMemberID() *string

func (*BalanceRefundReversalEvent) GetMetadata ¶ added in v0.13.0

func (*BalanceRefundReversalEvent) GetName ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetName() string

func (*BalanceRefundReversalEvent) GetOrganizationID ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetOrganizationID() string

func (*BalanceRefundReversalEvent) GetParentID ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetParentID() *string

func (*BalanceRefundReversalEvent) GetSource ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetSource() string

func (*BalanceRefundReversalEvent) GetTimestamp ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) GetTimestamp() time.Time

func (BalanceRefundReversalEvent) MarshalJSON ¶ added in v0.13.0

func (b BalanceRefundReversalEvent) MarshalJSON() ([]byte, error)

func (*BalanceRefundReversalEvent) UnmarshalJSON ¶ added in v0.13.0

func (b *BalanceRefundReversalEvent) UnmarshalJSON(data []byte) error

type Benefit ¶

type Benefit struct {
	BenefitCustom           *BenefitCustom           `queryParam:"inline" union:"member"`
	BenefitDiscord          *BenefitDiscord          `queryParam:"inline" union:"member"`
	BenefitGitHubRepository *BenefitGitHubRepository `queryParam:"inline" union:"member"`
	BenefitDownloadables    *BenefitDownloadables    `queryParam:"inline" union:"member"`
	BenefitLicenseKeys      *BenefitLicenseKeys      `queryParam:"inline" union:"member"`
	BenefitMeterCredit      *BenefitMeterCredit      `queryParam:"inline" union:"member"`
	BenefitFeatureFlag      *BenefitFeatureFlag      `queryParam:"inline" union:"member"`

	Type BenefitUnionType
}

func CreateBenefitCustom ¶ added in v0.13.0

func CreateBenefitCustom(custom BenefitCustom) Benefit

func CreateBenefitDiscord ¶ added in v0.13.0

func CreateBenefitDiscord(discord BenefitDiscord) Benefit

func CreateBenefitDownloadables ¶ added in v0.13.0

func CreateBenefitDownloadables(downloadables BenefitDownloadables) Benefit

func CreateBenefitFeatureFlag ¶ added in v0.15.0

func CreateBenefitFeatureFlag(featureFlag BenefitFeatureFlag) Benefit

func CreateBenefitGithubRepository ¶ added in v0.13.0

func CreateBenefitGithubRepository(githubRepository BenefitGitHubRepository) Benefit

func CreateBenefitLicenseKeys ¶ added in v0.13.0

func CreateBenefitLicenseKeys(licenseKeys BenefitLicenseKeys) Benefit

func CreateBenefitMeterCredit ¶ added in v0.13.0

func CreateBenefitMeterCredit(meterCredit BenefitMeterCredit) Benefit

func (Benefit) MarshalJSON ¶

func (u Benefit) MarshalJSON() ([]byte, error)

func (*Benefit) UnmarshalJSON ¶

func (u *Benefit) UnmarshalJSON(data []byte) error

type BenefitCreate ¶

type BenefitCreate struct {
	BenefitCustomCreate           *BenefitCustomCreate           `queryParam:"inline" union:"member"`
	BenefitDiscordCreate          *BenefitDiscordCreate          `queryParam:"inline" union:"member"`
	BenefitGitHubRepositoryCreate *BenefitGitHubRepositoryCreate `queryParam:"inline" union:"member"`
	BenefitDownloadablesCreate    *BenefitDownloadablesCreate    `queryParam:"inline" union:"member"`
	BenefitLicenseKeysCreate      *BenefitLicenseKeysCreate      `queryParam:"inline" union:"member"`
	BenefitMeterCreditCreate      *BenefitMeterCreditCreate      `queryParam:"inline" union:"member"`
	BenefitFeatureFlagCreate      *BenefitFeatureFlagCreate      `queryParam:"inline" union:"member"`

	Type BenefitCreateType
}

func CreateBenefitCreateCustom ¶

func CreateBenefitCreateCustom(custom BenefitCustomCreate) BenefitCreate

func CreateBenefitCreateDiscord ¶

func CreateBenefitCreateDiscord(discord BenefitDiscordCreate) BenefitCreate

func CreateBenefitCreateDownloadables ¶

func CreateBenefitCreateDownloadables(downloadables BenefitDownloadablesCreate) BenefitCreate

func CreateBenefitCreateFeatureFlag ¶ added in v0.15.0

func CreateBenefitCreateFeatureFlag(featureFlag BenefitFeatureFlagCreate) BenefitCreate

func CreateBenefitCreateGithubRepository ¶

func CreateBenefitCreateGithubRepository(githubRepository BenefitGitHubRepositoryCreate) BenefitCreate

func CreateBenefitCreateLicenseKeys ¶

func CreateBenefitCreateLicenseKeys(licenseKeys BenefitLicenseKeysCreate) BenefitCreate

func CreateBenefitCreateMeterCredit ¶ added in v0.4.9

func CreateBenefitCreateMeterCredit(meterCredit BenefitMeterCreditCreate) BenefitCreate

func (BenefitCreate) MarshalJSON ¶

func (u BenefitCreate) MarshalJSON() ([]byte, error)

func (*BenefitCreate) UnmarshalJSON ¶

func (u *BenefitCreate) UnmarshalJSON(data []byte) error

type BenefitCreateType ¶

type BenefitCreateType string
const (
	BenefitCreateTypeCustom           BenefitCreateType = "custom"
	BenefitCreateTypeDiscord          BenefitCreateType = "discord"
	BenefitCreateTypeDownloadables    BenefitCreateType = "downloadables"
	BenefitCreateTypeFeatureFlag      BenefitCreateType = "feature_flag"
	BenefitCreateTypeGithubRepository BenefitCreateType = "github_repository"
	BenefitCreateTypeLicenseKeys      BenefitCreateType = "license_keys"
	BenefitCreateTypeMeterCredit      BenefitCreateType = "meter_credit"
)

type BenefitCustom ¶

type BenefitCustom struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	// Properties for a benefit of type `custom`.
	Properties BenefitCustomProperties `json:"properties"`
	// contains filtered or unexported fields
}

BenefitCustom - A benefit of type `custom`.

Use it to grant any kind of benefit that doesn't fit in the other types.

func (*BenefitCustom) GetCreatedAt ¶

func (b *BenefitCustom) GetCreatedAt() time.Time

func (*BenefitCustom) GetDeletable ¶

func (b *BenefitCustom) GetDeletable() bool

func (*BenefitCustom) GetDescription ¶

func (b *BenefitCustom) GetDescription() string

func (*BenefitCustom) GetID ¶

func (b *BenefitCustom) GetID() string

func (*BenefitCustom) GetMetadata ¶ added in v0.4.12

func (b *BenefitCustom) GetMetadata() map[string]MetadataOutputType

func (*BenefitCustom) GetModifiedAt ¶

func (b *BenefitCustom) GetModifiedAt() *time.Time

func (*BenefitCustom) GetOrganizationID ¶

func (b *BenefitCustom) GetOrganizationID() string

func (*BenefitCustom) GetProperties ¶

func (b *BenefitCustom) GetProperties() BenefitCustomProperties

func (*BenefitCustom) GetSelectable ¶

func (b *BenefitCustom) GetSelectable() bool

func (*BenefitCustom) GetType ¶

func (b *BenefitCustom) GetType() string

func (BenefitCustom) MarshalJSON ¶

func (b BenefitCustom) MarshalJSON() ([]byte, error)

func (*BenefitCustom) UnmarshalJSON ¶

func (b *BenefitCustom) UnmarshalJSON(data []byte) error

type BenefitCustomCreate ¶

type BenefitCustomCreate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitCustomCreateMetadata `json:"metadata,omitempty"`

	// The description of the benefit. Will be displayed on products having this benefit.
	Description string `json:"description"`
	// The ID of the organization owning the benefit. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
	// Properties for creating a benefit of type `custom`.
	Properties BenefitCustomCreateProperties `json:"properties"`
	// contains filtered or unexported fields
}

BenefitCustomCreate - Schema to create a benefit of type `custom`.

func (*BenefitCustomCreate) GetDescription ¶

func (b *BenefitCustomCreate) GetDescription() string

func (*BenefitCustomCreate) GetMetadata ¶ added in v0.4.12

func (*BenefitCustomCreate) GetOrganizationID ¶

func (b *BenefitCustomCreate) GetOrganizationID() *string

func (*BenefitCustomCreate) GetProperties ¶

func (*BenefitCustomCreate) GetType ¶

func (b *BenefitCustomCreate) GetType() string

func (BenefitCustomCreate) MarshalJSON ¶

func (b BenefitCustomCreate) MarshalJSON() ([]byte, error)

func (*BenefitCustomCreate) UnmarshalJSON ¶

func (b *BenefitCustomCreate) UnmarshalJSON(data []byte) error

type BenefitCustomCreateMetadata ¶ added in v0.4.12

type BenefitCustomCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitCustomCreateMetadataType
}

func CreateBenefitCustomCreateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitCustomCreateMetadataBoolean(boolean bool) BenefitCustomCreateMetadata

func CreateBenefitCustomCreateMetadataInteger ¶ added in v0.4.12

func CreateBenefitCustomCreateMetadataInteger(integer int64) BenefitCustomCreateMetadata

func CreateBenefitCustomCreateMetadataNumber ¶ added in v0.4.12

func CreateBenefitCustomCreateMetadataNumber(number float64) BenefitCustomCreateMetadata

func CreateBenefitCustomCreateMetadataStr ¶ added in v0.4.12

func CreateBenefitCustomCreateMetadataStr(str string) BenefitCustomCreateMetadata

func (BenefitCustomCreateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitCustomCreateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitCustomCreateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitCustomCreateMetadata) UnmarshalJSON(data []byte) error

type BenefitCustomCreateMetadataType ¶ added in v0.4.12

type BenefitCustomCreateMetadataType string
const (
	BenefitCustomCreateMetadataTypeStr     BenefitCustomCreateMetadataType = "str"
	BenefitCustomCreateMetadataTypeInteger BenefitCustomCreateMetadataType = "integer"
	BenefitCustomCreateMetadataTypeNumber  BenefitCustomCreateMetadataType = "number"
	BenefitCustomCreateMetadataTypeBoolean BenefitCustomCreateMetadataType = "boolean"
)

type BenefitCustomCreateProperties ¶

type BenefitCustomCreateProperties struct {
	Note *string `json:"note,omitempty"`
}

BenefitCustomCreateProperties - Properties for creating a benefit of type `custom`.

func (*BenefitCustomCreateProperties) GetNote ¶

func (b *BenefitCustomCreateProperties) GetNote() *string

func (BenefitCustomCreateProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitCustomCreateProperties) MarshalJSON() ([]byte, error)

func (*BenefitCustomCreateProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitCustomCreateProperties) UnmarshalJSON(data []byte) error

type BenefitCustomProperties ¶

type BenefitCustomProperties struct {
	Note *string `json:"note"`
}

BenefitCustomProperties - Properties for a benefit of type `custom`.

func (*BenefitCustomProperties) GetNote ¶

func (b *BenefitCustomProperties) GetNote() *string

func (BenefitCustomProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitCustomProperties) MarshalJSON() ([]byte, error)

func (*BenefitCustomProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitCustomProperties) UnmarshalJSON(data []byte) error

type BenefitCustomSubscriber ¶

type BenefitCustomSubscriber struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	Organization   BenefitSubscriberOrganization `json:"organization"`
	// Properties available to subscribers for a benefit of type `custom`.
	Properties BenefitCustomSubscriberProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitCustomSubscriber) GetCreatedAt ¶

func (b *BenefitCustomSubscriber) GetCreatedAt() time.Time

func (*BenefitCustomSubscriber) GetDeletable ¶

func (b *BenefitCustomSubscriber) GetDeletable() bool

func (*BenefitCustomSubscriber) GetDescription ¶

func (b *BenefitCustomSubscriber) GetDescription() string

func (*BenefitCustomSubscriber) GetID ¶

func (b *BenefitCustomSubscriber) GetID() string

func (*BenefitCustomSubscriber) GetMetadata ¶ added in v0.4.12

func (b *BenefitCustomSubscriber) GetMetadata() map[string]MetadataOutputType

func (*BenefitCustomSubscriber) GetModifiedAt ¶

func (b *BenefitCustomSubscriber) GetModifiedAt() *time.Time

func (*BenefitCustomSubscriber) GetOrganization ¶

func (*BenefitCustomSubscriber) GetOrganizationID ¶

func (b *BenefitCustomSubscriber) GetOrganizationID() string

func (*BenefitCustomSubscriber) GetProperties ¶

func (*BenefitCustomSubscriber) GetSelectable ¶

func (b *BenefitCustomSubscriber) GetSelectable() bool

func (*BenefitCustomSubscriber) GetType ¶

func (b *BenefitCustomSubscriber) GetType() string

func (BenefitCustomSubscriber) MarshalJSON ¶

func (b BenefitCustomSubscriber) MarshalJSON() ([]byte, error)

func (*BenefitCustomSubscriber) UnmarshalJSON ¶

func (b *BenefitCustomSubscriber) UnmarshalJSON(data []byte) error

type BenefitCustomSubscriberProperties ¶

type BenefitCustomSubscriberProperties struct {
	Note *string `json:"note"`
}

BenefitCustomSubscriberProperties - Properties available to subscribers for a benefit of type `custom`.

func (*BenefitCustomSubscriberProperties) GetNote ¶

func (BenefitCustomSubscriberProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitCustomSubscriberProperties) MarshalJSON() ([]byte, error)

func (*BenefitCustomSubscriberProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitCustomSubscriberProperties) UnmarshalJSON(data []byte) error

type BenefitCustomUpdate ¶

type BenefitCustomUpdate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitCustomUpdateMetadata `json:"metadata,omitempty"`
	// The description of the benefit. Will be displayed on products having this benefit.
	Description *string `json:"description,omitempty"`

	Properties *BenefitCustomProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

func (*BenefitCustomUpdate) GetDescription ¶

func (b *BenefitCustomUpdate) GetDescription() *string

func (*BenefitCustomUpdate) GetMetadata ¶ added in v0.4.12

func (*BenefitCustomUpdate) GetProperties ¶

func (b *BenefitCustomUpdate) GetProperties() *BenefitCustomProperties

func (*BenefitCustomUpdate) GetType ¶

func (b *BenefitCustomUpdate) GetType() string

func (BenefitCustomUpdate) MarshalJSON ¶

func (b BenefitCustomUpdate) MarshalJSON() ([]byte, error)

func (*BenefitCustomUpdate) UnmarshalJSON ¶

func (b *BenefitCustomUpdate) UnmarshalJSON(data []byte) error

type BenefitCustomUpdateMetadata ¶ added in v0.4.12

type BenefitCustomUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitCustomUpdateMetadataType
}

func CreateBenefitCustomUpdateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitCustomUpdateMetadataBoolean(boolean bool) BenefitCustomUpdateMetadata

func CreateBenefitCustomUpdateMetadataInteger ¶ added in v0.4.12

func CreateBenefitCustomUpdateMetadataInteger(integer int64) BenefitCustomUpdateMetadata

func CreateBenefitCustomUpdateMetadataNumber ¶ added in v0.4.12

func CreateBenefitCustomUpdateMetadataNumber(number float64) BenefitCustomUpdateMetadata

func CreateBenefitCustomUpdateMetadataStr ¶ added in v0.4.12

func CreateBenefitCustomUpdateMetadataStr(str string) BenefitCustomUpdateMetadata

func (BenefitCustomUpdateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitCustomUpdateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitCustomUpdateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitCustomUpdateMetadata) UnmarshalJSON(data []byte) error

type BenefitCustomUpdateMetadataType ¶ added in v0.4.12

type BenefitCustomUpdateMetadataType string
const (
	BenefitCustomUpdateMetadataTypeStr     BenefitCustomUpdateMetadataType = "str"
	BenefitCustomUpdateMetadataTypeInteger BenefitCustomUpdateMetadataType = "integer"
	BenefitCustomUpdateMetadataTypeNumber  BenefitCustomUpdateMetadataType = "number"
	BenefitCustomUpdateMetadataTypeBoolean BenefitCustomUpdateMetadataType = "boolean"
)

type BenefitCycledEvent ¶ added in v0.4.20

type BenefitCycledEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata BenefitGrantMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

BenefitCycledEvent - An event created by Polar when a benefit is cycled.

func (*BenefitCycledEvent) GetChildCount ¶ added in v0.12.0

func (b *BenefitCycledEvent) GetChildCount() *int64

func (*BenefitCycledEvent) GetCustomer ¶ added in v0.4.20

func (b *BenefitCycledEvent) GetCustomer() *Customer

func (*BenefitCycledEvent) GetCustomerID ¶ added in v0.4.20

func (b *BenefitCycledEvent) GetCustomerID() *string

func (*BenefitCycledEvent) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitCycledEvent) GetCustomerIndividual() *CustomerIndividual

func (*BenefitCycledEvent) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitCycledEvent) GetCustomerTeam() *CustomerTeam

func (*BenefitCycledEvent) GetExternalCustomerID ¶ added in v0.4.20

func (b *BenefitCycledEvent) GetExternalCustomerID() *string

func (*BenefitCycledEvent) GetExternalMemberID ¶ added in v0.13.0

func (b *BenefitCycledEvent) GetExternalMemberID() *string

func (*BenefitCycledEvent) GetID ¶ added in v0.4.20

func (b *BenefitCycledEvent) GetID() string

func (*BenefitCycledEvent) GetLabel ¶ added in v0.13.0

func (b *BenefitCycledEvent) GetLabel() string

func (*BenefitCycledEvent) GetMemberID ¶ added in v0.13.0

func (b *BenefitCycledEvent) GetMemberID() *string

func (*BenefitCycledEvent) GetMetadata ¶ added in v0.4.20

func (b *BenefitCycledEvent) GetMetadata() BenefitGrantMetadata

func (*BenefitCycledEvent) GetName ¶ added in v0.4.20

func (b *BenefitCycledEvent) GetName() string

func (*BenefitCycledEvent) GetOrganizationID ¶ added in v0.4.20

func (b *BenefitCycledEvent) GetOrganizationID() string

func (*BenefitCycledEvent) GetParentID ¶ added in v0.13.0

func (b *BenefitCycledEvent) GetParentID() *string

func (*BenefitCycledEvent) GetSource ¶ added in v0.4.20

func (b *BenefitCycledEvent) GetSource() string

func (*BenefitCycledEvent) GetTimestamp ¶ added in v0.4.20

func (b *BenefitCycledEvent) GetTimestamp() time.Time

func (BenefitCycledEvent) MarshalJSON ¶ added in v0.4.20

func (b BenefitCycledEvent) MarshalJSON() ([]byte, error)

func (*BenefitCycledEvent) UnmarshalJSON ¶ added in v0.4.20

func (b *BenefitCycledEvent) UnmarshalJSON(data []byte) error

type BenefitDiscord ¶

type BenefitDiscord struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	// Properties for a benefit of type `discord`.
	Properties BenefitDiscordProperties `json:"properties"`
	// contains filtered or unexported fields
}

BenefitDiscord - A benefit of type `discord`.

Use it to automatically invite your backers to a Discord server.

func (*BenefitDiscord) GetCreatedAt ¶

func (b *BenefitDiscord) GetCreatedAt() time.Time

func (*BenefitDiscord) GetDeletable ¶

func (b *BenefitDiscord) GetDeletable() bool

func (*BenefitDiscord) GetDescription ¶

func (b *BenefitDiscord) GetDescription() string

func (*BenefitDiscord) GetID ¶

func (b *BenefitDiscord) GetID() string

func (*BenefitDiscord) GetMetadata ¶ added in v0.4.12

func (b *BenefitDiscord) GetMetadata() map[string]MetadataOutputType

func (*BenefitDiscord) GetModifiedAt ¶

func (b *BenefitDiscord) GetModifiedAt() *time.Time

func (*BenefitDiscord) GetOrganizationID ¶

func (b *BenefitDiscord) GetOrganizationID() string

func (*BenefitDiscord) GetProperties ¶

func (b *BenefitDiscord) GetProperties() BenefitDiscordProperties

func (*BenefitDiscord) GetSelectable ¶

func (b *BenefitDiscord) GetSelectable() bool

func (*BenefitDiscord) GetType ¶

func (b *BenefitDiscord) GetType() string

func (BenefitDiscord) MarshalJSON ¶

func (b BenefitDiscord) MarshalJSON() ([]byte, error)

func (*BenefitDiscord) UnmarshalJSON ¶

func (b *BenefitDiscord) UnmarshalJSON(data []byte) error

type BenefitDiscordCreate ¶

type BenefitDiscordCreate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitDiscordCreateMetadata `json:"metadata,omitempty"`

	// The description of the benefit. Will be displayed on products having this benefit.
	Description string `json:"description"`
	// The ID of the organization owning the benefit. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
	// Properties to create a benefit of type `discord`.
	Properties BenefitDiscordCreateProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitDiscordCreate) GetDescription ¶

func (b *BenefitDiscordCreate) GetDescription() string

func (*BenefitDiscordCreate) GetMetadata ¶ added in v0.4.12

func (*BenefitDiscordCreate) GetOrganizationID ¶

func (b *BenefitDiscordCreate) GetOrganizationID() *string

func (*BenefitDiscordCreate) GetProperties ¶

func (*BenefitDiscordCreate) GetType ¶

func (b *BenefitDiscordCreate) GetType() string

func (BenefitDiscordCreate) MarshalJSON ¶

func (b BenefitDiscordCreate) MarshalJSON() ([]byte, error)

func (*BenefitDiscordCreate) UnmarshalJSON ¶

func (b *BenefitDiscordCreate) UnmarshalJSON(data []byte) error

type BenefitDiscordCreateMetadata ¶ added in v0.4.12

type BenefitDiscordCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitDiscordCreateMetadataType
}

func CreateBenefitDiscordCreateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitDiscordCreateMetadataBoolean(boolean bool) BenefitDiscordCreateMetadata

func CreateBenefitDiscordCreateMetadataInteger ¶ added in v0.4.12

func CreateBenefitDiscordCreateMetadataInteger(integer int64) BenefitDiscordCreateMetadata

func CreateBenefitDiscordCreateMetadataNumber ¶ added in v0.4.12

func CreateBenefitDiscordCreateMetadataNumber(number float64) BenefitDiscordCreateMetadata

func CreateBenefitDiscordCreateMetadataStr ¶ added in v0.4.12

func CreateBenefitDiscordCreateMetadataStr(str string) BenefitDiscordCreateMetadata

func (BenefitDiscordCreateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitDiscordCreateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitDiscordCreateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitDiscordCreateMetadata) UnmarshalJSON(data []byte) error

type BenefitDiscordCreateMetadataType ¶ added in v0.4.12

type BenefitDiscordCreateMetadataType string
const (
	BenefitDiscordCreateMetadataTypeStr     BenefitDiscordCreateMetadataType = "str"
	BenefitDiscordCreateMetadataTypeInteger BenefitDiscordCreateMetadataType = "integer"
	BenefitDiscordCreateMetadataTypeNumber  BenefitDiscordCreateMetadataType = "number"
	BenefitDiscordCreateMetadataTypeBoolean BenefitDiscordCreateMetadataType = "boolean"
)

type BenefitDiscordCreateProperties ¶

type BenefitDiscordCreateProperties struct {
	GuildToken string `json:"guild_token"`
	// The ID of the Discord role to grant.
	RoleID string `json:"role_id"`
	// Whether to kick the member from the Discord server on revocation.
	KickMember bool `json:"kick_member"`
}

BenefitDiscordCreateProperties - Properties to create a benefit of type `discord`.

func (*BenefitDiscordCreateProperties) GetGuildToken ¶

func (b *BenefitDiscordCreateProperties) GetGuildToken() string

func (*BenefitDiscordCreateProperties) GetKickMember ¶ added in v0.7.2

func (b *BenefitDiscordCreateProperties) GetKickMember() bool

func (*BenefitDiscordCreateProperties) GetRoleID ¶

func (b *BenefitDiscordCreateProperties) GetRoleID() string

func (BenefitDiscordCreateProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitDiscordCreateProperties) MarshalJSON() ([]byte, error)

func (*BenefitDiscordCreateProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitDiscordCreateProperties) UnmarshalJSON(data []byte) error

type BenefitDiscordProperties ¶

type BenefitDiscordProperties struct {
	// The ID of the Discord server.
	GuildID string `json:"guild_id"`
	// The ID of the Discord role to grant.
	RoleID string `json:"role_id"`
	// Whether to kick the member from the Discord server on revocation.
	KickMember bool   `json:"kick_member"`
	GuildToken string `json:"guild_token"`
}

BenefitDiscordProperties - Properties for a benefit of type `discord`.

func (*BenefitDiscordProperties) GetGuildID ¶

func (b *BenefitDiscordProperties) GetGuildID() string

func (*BenefitDiscordProperties) GetGuildToken ¶

func (b *BenefitDiscordProperties) GetGuildToken() string

func (*BenefitDiscordProperties) GetKickMember ¶ added in v0.7.2

func (b *BenefitDiscordProperties) GetKickMember() bool

func (*BenefitDiscordProperties) GetRoleID ¶

func (b *BenefitDiscordProperties) GetRoleID() string

func (BenefitDiscordProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitDiscordProperties) MarshalJSON() ([]byte, error)

func (*BenefitDiscordProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitDiscordProperties) UnmarshalJSON(data []byte) error

type BenefitDiscordSubscriber ¶

type BenefitDiscordSubscriber struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	Organization   BenefitSubscriberOrganization `json:"organization"`
	// Properties available to subscribers for a benefit of type `discord`.
	Properties BenefitDiscordSubscriberProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitDiscordSubscriber) GetCreatedAt ¶

func (b *BenefitDiscordSubscriber) GetCreatedAt() time.Time

func (*BenefitDiscordSubscriber) GetDeletable ¶

func (b *BenefitDiscordSubscriber) GetDeletable() bool

func (*BenefitDiscordSubscriber) GetDescription ¶

func (b *BenefitDiscordSubscriber) GetDescription() string

func (*BenefitDiscordSubscriber) GetID ¶

func (b *BenefitDiscordSubscriber) GetID() string

func (*BenefitDiscordSubscriber) GetMetadata ¶ added in v0.4.12

func (b *BenefitDiscordSubscriber) GetMetadata() map[string]MetadataOutputType

func (*BenefitDiscordSubscriber) GetModifiedAt ¶

func (b *BenefitDiscordSubscriber) GetModifiedAt() *time.Time

func (*BenefitDiscordSubscriber) GetOrganization ¶

func (*BenefitDiscordSubscriber) GetOrganizationID ¶

func (b *BenefitDiscordSubscriber) GetOrganizationID() string

func (*BenefitDiscordSubscriber) GetProperties ¶

func (*BenefitDiscordSubscriber) GetSelectable ¶

func (b *BenefitDiscordSubscriber) GetSelectable() bool

func (*BenefitDiscordSubscriber) GetType ¶

func (b *BenefitDiscordSubscriber) GetType() string

func (BenefitDiscordSubscriber) MarshalJSON ¶

func (b BenefitDiscordSubscriber) MarshalJSON() ([]byte, error)

func (*BenefitDiscordSubscriber) UnmarshalJSON ¶

func (b *BenefitDiscordSubscriber) UnmarshalJSON(data []byte) error

type BenefitDiscordSubscriberProperties ¶

type BenefitDiscordSubscriberProperties struct {
	// The ID of the Discord server.
	GuildID string `json:"guild_id"`
}

BenefitDiscordSubscriberProperties - Properties available to subscribers for a benefit of type `discord`.

func (*BenefitDiscordSubscriberProperties) GetGuildID ¶

func (BenefitDiscordSubscriberProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitDiscordSubscriberProperties) MarshalJSON() ([]byte, error)

func (*BenefitDiscordSubscriberProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitDiscordSubscriberProperties) UnmarshalJSON(data []byte) error

type BenefitDiscordUpdate ¶

type BenefitDiscordUpdate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitDiscordUpdateMetadata `json:"metadata,omitempty"`
	// The description of the benefit. Will be displayed on products having this benefit.
	Description *string `json:"description,omitempty"`

	Properties *BenefitDiscordCreateProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

func (*BenefitDiscordUpdate) GetDescription ¶

func (b *BenefitDiscordUpdate) GetDescription() *string

func (*BenefitDiscordUpdate) GetMetadata ¶ added in v0.4.12

func (*BenefitDiscordUpdate) GetProperties ¶

func (*BenefitDiscordUpdate) GetType ¶

func (b *BenefitDiscordUpdate) GetType() string

func (BenefitDiscordUpdate) MarshalJSON ¶

func (b BenefitDiscordUpdate) MarshalJSON() ([]byte, error)

func (*BenefitDiscordUpdate) UnmarshalJSON ¶

func (b *BenefitDiscordUpdate) UnmarshalJSON(data []byte) error

type BenefitDiscordUpdateMetadata ¶ added in v0.4.12

type BenefitDiscordUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitDiscordUpdateMetadataType
}

func CreateBenefitDiscordUpdateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitDiscordUpdateMetadataBoolean(boolean bool) BenefitDiscordUpdateMetadata

func CreateBenefitDiscordUpdateMetadataInteger ¶ added in v0.4.12

func CreateBenefitDiscordUpdateMetadataInteger(integer int64) BenefitDiscordUpdateMetadata

func CreateBenefitDiscordUpdateMetadataNumber ¶ added in v0.4.12

func CreateBenefitDiscordUpdateMetadataNumber(number float64) BenefitDiscordUpdateMetadata

func CreateBenefitDiscordUpdateMetadataStr ¶ added in v0.4.12

func CreateBenefitDiscordUpdateMetadataStr(str string) BenefitDiscordUpdateMetadata

func (BenefitDiscordUpdateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitDiscordUpdateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitDiscordUpdateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitDiscordUpdateMetadata) UnmarshalJSON(data []byte) error

type BenefitDiscordUpdateMetadataType ¶ added in v0.4.12

type BenefitDiscordUpdateMetadataType string
const (
	BenefitDiscordUpdateMetadataTypeStr     BenefitDiscordUpdateMetadataType = "str"
	BenefitDiscordUpdateMetadataTypeInteger BenefitDiscordUpdateMetadataType = "integer"
	BenefitDiscordUpdateMetadataTypeNumber  BenefitDiscordUpdateMetadataType = "number"
	BenefitDiscordUpdateMetadataTypeBoolean BenefitDiscordUpdateMetadataType = "boolean"
)

type BenefitDownloadables ¶

type BenefitDownloadables struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                         `json:"organization_id"`
	Metadata       map[string]MetadataOutputType  `json:"metadata"`
	Properties     BenefitDownloadablesProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitDownloadables) GetCreatedAt ¶

func (b *BenefitDownloadables) GetCreatedAt() time.Time

func (*BenefitDownloadables) GetDeletable ¶

func (b *BenefitDownloadables) GetDeletable() bool

func (*BenefitDownloadables) GetDescription ¶

func (b *BenefitDownloadables) GetDescription() string

func (*BenefitDownloadables) GetID ¶

func (b *BenefitDownloadables) GetID() string

func (*BenefitDownloadables) GetMetadata ¶ added in v0.4.12

func (b *BenefitDownloadables) GetMetadata() map[string]MetadataOutputType

func (*BenefitDownloadables) GetModifiedAt ¶

func (b *BenefitDownloadables) GetModifiedAt() *time.Time

func (*BenefitDownloadables) GetOrganizationID ¶

func (b *BenefitDownloadables) GetOrganizationID() string

func (*BenefitDownloadables) GetProperties ¶

func (*BenefitDownloadables) GetSelectable ¶

func (b *BenefitDownloadables) GetSelectable() bool

func (*BenefitDownloadables) GetType ¶

func (b *BenefitDownloadables) GetType() string

func (BenefitDownloadables) MarshalJSON ¶

func (b BenefitDownloadables) MarshalJSON() ([]byte, error)

func (*BenefitDownloadables) UnmarshalJSON ¶

func (b *BenefitDownloadables) UnmarshalJSON(data []byte) error

type BenefitDownloadablesCreate ¶

type BenefitDownloadablesCreate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitDownloadablesCreateMetadata `json:"metadata,omitempty"`

	// The description of the benefit. Will be displayed on products having this benefit.
	Description string `json:"description"`
	// The ID of the organization owning the benefit. **Required unless you use an organization token.**
	OrganizationID *string                              `json:"organization_id,omitempty"`
	Properties     BenefitDownloadablesCreateProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitDownloadablesCreate) GetDescription ¶

func (b *BenefitDownloadablesCreate) GetDescription() string

func (*BenefitDownloadablesCreate) GetMetadata ¶ added in v0.4.12

func (*BenefitDownloadablesCreate) GetOrganizationID ¶

func (b *BenefitDownloadablesCreate) GetOrganizationID() *string

func (*BenefitDownloadablesCreate) GetProperties ¶

func (*BenefitDownloadablesCreate) GetType ¶

func (b *BenefitDownloadablesCreate) GetType() string

func (BenefitDownloadablesCreate) MarshalJSON ¶

func (b BenefitDownloadablesCreate) MarshalJSON() ([]byte, error)

func (*BenefitDownloadablesCreate) UnmarshalJSON ¶

func (b *BenefitDownloadablesCreate) UnmarshalJSON(data []byte) error

type BenefitDownloadablesCreateMetadata ¶ added in v0.4.12

type BenefitDownloadablesCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitDownloadablesCreateMetadataType
}

func CreateBenefitDownloadablesCreateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitDownloadablesCreateMetadataBoolean(boolean bool) BenefitDownloadablesCreateMetadata

func CreateBenefitDownloadablesCreateMetadataInteger ¶ added in v0.4.12

func CreateBenefitDownloadablesCreateMetadataInteger(integer int64) BenefitDownloadablesCreateMetadata

func CreateBenefitDownloadablesCreateMetadataNumber ¶ added in v0.4.12

func CreateBenefitDownloadablesCreateMetadataNumber(number float64) BenefitDownloadablesCreateMetadata

func CreateBenefitDownloadablesCreateMetadataStr ¶ added in v0.4.12

func CreateBenefitDownloadablesCreateMetadataStr(str string) BenefitDownloadablesCreateMetadata

func (BenefitDownloadablesCreateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitDownloadablesCreateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitDownloadablesCreateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitDownloadablesCreateMetadata) UnmarshalJSON(data []byte) error

type BenefitDownloadablesCreateMetadataType ¶ added in v0.4.12

type BenefitDownloadablesCreateMetadataType string
const (
	BenefitDownloadablesCreateMetadataTypeStr     BenefitDownloadablesCreateMetadataType = "str"
	BenefitDownloadablesCreateMetadataTypeInteger BenefitDownloadablesCreateMetadataType = "integer"
	BenefitDownloadablesCreateMetadataTypeNumber  BenefitDownloadablesCreateMetadataType = "number"
	BenefitDownloadablesCreateMetadataTypeBoolean BenefitDownloadablesCreateMetadataType = "boolean"
)

type BenefitDownloadablesCreateProperties ¶

type BenefitDownloadablesCreateProperties struct {
	Archived map[string]bool `json:"archived,omitempty"`
	Files    []string        `json:"files"`
}

func (*BenefitDownloadablesCreateProperties) GetArchived ¶

func (b *BenefitDownloadablesCreateProperties) GetArchived() map[string]bool

func (*BenefitDownloadablesCreateProperties) GetFiles ¶

func (BenefitDownloadablesCreateProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitDownloadablesCreateProperties) MarshalJSON() ([]byte, error)

func (*BenefitDownloadablesCreateProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitDownloadablesCreateProperties) UnmarshalJSON(data []byte) error

type BenefitDownloadablesProperties ¶

type BenefitDownloadablesProperties struct {
	Archived map[string]bool `json:"archived"`
	Files    []string        `json:"files"`
}

func (*BenefitDownloadablesProperties) GetArchived ¶

func (b *BenefitDownloadablesProperties) GetArchived() map[string]bool

func (*BenefitDownloadablesProperties) GetFiles ¶

func (b *BenefitDownloadablesProperties) GetFiles() []string

func (BenefitDownloadablesProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitDownloadablesProperties) MarshalJSON() ([]byte, error)

func (*BenefitDownloadablesProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitDownloadablesProperties) UnmarshalJSON(data []byte) error

type BenefitDownloadablesSubscriber ¶

type BenefitDownloadablesSubscriber struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                                   `json:"organization_id"`
	Metadata       map[string]MetadataOutputType            `json:"metadata"`
	Organization   BenefitSubscriberOrganization            `json:"organization"`
	Properties     BenefitDownloadablesSubscriberProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitDownloadablesSubscriber) GetCreatedAt ¶

func (b *BenefitDownloadablesSubscriber) GetCreatedAt() time.Time

func (*BenefitDownloadablesSubscriber) GetDeletable ¶

func (b *BenefitDownloadablesSubscriber) GetDeletable() bool

func (*BenefitDownloadablesSubscriber) GetDescription ¶

func (b *BenefitDownloadablesSubscriber) GetDescription() string

func (*BenefitDownloadablesSubscriber) GetID ¶

func (*BenefitDownloadablesSubscriber) GetMetadata ¶ added in v0.4.12

func (*BenefitDownloadablesSubscriber) GetModifiedAt ¶

func (b *BenefitDownloadablesSubscriber) GetModifiedAt() *time.Time

func (*BenefitDownloadablesSubscriber) GetOrganization ¶

func (*BenefitDownloadablesSubscriber) GetOrganizationID ¶

func (b *BenefitDownloadablesSubscriber) GetOrganizationID() string

func (*BenefitDownloadablesSubscriber) GetProperties ¶

func (*BenefitDownloadablesSubscriber) GetSelectable ¶

func (b *BenefitDownloadablesSubscriber) GetSelectable() bool

func (*BenefitDownloadablesSubscriber) GetType ¶

func (BenefitDownloadablesSubscriber) MarshalJSON ¶

func (b BenefitDownloadablesSubscriber) MarshalJSON() ([]byte, error)

func (*BenefitDownloadablesSubscriber) UnmarshalJSON ¶

func (b *BenefitDownloadablesSubscriber) UnmarshalJSON(data []byte) error

type BenefitDownloadablesSubscriberProperties ¶

type BenefitDownloadablesSubscriberProperties struct {
	ActiveFiles []string `json:"active_files"`
}

func (*BenefitDownloadablesSubscriberProperties) GetActiveFiles ¶

func (b *BenefitDownloadablesSubscriberProperties) GetActiveFiles() []string

func (BenefitDownloadablesSubscriberProperties) MarshalJSON ¶ added in v0.8.4

func (*BenefitDownloadablesSubscriberProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitDownloadablesSubscriberProperties) UnmarshalJSON(data []byte) error

type BenefitDownloadablesUpdate ¶

type BenefitDownloadablesUpdate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitDownloadablesUpdateMetadata `json:"metadata,omitempty"`
	// The description of the benefit. Will be displayed on products having this benefit.
	Description *string `json:"description,omitempty"`

	Properties *BenefitDownloadablesCreateProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

func (*BenefitDownloadablesUpdate) GetDescription ¶

func (b *BenefitDownloadablesUpdate) GetDescription() *string

func (*BenefitDownloadablesUpdate) GetMetadata ¶ added in v0.4.12

func (*BenefitDownloadablesUpdate) GetProperties ¶

func (*BenefitDownloadablesUpdate) GetType ¶

func (b *BenefitDownloadablesUpdate) GetType() string

func (BenefitDownloadablesUpdate) MarshalJSON ¶

func (b BenefitDownloadablesUpdate) MarshalJSON() ([]byte, error)

func (*BenefitDownloadablesUpdate) UnmarshalJSON ¶

func (b *BenefitDownloadablesUpdate) UnmarshalJSON(data []byte) error

type BenefitDownloadablesUpdateMetadata ¶ added in v0.4.12

type BenefitDownloadablesUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitDownloadablesUpdateMetadataType
}

func CreateBenefitDownloadablesUpdateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitDownloadablesUpdateMetadataBoolean(boolean bool) BenefitDownloadablesUpdateMetadata

func CreateBenefitDownloadablesUpdateMetadataInteger ¶ added in v0.4.12

func CreateBenefitDownloadablesUpdateMetadataInteger(integer int64) BenefitDownloadablesUpdateMetadata

func CreateBenefitDownloadablesUpdateMetadataNumber ¶ added in v0.4.12

func CreateBenefitDownloadablesUpdateMetadataNumber(number float64) BenefitDownloadablesUpdateMetadata

func CreateBenefitDownloadablesUpdateMetadataStr ¶ added in v0.4.12

func CreateBenefitDownloadablesUpdateMetadataStr(str string) BenefitDownloadablesUpdateMetadata

func (BenefitDownloadablesUpdateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitDownloadablesUpdateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitDownloadablesUpdateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitDownloadablesUpdateMetadata) UnmarshalJSON(data []byte) error

type BenefitDownloadablesUpdateMetadataType ¶ added in v0.4.12

type BenefitDownloadablesUpdateMetadataType string
const (
	BenefitDownloadablesUpdateMetadataTypeStr     BenefitDownloadablesUpdateMetadataType = "str"
	BenefitDownloadablesUpdateMetadataTypeInteger BenefitDownloadablesUpdateMetadataType = "integer"
	BenefitDownloadablesUpdateMetadataTypeNumber  BenefitDownloadablesUpdateMetadataType = "number"
	BenefitDownloadablesUpdateMetadataTypeBoolean BenefitDownloadablesUpdateMetadataType = "boolean"
)

type BenefitFeatureFlag ¶ added in v0.15.0

type BenefitFeatureFlag struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	// Properties for a benefit of type `feature_flag`.
	Properties BenefitFeatureFlagProperties `json:"properties"`
	// contains filtered or unexported fields
}

BenefitFeatureFlag - A benefit of type `feature_flag`.

Use it to grant feature flags with key-value metadata that can be queried via the API and webhooks.

func (*BenefitFeatureFlag) GetCreatedAt ¶ added in v0.15.0

func (b *BenefitFeatureFlag) GetCreatedAt() time.Time

func (*BenefitFeatureFlag) GetDeletable ¶ added in v0.15.0

func (b *BenefitFeatureFlag) GetDeletable() bool

func (*BenefitFeatureFlag) GetDescription ¶ added in v0.15.0

func (b *BenefitFeatureFlag) GetDescription() string

func (*BenefitFeatureFlag) GetID ¶ added in v0.15.0

func (b *BenefitFeatureFlag) GetID() string

func (*BenefitFeatureFlag) GetMetadata ¶ added in v0.15.0

func (b *BenefitFeatureFlag) GetMetadata() map[string]MetadataOutputType

func (*BenefitFeatureFlag) GetModifiedAt ¶ added in v0.15.0

func (b *BenefitFeatureFlag) GetModifiedAt() *time.Time

func (*BenefitFeatureFlag) GetOrganizationID ¶ added in v0.15.0

func (b *BenefitFeatureFlag) GetOrganizationID() string

func (*BenefitFeatureFlag) GetProperties ¶ added in v0.15.0

func (*BenefitFeatureFlag) GetSelectable ¶ added in v0.15.0

func (b *BenefitFeatureFlag) GetSelectable() bool

func (*BenefitFeatureFlag) GetType ¶ added in v0.15.0

func (b *BenefitFeatureFlag) GetType() string

func (BenefitFeatureFlag) MarshalJSON ¶ added in v0.15.0

func (b BenefitFeatureFlag) MarshalJSON() ([]byte, error)

func (*BenefitFeatureFlag) UnmarshalJSON ¶ added in v0.15.0

func (b *BenefitFeatureFlag) UnmarshalJSON(data []byte) error

type BenefitFeatureFlagCreate ¶ added in v0.15.0

type BenefitFeatureFlagCreate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitFeatureFlagCreateMetadata `json:"metadata,omitempty"`

	// The description of the benefit. Will be displayed on products having this benefit.
	Description string `json:"description"`
	// The ID of the organization owning the benefit. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
	// Properties for creating a benefit of type `feature_flag`.
	Properties BenefitFeatureFlagCreateProperties `json:"properties"`
	// contains filtered or unexported fields
}

BenefitFeatureFlagCreate - Schema to create a benefit of type `feature_flag`.

func (*BenefitFeatureFlagCreate) GetDescription ¶ added in v0.15.0

func (b *BenefitFeatureFlagCreate) GetDescription() string

func (*BenefitFeatureFlagCreate) GetMetadata ¶ added in v0.15.0

func (*BenefitFeatureFlagCreate) GetOrganizationID ¶ added in v0.15.0

func (b *BenefitFeatureFlagCreate) GetOrganizationID() *string

func (*BenefitFeatureFlagCreate) GetProperties ¶ added in v0.15.0

func (*BenefitFeatureFlagCreate) GetType ¶ added in v0.15.0

func (b *BenefitFeatureFlagCreate) GetType() string

func (BenefitFeatureFlagCreate) MarshalJSON ¶ added in v0.15.0

func (b BenefitFeatureFlagCreate) MarshalJSON() ([]byte, error)

func (*BenefitFeatureFlagCreate) UnmarshalJSON ¶ added in v0.15.0

func (b *BenefitFeatureFlagCreate) UnmarshalJSON(data []byte) error

type BenefitFeatureFlagCreateMetadata ¶ added in v0.15.0

type BenefitFeatureFlagCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitFeatureFlagCreateMetadataType
}

func CreateBenefitFeatureFlagCreateMetadataBoolean ¶ added in v0.15.0

func CreateBenefitFeatureFlagCreateMetadataBoolean(boolean bool) BenefitFeatureFlagCreateMetadata

func CreateBenefitFeatureFlagCreateMetadataInteger ¶ added in v0.15.0

func CreateBenefitFeatureFlagCreateMetadataInteger(integer int64) BenefitFeatureFlagCreateMetadata

func CreateBenefitFeatureFlagCreateMetadataNumber ¶ added in v0.15.0

func CreateBenefitFeatureFlagCreateMetadataNumber(number float64) BenefitFeatureFlagCreateMetadata

func CreateBenefitFeatureFlagCreateMetadataStr ¶ added in v0.15.0

func CreateBenefitFeatureFlagCreateMetadataStr(str string) BenefitFeatureFlagCreateMetadata

func (BenefitFeatureFlagCreateMetadata) MarshalJSON ¶ added in v0.15.0

func (u BenefitFeatureFlagCreateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitFeatureFlagCreateMetadata) UnmarshalJSON ¶ added in v0.15.0

func (u *BenefitFeatureFlagCreateMetadata) UnmarshalJSON(data []byte) error

type BenefitFeatureFlagCreateMetadataType ¶ added in v0.15.0

type BenefitFeatureFlagCreateMetadataType string
const (
	BenefitFeatureFlagCreateMetadataTypeStr     BenefitFeatureFlagCreateMetadataType = "str"
	BenefitFeatureFlagCreateMetadataTypeInteger BenefitFeatureFlagCreateMetadataType = "integer"
	BenefitFeatureFlagCreateMetadataTypeNumber  BenefitFeatureFlagCreateMetadataType = "number"
	BenefitFeatureFlagCreateMetadataTypeBoolean BenefitFeatureFlagCreateMetadataType = "boolean"
)

type BenefitFeatureFlagCreateProperties ¶ added in v0.15.0

type BenefitFeatureFlagCreateProperties struct {
}

BenefitFeatureFlagCreateProperties - Properties for creating a benefit of type `feature_flag`.

func (BenefitFeatureFlagCreateProperties) MarshalJSON ¶ added in v0.15.0

func (b BenefitFeatureFlagCreateProperties) MarshalJSON() ([]byte, error)

func (*BenefitFeatureFlagCreateProperties) UnmarshalJSON ¶ added in v0.15.0

func (b *BenefitFeatureFlagCreateProperties) UnmarshalJSON(data []byte) error

type BenefitFeatureFlagProperties ¶ added in v0.15.0

type BenefitFeatureFlagProperties struct {
}

BenefitFeatureFlagProperties - Properties for a benefit of type `feature_flag`.

func (BenefitFeatureFlagProperties) MarshalJSON ¶ added in v0.15.0

func (b BenefitFeatureFlagProperties) MarshalJSON() ([]byte, error)

func (*BenefitFeatureFlagProperties) UnmarshalJSON ¶ added in v0.15.0

func (b *BenefitFeatureFlagProperties) UnmarshalJSON(data []byte) error

type BenefitFeatureFlagSubscriber ¶ added in v0.15.0

type BenefitFeatureFlagSubscriber struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	Organization   BenefitSubscriberOrganization `json:"organization"`
	// Properties available to subscribers for a benefit of type `feature_flag`.
	Properties BenefitFeatureFlagSubscriberProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitFeatureFlagSubscriber) GetCreatedAt ¶ added in v0.15.0

func (b *BenefitFeatureFlagSubscriber) GetCreatedAt() time.Time

func (*BenefitFeatureFlagSubscriber) GetDeletable ¶ added in v0.15.0

func (b *BenefitFeatureFlagSubscriber) GetDeletable() bool

func (*BenefitFeatureFlagSubscriber) GetDescription ¶ added in v0.15.0

func (b *BenefitFeatureFlagSubscriber) GetDescription() string

func (*BenefitFeatureFlagSubscriber) GetID ¶ added in v0.15.0

func (*BenefitFeatureFlagSubscriber) GetMetadata ¶ added in v0.15.0

func (*BenefitFeatureFlagSubscriber) GetModifiedAt ¶ added in v0.15.0

func (b *BenefitFeatureFlagSubscriber) GetModifiedAt() *time.Time

func (*BenefitFeatureFlagSubscriber) GetOrganization ¶ added in v0.15.0

func (*BenefitFeatureFlagSubscriber) GetOrganizationID ¶ added in v0.15.0

func (b *BenefitFeatureFlagSubscriber) GetOrganizationID() string

func (*BenefitFeatureFlagSubscriber) GetProperties ¶ added in v0.15.0

func (*BenefitFeatureFlagSubscriber) GetSelectable ¶ added in v0.15.0

func (b *BenefitFeatureFlagSubscriber) GetSelectable() bool

func (*BenefitFeatureFlagSubscriber) GetType ¶ added in v0.15.0

func (b *BenefitFeatureFlagSubscriber) GetType() string

func (BenefitFeatureFlagSubscriber) MarshalJSON ¶ added in v0.15.0

func (b BenefitFeatureFlagSubscriber) MarshalJSON() ([]byte, error)

func (*BenefitFeatureFlagSubscriber) UnmarshalJSON ¶ added in v0.15.0

func (b *BenefitFeatureFlagSubscriber) UnmarshalJSON(data []byte) error

type BenefitFeatureFlagSubscriberProperties ¶ added in v0.15.0

type BenefitFeatureFlagSubscriberProperties struct {
}

BenefitFeatureFlagSubscriberProperties - Properties available to subscribers for a benefit of type `feature_flag`.

func (BenefitFeatureFlagSubscriberProperties) MarshalJSON ¶ added in v0.15.0

func (b BenefitFeatureFlagSubscriberProperties) MarshalJSON() ([]byte, error)

func (*BenefitFeatureFlagSubscriberProperties) UnmarshalJSON ¶ added in v0.15.0

func (b *BenefitFeatureFlagSubscriberProperties) UnmarshalJSON(data []byte) error

type BenefitFeatureFlagUpdate ¶ added in v0.15.0

type BenefitFeatureFlagUpdate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitFeatureFlagUpdateMetadata `json:"metadata,omitempty"`
	// The description of the benefit. Will be displayed on products having this benefit.
	Description *string `json:"description,omitempty"`

	Properties *BenefitFeatureFlagProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

func (*BenefitFeatureFlagUpdate) GetDescription ¶ added in v0.15.0

func (b *BenefitFeatureFlagUpdate) GetDescription() *string

func (*BenefitFeatureFlagUpdate) GetMetadata ¶ added in v0.15.0

func (*BenefitFeatureFlagUpdate) GetProperties ¶ added in v0.15.0

func (*BenefitFeatureFlagUpdate) GetType ¶ added in v0.15.0

func (b *BenefitFeatureFlagUpdate) GetType() string

func (BenefitFeatureFlagUpdate) MarshalJSON ¶ added in v0.15.0

func (b BenefitFeatureFlagUpdate) MarshalJSON() ([]byte, error)

func (*BenefitFeatureFlagUpdate) UnmarshalJSON ¶ added in v0.15.0

func (b *BenefitFeatureFlagUpdate) UnmarshalJSON(data []byte) error

type BenefitFeatureFlagUpdateMetadata ¶ added in v0.15.0

type BenefitFeatureFlagUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitFeatureFlagUpdateMetadataType
}

func CreateBenefitFeatureFlagUpdateMetadataBoolean ¶ added in v0.15.0

func CreateBenefitFeatureFlagUpdateMetadataBoolean(boolean bool) BenefitFeatureFlagUpdateMetadata

func CreateBenefitFeatureFlagUpdateMetadataInteger ¶ added in v0.15.0

func CreateBenefitFeatureFlagUpdateMetadataInteger(integer int64) BenefitFeatureFlagUpdateMetadata

func CreateBenefitFeatureFlagUpdateMetadataNumber ¶ added in v0.15.0

func CreateBenefitFeatureFlagUpdateMetadataNumber(number float64) BenefitFeatureFlagUpdateMetadata

func CreateBenefitFeatureFlagUpdateMetadataStr ¶ added in v0.15.0

func CreateBenefitFeatureFlagUpdateMetadataStr(str string) BenefitFeatureFlagUpdateMetadata

func (BenefitFeatureFlagUpdateMetadata) MarshalJSON ¶ added in v0.15.0

func (u BenefitFeatureFlagUpdateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitFeatureFlagUpdateMetadata) UnmarshalJSON ¶ added in v0.15.0

func (u *BenefitFeatureFlagUpdateMetadata) UnmarshalJSON(data []byte) error

type BenefitFeatureFlagUpdateMetadataType ¶ added in v0.15.0

type BenefitFeatureFlagUpdateMetadataType string
const (
	BenefitFeatureFlagUpdateMetadataTypeStr     BenefitFeatureFlagUpdateMetadataType = "str"
	BenefitFeatureFlagUpdateMetadataTypeInteger BenefitFeatureFlagUpdateMetadataType = "integer"
	BenefitFeatureFlagUpdateMetadataTypeNumber  BenefitFeatureFlagUpdateMetadataType = "number"
	BenefitFeatureFlagUpdateMetadataTypeBoolean BenefitFeatureFlagUpdateMetadataType = "boolean"
)

type BenefitGitHubRepository ¶

type BenefitGitHubRepository struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	// Properties for a benefit of type `github_repository`.
	Properties BenefitGitHubRepositoryProperties `json:"properties"`
	// contains filtered or unexported fields
}

BenefitGitHubRepository - A benefit of type `github_repository`.

Use it to automatically invite your backers to a private GitHub repository.

func (*BenefitGitHubRepository) GetCreatedAt ¶

func (b *BenefitGitHubRepository) GetCreatedAt() time.Time

func (*BenefitGitHubRepository) GetDeletable ¶

func (b *BenefitGitHubRepository) GetDeletable() bool

func (*BenefitGitHubRepository) GetDescription ¶

func (b *BenefitGitHubRepository) GetDescription() string

func (*BenefitGitHubRepository) GetID ¶

func (b *BenefitGitHubRepository) GetID() string

func (*BenefitGitHubRepository) GetMetadata ¶ added in v0.4.12

func (b *BenefitGitHubRepository) GetMetadata() map[string]MetadataOutputType

func (*BenefitGitHubRepository) GetModifiedAt ¶

func (b *BenefitGitHubRepository) GetModifiedAt() *time.Time

func (*BenefitGitHubRepository) GetOrganizationID ¶

func (b *BenefitGitHubRepository) GetOrganizationID() string

func (*BenefitGitHubRepository) GetProperties ¶

func (*BenefitGitHubRepository) GetSelectable ¶

func (b *BenefitGitHubRepository) GetSelectable() bool

func (*BenefitGitHubRepository) GetType ¶

func (b *BenefitGitHubRepository) GetType() string

func (BenefitGitHubRepository) MarshalJSON ¶

func (b BenefitGitHubRepository) MarshalJSON() ([]byte, error)

func (*BenefitGitHubRepository) UnmarshalJSON ¶

func (b *BenefitGitHubRepository) UnmarshalJSON(data []byte) error

type BenefitGitHubRepositoryCreate ¶

type BenefitGitHubRepositoryCreate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitGitHubRepositoryCreateMetadata `json:"metadata,omitempty"`

	// The description of the benefit. Will be displayed on products having this benefit.
	Description string `json:"description"`
	// The ID of the organization owning the benefit. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
	// Properties to create a benefit of type `github_repository`.
	Properties BenefitGitHubRepositoryCreateProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitGitHubRepositoryCreate) GetDescription ¶

func (b *BenefitGitHubRepositoryCreate) GetDescription() string

func (*BenefitGitHubRepositoryCreate) GetMetadata ¶ added in v0.4.12

func (*BenefitGitHubRepositoryCreate) GetOrganizationID ¶

func (b *BenefitGitHubRepositoryCreate) GetOrganizationID() *string

func (*BenefitGitHubRepositoryCreate) GetProperties ¶

func (*BenefitGitHubRepositoryCreate) GetType ¶

func (BenefitGitHubRepositoryCreate) MarshalJSON ¶

func (b BenefitGitHubRepositoryCreate) MarshalJSON() ([]byte, error)

func (*BenefitGitHubRepositoryCreate) UnmarshalJSON ¶

func (b *BenefitGitHubRepositoryCreate) UnmarshalJSON(data []byte) error

type BenefitGitHubRepositoryCreateMetadata ¶ added in v0.4.12

type BenefitGitHubRepositoryCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitGitHubRepositoryCreateMetadataType
}

func CreateBenefitGitHubRepositoryCreateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitGitHubRepositoryCreateMetadataBoolean(boolean bool) BenefitGitHubRepositoryCreateMetadata

func CreateBenefitGitHubRepositoryCreateMetadataInteger ¶ added in v0.4.12

func CreateBenefitGitHubRepositoryCreateMetadataInteger(integer int64) BenefitGitHubRepositoryCreateMetadata

func CreateBenefitGitHubRepositoryCreateMetadataNumber ¶ added in v0.4.12

func CreateBenefitGitHubRepositoryCreateMetadataNumber(number float64) BenefitGitHubRepositoryCreateMetadata

func CreateBenefitGitHubRepositoryCreateMetadataStr ¶ added in v0.4.12

func CreateBenefitGitHubRepositoryCreateMetadataStr(str string) BenefitGitHubRepositoryCreateMetadata

func (BenefitGitHubRepositoryCreateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitGitHubRepositoryCreateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitGitHubRepositoryCreateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitGitHubRepositoryCreateMetadata) UnmarshalJSON(data []byte) error

type BenefitGitHubRepositoryCreateMetadataType ¶ added in v0.4.12

type BenefitGitHubRepositoryCreateMetadataType string
const (
	BenefitGitHubRepositoryCreateMetadataTypeStr     BenefitGitHubRepositoryCreateMetadataType = "str"
	BenefitGitHubRepositoryCreateMetadataTypeInteger BenefitGitHubRepositoryCreateMetadataType = "integer"
	BenefitGitHubRepositoryCreateMetadataTypeNumber  BenefitGitHubRepositoryCreateMetadataType = "number"
	BenefitGitHubRepositoryCreateMetadataTypeBoolean BenefitGitHubRepositoryCreateMetadataType = "boolean"
)

type BenefitGitHubRepositoryCreateProperties ¶

type BenefitGitHubRepositoryCreateProperties struct {
	// The owner of the repository.
	RepositoryOwner string `json:"repository_owner"`
	// The name of the repository.
	RepositoryName string `json:"repository_name"`
	// The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
	Permission BenefitGitHubRepositoryCreatePropertiesPermission `json:"permission"`
}

BenefitGitHubRepositoryCreateProperties - Properties to create a benefit of type `github_repository`.

func (*BenefitGitHubRepositoryCreateProperties) GetPermission ¶

func (*BenefitGitHubRepositoryCreateProperties) GetRepositoryName ¶

func (b *BenefitGitHubRepositoryCreateProperties) GetRepositoryName() string

func (*BenefitGitHubRepositoryCreateProperties) GetRepositoryOwner ¶

func (b *BenefitGitHubRepositoryCreateProperties) GetRepositoryOwner() string

func (BenefitGitHubRepositoryCreateProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitGitHubRepositoryCreateProperties) MarshalJSON() ([]byte, error)

func (*BenefitGitHubRepositoryCreateProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitGitHubRepositoryCreateProperties) UnmarshalJSON(data []byte) error

type BenefitGitHubRepositoryCreatePropertiesPermission ¶

type BenefitGitHubRepositoryCreatePropertiesPermission string

BenefitGitHubRepositoryCreatePropertiesPermission - The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).

const (
	BenefitGitHubRepositoryCreatePropertiesPermissionPull     BenefitGitHubRepositoryCreatePropertiesPermission = "pull"
	BenefitGitHubRepositoryCreatePropertiesPermissionTriage   BenefitGitHubRepositoryCreatePropertiesPermission = "triage"
	BenefitGitHubRepositoryCreatePropertiesPermissionPush     BenefitGitHubRepositoryCreatePropertiesPermission = "push"
	BenefitGitHubRepositoryCreatePropertiesPermissionMaintain BenefitGitHubRepositoryCreatePropertiesPermission = "maintain"
	BenefitGitHubRepositoryCreatePropertiesPermissionAdmin    BenefitGitHubRepositoryCreatePropertiesPermission = "admin"
)

func (BenefitGitHubRepositoryCreatePropertiesPermission) ToPointer ¶

func (*BenefitGitHubRepositoryCreatePropertiesPermission) UnmarshalJSON ¶

type BenefitGitHubRepositoryProperties ¶

type BenefitGitHubRepositoryProperties struct {
	// The owner of the repository.
	RepositoryOwner string `json:"repository_owner"`
	// The name of the repository.
	RepositoryName string `json:"repository_name"`
	// The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).
	Permission Permission `json:"permission"`
}

BenefitGitHubRepositoryProperties - Properties for a benefit of type `github_repository`.

func (*BenefitGitHubRepositoryProperties) GetPermission ¶

func (b *BenefitGitHubRepositoryProperties) GetPermission() Permission

func (*BenefitGitHubRepositoryProperties) GetRepositoryName ¶

func (b *BenefitGitHubRepositoryProperties) GetRepositoryName() string

func (*BenefitGitHubRepositoryProperties) GetRepositoryOwner ¶

func (b *BenefitGitHubRepositoryProperties) GetRepositoryOwner() string

func (BenefitGitHubRepositoryProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitGitHubRepositoryProperties) MarshalJSON() ([]byte, error)

func (*BenefitGitHubRepositoryProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitGitHubRepositoryProperties) UnmarshalJSON(data []byte) error

type BenefitGitHubRepositorySubscriber ¶

type BenefitGitHubRepositorySubscriber struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	Organization   BenefitSubscriberOrganization `json:"organization"`
	// Properties available to subscribers for a benefit of type `github_repository`.
	Properties BenefitGitHubRepositorySubscriberProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitGitHubRepositorySubscriber) GetCreatedAt ¶

func (b *BenefitGitHubRepositorySubscriber) GetCreatedAt() time.Time

func (*BenefitGitHubRepositorySubscriber) GetDeletable ¶

func (b *BenefitGitHubRepositorySubscriber) GetDeletable() bool

func (*BenefitGitHubRepositorySubscriber) GetDescription ¶

func (b *BenefitGitHubRepositorySubscriber) GetDescription() string

func (*BenefitGitHubRepositorySubscriber) GetID ¶

func (*BenefitGitHubRepositorySubscriber) GetMetadata ¶ added in v0.4.12

func (*BenefitGitHubRepositorySubscriber) GetModifiedAt ¶

func (b *BenefitGitHubRepositorySubscriber) GetModifiedAt() *time.Time

func (*BenefitGitHubRepositorySubscriber) GetOrganization ¶

func (*BenefitGitHubRepositorySubscriber) GetOrganizationID ¶

func (b *BenefitGitHubRepositorySubscriber) GetOrganizationID() string

func (*BenefitGitHubRepositorySubscriber) GetProperties ¶

func (*BenefitGitHubRepositorySubscriber) GetSelectable ¶

func (b *BenefitGitHubRepositorySubscriber) GetSelectable() bool

func (*BenefitGitHubRepositorySubscriber) GetType ¶

func (BenefitGitHubRepositorySubscriber) MarshalJSON ¶

func (b BenefitGitHubRepositorySubscriber) MarshalJSON() ([]byte, error)

func (*BenefitGitHubRepositorySubscriber) UnmarshalJSON ¶

func (b *BenefitGitHubRepositorySubscriber) UnmarshalJSON(data []byte) error

type BenefitGitHubRepositorySubscriberProperties ¶

type BenefitGitHubRepositorySubscriberProperties struct {
	// The owner of the repository.
	RepositoryOwner string `json:"repository_owner"`
	// The name of the repository.
	RepositoryName string `json:"repository_name"`
}

BenefitGitHubRepositorySubscriberProperties - Properties available to subscribers for a benefit of type `github_repository`.

func (*BenefitGitHubRepositorySubscriberProperties) GetRepositoryName ¶

func (b *BenefitGitHubRepositorySubscriberProperties) GetRepositoryName() string

func (*BenefitGitHubRepositorySubscriberProperties) GetRepositoryOwner ¶

func (b *BenefitGitHubRepositorySubscriberProperties) GetRepositoryOwner() string

func (BenefitGitHubRepositorySubscriberProperties) MarshalJSON ¶ added in v0.8.4

func (*BenefitGitHubRepositorySubscriberProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitGitHubRepositorySubscriberProperties) UnmarshalJSON(data []byte) error

type BenefitGitHubRepositoryUpdate ¶

type BenefitGitHubRepositoryUpdate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitGitHubRepositoryUpdateMetadata `json:"metadata,omitempty"`
	// The description of the benefit. Will be displayed on products having this benefit.
	Description *string `json:"description,omitempty"`

	Properties *BenefitGitHubRepositoryCreateProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

func (*BenefitGitHubRepositoryUpdate) GetDescription ¶

func (b *BenefitGitHubRepositoryUpdate) GetDescription() *string

func (*BenefitGitHubRepositoryUpdate) GetMetadata ¶ added in v0.4.12

func (*BenefitGitHubRepositoryUpdate) GetProperties ¶

func (*BenefitGitHubRepositoryUpdate) GetType ¶

func (BenefitGitHubRepositoryUpdate) MarshalJSON ¶

func (b BenefitGitHubRepositoryUpdate) MarshalJSON() ([]byte, error)

func (*BenefitGitHubRepositoryUpdate) UnmarshalJSON ¶

func (b *BenefitGitHubRepositoryUpdate) UnmarshalJSON(data []byte) error

type BenefitGitHubRepositoryUpdateMetadata ¶ added in v0.4.12

type BenefitGitHubRepositoryUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitGitHubRepositoryUpdateMetadataType
}

func CreateBenefitGitHubRepositoryUpdateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitGitHubRepositoryUpdateMetadataBoolean(boolean bool) BenefitGitHubRepositoryUpdateMetadata

func CreateBenefitGitHubRepositoryUpdateMetadataInteger ¶ added in v0.4.12

func CreateBenefitGitHubRepositoryUpdateMetadataInteger(integer int64) BenefitGitHubRepositoryUpdateMetadata

func CreateBenefitGitHubRepositoryUpdateMetadataNumber ¶ added in v0.4.12

func CreateBenefitGitHubRepositoryUpdateMetadataNumber(number float64) BenefitGitHubRepositoryUpdateMetadata

func CreateBenefitGitHubRepositoryUpdateMetadataStr ¶ added in v0.4.12

func CreateBenefitGitHubRepositoryUpdateMetadataStr(str string) BenefitGitHubRepositoryUpdateMetadata

func (BenefitGitHubRepositoryUpdateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitGitHubRepositoryUpdateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitGitHubRepositoryUpdateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitGitHubRepositoryUpdateMetadata) UnmarshalJSON(data []byte) error

type BenefitGitHubRepositoryUpdateMetadataType ¶ added in v0.4.12

type BenefitGitHubRepositoryUpdateMetadataType string
const (
	BenefitGitHubRepositoryUpdateMetadataTypeStr     BenefitGitHubRepositoryUpdateMetadataType = "str"
	BenefitGitHubRepositoryUpdateMetadataTypeInteger BenefitGitHubRepositoryUpdateMetadataType = "integer"
	BenefitGitHubRepositoryUpdateMetadataTypeNumber  BenefitGitHubRepositoryUpdateMetadataType = "number"
	BenefitGitHubRepositoryUpdateMetadataTypeBoolean BenefitGitHubRepositoryUpdateMetadataType = "boolean"
)

type BenefitGrant ¶

type BenefitGrant struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the grant.
	ID string `json:"id"`
	// The timestamp when the benefit was granted. If `None`, the benefit is not granted.
	GrantedAt *time.Time `json:"granted_at,omitempty"`
	// Whether the benefit is granted.
	IsGranted bool `json:"is_granted"`
	// The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Whether the benefit is revoked.
	IsRevoked bool `json:"is_revoked"`
	// The ID of the subscription that granted this benefit.
	SubscriptionID *string `json:"subscription_id"`
	// The ID of the order that granted this benefit.
	OrderID *string `json:"order_id"`
	// The ID of the customer concerned by this grant.
	CustomerID string `json:"customer_id"`
	// The ID of the member concerned by this grant.
	MemberID *string `json:"member_id,omitempty"`
	// The ID of the benefit concerned by this grant.
	BenefitID string `json:"benefit_id"`
	// The error information if the benefit grant failed with an unrecoverable error.
	Error      *BenefitGrantError `json:"error,omitempty"`
	Customer   Customer           `json:"customer"`
	Member     *Member            `json:"member,omitempty"`
	Benefit    Benefit            `json:"benefit"`
	Properties Properties         `json:"properties"`
}

func (*BenefitGrant) GetBenefit ¶ added in v0.9.0

func (b *BenefitGrant) GetBenefit() Benefit

func (*BenefitGrant) GetBenefitCustom ¶ added in v0.13.0

func (b *BenefitGrant) GetBenefitCustom() *BenefitCustom

func (*BenefitGrant) GetBenefitDiscord ¶ added in v0.13.0

func (b *BenefitGrant) GetBenefitDiscord() *BenefitDiscord

func (*BenefitGrant) GetBenefitDownloadables ¶ added in v0.13.0

func (b *BenefitGrant) GetBenefitDownloadables() *BenefitDownloadables

func (*BenefitGrant) GetBenefitFeatureFlag ¶ added in v0.15.0

func (b *BenefitGrant) GetBenefitFeatureFlag() *BenefitFeatureFlag

func (*BenefitGrant) GetBenefitGithubRepository ¶ added in v0.13.0

func (b *BenefitGrant) GetBenefitGithubRepository() *BenefitGitHubRepository

func (*BenefitGrant) GetBenefitID ¶

func (b *BenefitGrant) GetBenefitID() string

func (*BenefitGrant) GetBenefitLicenseKeys ¶ added in v0.13.0

func (b *BenefitGrant) GetBenefitLicenseKeys() *BenefitLicenseKeys

func (*BenefitGrant) GetBenefitMeterCredit ¶ added in v0.13.0

func (b *BenefitGrant) GetBenefitMeterCredit() *BenefitMeterCredit

func (*BenefitGrant) GetCreatedAt ¶

func (b *BenefitGrant) GetCreatedAt() time.Time

func (*BenefitGrant) GetCustomer ¶

func (b *BenefitGrant) GetCustomer() Customer

func (*BenefitGrant) GetCustomerID ¶

func (b *BenefitGrant) GetCustomerID() string

func (*BenefitGrant) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitGrant) GetCustomerIndividual() *CustomerIndividual

func (*BenefitGrant) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitGrant) GetCustomerTeam() *CustomerTeam

func (*BenefitGrant) GetError ¶ added in v0.4.19

func (b *BenefitGrant) GetError() *BenefitGrantError

func (*BenefitGrant) GetGrantedAt ¶

func (b *BenefitGrant) GetGrantedAt() *time.Time

func (*BenefitGrant) GetID ¶

func (b *BenefitGrant) GetID() string

func (*BenefitGrant) GetIsGranted ¶

func (b *BenefitGrant) GetIsGranted() bool

func (*BenefitGrant) GetIsRevoked ¶

func (b *BenefitGrant) GetIsRevoked() bool

func (*BenefitGrant) GetMember ¶ added in v0.13.0

func (b *BenefitGrant) GetMember() *Member

func (*BenefitGrant) GetMemberID ¶ added in v0.13.0

func (b *BenefitGrant) GetMemberID() *string

func (*BenefitGrant) GetModifiedAt ¶

func (b *BenefitGrant) GetModifiedAt() *time.Time

func (*BenefitGrant) GetOrderID ¶

func (b *BenefitGrant) GetOrderID() *string

func (*BenefitGrant) GetProperties ¶

func (b *BenefitGrant) GetProperties() Properties

func (*BenefitGrant) GetRevokedAt ¶

func (b *BenefitGrant) GetRevokedAt() *time.Time

func (*BenefitGrant) GetSubscriptionID ¶

func (b *BenefitGrant) GetSubscriptionID() *string

func (BenefitGrant) MarshalJSON ¶

func (b BenefitGrant) MarshalJSON() ([]byte, error)

func (*BenefitGrant) UnmarshalJSON ¶

func (b *BenefitGrant) UnmarshalJSON(data []byte) error

type BenefitGrantCustomProperties ¶

type BenefitGrantCustomProperties struct {
}

func (BenefitGrantCustomProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitGrantCustomProperties) MarshalJSON() ([]byte, error)

func (*BenefitGrantCustomProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitGrantCustomProperties) UnmarshalJSON(data []byte) error

type BenefitGrantCustomWebhook ¶ added in v0.8.5

type BenefitGrantCustomWebhook struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the grant.
	ID string `json:"id"`
	// The timestamp when the benefit was granted. If `None`, the benefit is not granted.
	GrantedAt *time.Time `json:"granted_at,omitempty"`
	// Whether the benefit is granted.
	IsGranted bool `json:"is_granted"`
	// The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Whether the benefit is revoked.
	IsRevoked bool `json:"is_revoked"`
	// The ID of the subscription that granted this benefit.
	SubscriptionID *string `json:"subscription_id"`
	// The ID of the order that granted this benefit.
	OrderID *string `json:"order_id"`
	// The ID of the customer concerned by this grant.
	CustomerID string `json:"customer_id"`
	// The ID of the member concerned by this grant.
	MemberID *string `json:"member_id,omitempty"`
	// The ID of the benefit concerned by this grant.
	BenefitID string `json:"benefit_id"`
	// The error information if the benefit grant failed with an unrecoverable error.
	Error    *BenefitGrantError `json:"error,omitempty"`
	Customer Customer           `json:"customer"`
	Member   *Member            `json:"member,omitempty"`
	// A benefit of type `custom`.
	//
	// Use it to grant any kind of benefit that doesn't fit in the other types.
	Benefit            BenefitCustom                 `json:"benefit"`
	Properties         BenefitGrantCustomProperties  `json:"properties"`
	PreviousProperties *BenefitGrantCustomProperties `json:"previous_properties,omitempty"`
}

func (*BenefitGrantCustomWebhook) GetBenefit ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetBenefit() BenefitCustom

func (*BenefitGrantCustomWebhook) GetBenefitID ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetBenefitID() string

func (*BenefitGrantCustomWebhook) GetCreatedAt ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetCreatedAt() time.Time

func (*BenefitGrantCustomWebhook) GetCustomer ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetCustomer() Customer

func (*BenefitGrantCustomWebhook) GetCustomerID ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetCustomerID() string

func (*BenefitGrantCustomWebhook) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitGrantCustomWebhook) GetCustomerIndividual() *CustomerIndividual

func (*BenefitGrantCustomWebhook) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitGrantCustomWebhook) GetCustomerTeam() *CustomerTeam

func (*BenefitGrantCustomWebhook) GetError ¶ added in v0.8.5

func (*BenefitGrantCustomWebhook) GetGrantedAt ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetGrantedAt() *time.Time

func (*BenefitGrantCustomWebhook) GetID ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetID() string

func (*BenefitGrantCustomWebhook) GetIsGranted ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetIsGranted() bool

func (*BenefitGrantCustomWebhook) GetIsRevoked ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetIsRevoked() bool

func (*BenefitGrantCustomWebhook) GetMember ¶ added in v0.13.0

func (b *BenefitGrantCustomWebhook) GetMember() *Member

func (*BenefitGrantCustomWebhook) GetMemberID ¶ added in v0.13.0

func (b *BenefitGrantCustomWebhook) GetMemberID() *string

func (*BenefitGrantCustomWebhook) GetModifiedAt ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetModifiedAt() *time.Time

func (*BenefitGrantCustomWebhook) GetOrderID ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetOrderID() *string

func (*BenefitGrantCustomWebhook) GetPreviousProperties ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetPreviousProperties() *BenefitGrantCustomProperties

func (*BenefitGrantCustomWebhook) GetProperties ¶ added in v0.8.5

func (*BenefitGrantCustomWebhook) GetRevokedAt ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetRevokedAt() *time.Time

func (*BenefitGrantCustomWebhook) GetSubscriptionID ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) GetSubscriptionID() *string

func (BenefitGrantCustomWebhook) MarshalJSON ¶ added in v0.8.5

func (b BenefitGrantCustomWebhook) MarshalJSON() ([]byte, error)

func (*BenefitGrantCustomWebhook) UnmarshalJSON ¶ added in v0.8.5

func (b *BenefitGrantCustomWebhook) UnmarshalJSON(data []byte) error

type BenefitGrantDiscordProperties ¶

type BenefitGrantDiscordProperties struct {
	AccountID        *string `json:"account_id,omitempty"`
	GuildID          *string `json:"guild_id,omitempty"`
	RoleID           *string `json:"role_id,omitempty"`
	GrantedAccountID *string `json:"granted_account_id,omitempty"`
}

func (*BenefitGrantDiscordProperties) GetAccountID ¶

func (b *BenefitGrantDiscordProperties) GetAccountID() *string

func (*BenefitGrantDiscordProperties) GetGrantedAccountID ¶ added in v0.8.4

func (b *BenefitGrantDiscordProperties) GetGrantedAccountID() *string

func (*BenefitGrantDiscordProperties) GetGuildID ¶

func (b *BenefitGrantDiscordProperties) GetGuildID() *string

func (*BenefitGrantDiscordProperties) GetRoleID ¶

func (b *BenefitGrantDiscordProperties) GetRoleID() *string

func (BenefitGrantDiscordProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitGrantDiscordProperties) MarshalJSON() ([]byte, error)

func (*BenefitGrantDiscordProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitGrantDiscordProperties) UnmarshalJSON(data []byte) error

type BenefitGrantDiscordWebhook ¶ added in v0.8.5

type BenefitGrantDiscordWebhook struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the grant.
	ID string `json:"id"`
	// The timestamp when the benefit was granted. If `None`, the benefit is not granted.
	GrantedAt *time.Time `json:"granted_at,omitempty"`
	// Whether the benefit is granted.
	IsGranted bool `json:"is_granted"`
	// The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Whether the benefit is revoked.
	IsRevoked bool `json:"is_revoked"`
	// The ID of the subscription that granted this benefit.
	SubscriptionID *string `json:"subscription_id"`
	// The ID of the order that granted this benefit.
	OrderID *string `json:"order_id"`
	// The ID of the customer concerned by this grant.
	CustomerID string `json:"customer_id"`
	// The ID of the member concerned by this grant.
	MemberID *string `json:"member_id,omitempty"`
	// The ID of the benefit concerned by this grant.
	BenefitID string `json:"benefit_id"`
	// The error information if the benefit grant failed with an unrecoverable error.
	Error    *BenefitGrantError `json:"error,omitempty"`
	Customer Customer           `json:"customer"`
	Member   *Member            `json:"member,omitempty"`
	// A benefit of type `discord`.
	//
	// Use it to automatically invite your backers to a Discord server.
	Benefit            BenefitDiscord                 `json:"benefit"`
	Properties         BenefitGrantDiscordProperties  `json:"properties"`
	PreviousProperties *BenefitGrantDiscordProperties `json:"previous_properties,omitempty"`
}

func (*BenefitGrantDiscordWebhook) GetBenefit ¶ added in v0.8.5

func (*BenefitGrantDiscordWebhook) GetBenefitID ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetBenefitID() string

func (*BenefitGrantDiscordWebhook) GetCreatedAt ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetCreatedAt() time.Time

func (*BenefitGrantDiscordWebhook) GetCustomer ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetCustomer() Customer

func (*BenefitGrantDiscordWebhook) GetCustomerID ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetCustomerID() string

func (*BenefitGrantDiscordWebhook) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitGrantDiscordWebhook) GetCustomerIndividual() *CustomerIndividual

func (*BenefitGrantDiscordWebhook) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitGrantDiscordWebhook) GetCustomerTeam() *CustomerTeam

func (*BenefitGrantDiscordWebhook) GetError ¶ added in v0.8.5

func (*BenefitGrantDiscordWebhook) GetGrantedAt ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetGrantedAt() *time.Time

func (*BenefitGrantDiscordWebhook) GetID ¶ added in v0.8.5

func (*BenefitGrantDiscordWebhook) GetIsGranted ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetIsGranted() bool

func (*BenefitGrantDiscordWebhook) GetIsRevoked ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetIsRevoked() bool

func (*BenefitGrantDiscordWebhook) GetMember ¶ added in v0.13.0

func (b *BenefitGrantDiscordWebhook) GetMember() *Member

func (*BenefitGrantDiscordWebhook) GetMemberID ¶ added in v0.13.0

func (b *BenefitGrantDiscordWebhook) GetMemberID() *string

func (*BenefitGrantDiscordWebhook) GetModifiedAt ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetModifiedAt() *time.Time

func (*BenefitGrantDiscordWebhook) GetOrderID ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetOrderID() *string

func (*BenefitGrantDiscordWebhook) GetPreviousProperties ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetPreviousProperties() *BenefitGrantDiscordProperties

func (*BenefitGrantDiscordWebhook) GetProperties ¶ added in v0.8.5

func (*BenefitGrantDiscordWebhook) GetRevokedAt ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetRevokedAt() *time.Time

func (*BenefitGrantDiscordWebhook) GetSubscriptionID ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) GetSubscriptionID() *string

func (BenefitGrantDiscordWebhook) MarshalJSON ¶ added in v0.8.5

func (b BenefitGrantDiscordWebhook) MarshalJSON() ([]byte, error)

func (*BenefitGrantDiscordWebhook) UnmarshalJSON ¶ added in v0.8.5

func (b *BenefitGrantDiscordWebhook) UnmarshalJSON(data []byte) error

type BenefitGrantDownloadablesProperties ¶

type BenefitGrantDownloadablesProperties struct {
	Files []string `json:"files,omitempty"`
}

func (*BenefitGrantDownloadablesProperties) GetFiles ¶

func (BenefitGrantDownloadablesProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitGrantDownloadablesProperties) MarshalJSON() ([]byte, error)

func (*BenefitGrantDownloadablesProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitGrantDownloadablesProperties) UnmarshalJSON(data []byte) error

type BenefitGrantDownloadablesWebhook ¶ added in v0.8.5

type BenefitGrantDownloadablesWebhook struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the grant.
	ID string `json:"id"`
	// The timestamp when the benefit was granted. If `None`, the benefit is not granted.
	GrantedAt *time.Time `json:"granted_at,omitempty"`
	// Whether the benefit is granted.
	IsGranted bool `json:"is_granted"`
	// The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Whether the benefit is revoked.
	IsRevoked bool `json:"is_revoked"`
	// The ID of the subscription that granted this benefit.
	SubscriptionID *string `json:"subscription_id"`
	// The ID of the order that granted this benefit.
	OrderID *string `json:"order_id"`
	// The ID of the customer concerned by this grant.
	CustomerID string `json:"customer_id"`
	// The ID of the member concerned by this grant.
	MemberID *string `json:"member_id,omitempty"`
	// The ID of the benefit concerned by this grant.
	BenefitID string `json:"benefit_id"`
	// The error information if the benefit grant failed with an unrecoverable error.
	Error              *BenefitGrantError                   `json:"error,omitempty"`
	Customer           Customer                             `json:"customer"`
	Member             *Member                              `json:"member,omitempty"`
	Benefit            BenefitDownloadables                 `json:"benefit"`
	Properties         BenefitGrantDownloadablesProperties  `json:"properties"`
	PreviousProperties *BenefitGrantDownloadablesProperties `json:"previous_properties,omitempty"`
}

func (*BenefitGrantDownloadablesWebhook) GetBenefit ¶ added in v0.8.5

func (*BenefitGrantDownloadablesWebhook) GetBenefitID ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) GetBenefitID() string

func (*BenefitGrantDownloadablesWebhook) GetCreatedAt ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) GetCreatedAt() time.Time

func (*BenefitGrantDownloadablesWebhook) GetCustomer ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) GetCustomer() Customer

func (*BenefitGrantDownloadablesWebhook) GetCustomerID ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) GetCustomerID() string

func (*BenefitGrantDownloadablesWebhook) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitGrantDownloadablesWebhook) GetCustomerIndividual() *CustomerIndividual

func (*BenefitGrantDownloadablesWebhook) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitGrantDownloadablesWebhook) GetCustomerTeam() *CustomerTeam

func (*BenefitGrantDownloadablesWebhook) GetError ¶ added in v0.8.5

func (*BenefitGrantDownloadablesWebhook) GetGrantedAt ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) GetGrantedAt() *time.Time

func (*BenefitGrantDownloadablesWebhook) GetID ¶ added in v0.8.5

func (*BenefitGrantDownloadablesWebhook) GetIsGranted ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) GetIsGranted() bool

func (*BenefitGrantDownloadablesWebhook) GetIsRevoked ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) GetIsRevoked() bool

func (*BenefitGrantDownloadablesWebhook) GetMember ¶ added in v0.13.0

func (b *BenefitGrantDownloadablesWebhook) GetMember() *Member

func (*BenefitGrantDownloadablesWebhook) GetMemberID ¶ added in v0.13.0

func (b *BenefitGrantDownloadablesWebhook) GetMemberID() *string

func (*BenefitGrantDownloadablesWebhook) GetModifiedAt ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) GetModifiedAt() *time.Time

func (*BenefitGrantDownloadablesWebhook) GetOrderID ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) GetOrderID() *string

func (*BenefitGrantDownloadablesWebhook) GetPreviousProperties ¶ added in v0.8.5

func (*BenefitGrantDownloadablesWebhook) GetProperties ¶ added in v0.8.5

func (*BenefitGrantDownloadablesWebhook) GetRevokedAt ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) GetRevokedAt() *time.Time

func (*BenefitGrantDownloadablesWebhook) GetSubscriptionID ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) GetSubscriptionID() *string

func (BenefitGrantDownloadablesWebhook) MarshalJSON ¶ added in v0.8.5

func (b BenefitGrantDownloadablesWebhook) MarshalJSON() ([]byte, error)

func (*BenefitGrantDownloadablesWebhook) UnmarshalJSON ¶ added in v0.8.5

func (b *BenefitGrantDownloadablesWebhook) UnmarshalJSON(data []byte) error

type BenefitGrantError ¶ added in v0.4.19

type BenefitGrantError struct {
	Message   string `json:"message"`
	Type      string `json:"type"`
	Timestamp string `json:"timestamp"`
}

func (*BenefitGrantError) GetMessage ¶ added in v0.4.19

func (b *BenefitGrantError) GetMessage() string

func (*BenefitGrantError) GetTimestamp ¶ added in v0.4.19

func (b *BenefitGrantError) GetTimestamp() string

func (*BenefitGrantError) GetType ¶ added in v0.4.19

func (b *BenefitGrantError) GetType() string

func (BenefitGrantError) MarshalJSON ¶ added in v0.8.5

func (b BenefitGrantError) MarshalJSON() ([]byte, error)

func (*BenefitGrantError) UnmarshalJSON ¶ added in v0.8.5

func (b *BenefitGrantError) UnmarshalJSON(data []byte) error

type BenefitGrantFeatureFlagProperties ¶ added in v0.15.0

type BenefitGrantFeatureFlagProperties struct {
}

func (BenefitGrantFeatureFlagProperties) MarshalJSON ¶ added in v0.15.0

func (b BenefitGrantFeatureFlagProperties) MarshalJSON() ([]byte, error)

func (*BenefitGrantFeatureFlagProperties) UnmarshalJSON ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagProperties) UnmarshalJSON(data []byte) error

type BenefitGrantFeatureFlagWebhook ¶ added in v0.15.0

type BenefitGrantFeatureFlagWebhook struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the grant.
	ID string `json:"id"`
	// The timestamp when the benefit was granted. If `None`, the benefit is not granted.
	GrantedAt *time.Time `json:"granted_at,omitempty"`
	// Whether the benefit is granted.
	IsGranted bool `json:"is_granted"`
	// The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Whether the benefit is revoked.
	IsRevoked bool `json:"is_revoked"`
	// The ID of the subscription that granted this benefit.
	SubscriptionID *string `json:"subscription_id"`
	// The ID of the order that granted this benefit.
	OrderID *string `json:"order_id"`
	// The ID of the customer concerned by this grant.
	CustomerID string `json:"customer_id"`
	// The ID of the member concerned by this grant.
	MemberID *string `json:"member_id,omitempty"`
	// The ID of the benefit concerned by this grant.
	BenefitID string `json:"benefit_id"`
	// The error information if the benefit grant failed with an unrecoverable error.
	Error    *BenefitGrantError `json:"error,omitempty"`
	Customer Customer           `json:"customer"`
	Member   *Member            `json:"member,omitempty"`
	// A benefit of type `feature_flag`.
	//
	// Use it to grant feature flags with key-value metadata
	// that can be queried via the API and webhooks.
	Benefit            BenefitFeatureFlag                 `json:"benefit"`
	Properties         BenefitGrantFeatureFlagProperties  `json:"properties"`
	PreviousProperties *BenefitGrantFeatureFlagProperties `json:"previous_properties,omitempty"`
}

func (*BenefitGrantFeatureFlagWebhook) GetBenefit ¶ added in v0.15.0

func (*BenefitGrantFeatureFlagWebhook) GetBenefitID ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetBenefitID() string

func (*BenefitGrantFeatureFlagWebhook) GetCreatedAt ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetCreatedAt() time.Time

func (*BenefitGrantFeatureFlagWebhook) GetCustomer ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetCustomer() Customer

func (*BenefitGrantFeatureFlagWebhook) GetCustomerID ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetCustomerID() string

func (*BenefitGrantFeatureFlagWebhook) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitGrantFeatureFlagWebhook) GetCustomerIndividual() *CustomerIndividual

func (*BenefitGrantFeatureFlagWebhook) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitGrantFeatureFlagWebhook) GetCustomerTeam() *CustomerTeam

func (*BenefitGrantFeatureFlagWebhook) GetError ¶ added in v0.15.0

func (*BenefitGrantFeatureFlagWebhook) GetGrantedAt ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetGrantedAt() *time.Time

func (*BenefitGrantFeatureFlagWebhook) GetID ¶ added in v0.15.0

func (*BenefitGrantFeatureFlagWebhook) GetIsGranted ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetIsGranted() bool

func (*BenefitGrantFeatureFlagWebhook) GetIsRevoked ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetIsRevoked() bool

func (*BenefitGrantFeatureFlagWebhook) GetMember ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetMember() *Member

func (*BenefitGrantFeatureFlagWebhook) GetMemberID ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetMemberID() *string

func (*BenefitGrantFeatureFlagWebhook) GetModifiedAt ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetModifiedAt() *time.Time

func (*BenefitGrantFeatureFlagWebhook) GetOrderID ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetOrderID() *string

func (*BenefitGrantFeatureFlagWebhook) GetPreviousProperties ¶ added in v0.15.0

func (*BenefitGrantFeatureFlagWebhook) GetProperties ¶ added in v0.15.0

func (*BenefitGrantFeatureFlagWebhook) GetRevokedAt ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetRevokedAt() *time.Time

func (*BenefitGrantFeatureFlagWebhook) GetSubscriptionID ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) GetSubscriptionID() *string

func (BenefitGrantFeatureFlagWebhook) MarshalJSON ¶ added in v0.15.0

func (b BenefitGrantFeatureFlagWebhook) MarshalJSON() ([]byte, error)

func (*BenefitGrantFeatureFlagWebhook) UnmarshalJSON ¶ added in v0.15.0

func (b *BenefitGrantFeatureFlagWebhook) UnmarshalJSON(data []byte) error

type BenefitGrantGitHubRepositoryProperties ¶

type BenefitGrantGitHubRepositoryProperties struct {
	AccountID        *string                                           `json:"account_id,omitempty"`
	RepositoryOwner  *string                                           `json:"repository_owner,omitempty"`
	RepositoryName   *string                                           `json:"repository_name,omitempty"`
	Permission       *BenefitGrantGitHubRepositoryPropertiesPermission `json:"permission,omitempty"`
	GrantedAccountID *string                                           `json:"granted_account_id,omitempty"`
}

func (*BenefitGrantGitHubRepositoryProperties) GetAccountID ¶

func (*BenefitGrantGitHubRepositoryProperties) GetGrantedAccountID ¶ added in v0.8.4

func (b *BenefitGrantGitHubRepositoryProperties) GetGrantedAccountID() *string

func (*BenefitGrantGitHubRepositoryProperties) GetPermission ¶

func (*BenefitGrantGitHubRepositoryProperties) GetRepositoryName ¶

func (b *BenefitGrantGitHubRepositoryProperties) GetRepositoryName() *string

func (*BenefitGrantGitHubRepositoryProperties) GetRepositoryOwner ¶

func (b *BenefitGrantGitHubRepositoryProperties) GetRepositoryOwner() *string

func (BenefitGrantGitHubRepositoryProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitGrantGitHubRepositoryProperties) MarshalJSON() ([]byte, error)

func (*BenefitGrantGitHubRepositoryProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitGrantGitHubRepositoryProperties) UnmarshalJSON(data []byte) error

type BenefitGrantGitHubRepositoryPropertiesPermission ¶

type BenefitGrantGitHubRepositoryPropertiesPermission string
const (
	BenefitGrantGitHubRepositoryPropertiesPermissionPull     BenefitGrantGitHubRepositoryPropertiesPermission = "pull"
	BenefitGrantGitHubRepositoryPropertiesPermissionTriage   BenefitGrantGitHubRepositoryPropertiesPermission = "triage"
	BenefitGrantGitHubRepositoryPropertiesPermissionPush     BenefitGrantGitHubRepositoryPropertiesPermission = "push"
	BenefitGrantGitHubRepositoryPropertiesPermissionMaintain BenefitGrantGitHubRepositoryPropertiesPermission = "maintain"
	BenefitGrantGitHubRepositoryPropertiesPermissionAdmin    BenefitGrantGitHubRepositoryPropertiesPermission = "admin"
)

func (BenefitGrantGitHubRepositoryPropertiesPermission) ToPointer ¶

func (*BenefitGrantGitHubRepositoryPropertiesPermission) UnmarshalJSON ¶

type BenefitGrantGitHubRepositoryWebhook ¶ added in v0.8.5

type BenefitGrantGitHubRepositoryWebhook struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the grant.
	ID string `json:"id"`
	// The timestamp when the benefit was granted. If `None`, the benefit is not granted.
	GrantedAt *time.Time `json:"granted_at,omitempty"`
	// Whether the benefit is granted.
	IsGranted bool `json:"is_granted"`
	// The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Whether the benefit is revoked.
	IsRevoked bool `json:"is_revoked"`
	// The ID of the subscription that granted this benefit.
	SubscriptionID *string `json:"subscription_id"`
	// The ID of the order that granted this benefit.
	OrderID *string `json:"order_id"`
	// The ID of the customer concerned by this grant.
	CustomerID string `json:"customer_id"`
	// The ID of the member concerned by this grant.
	MemberID *string `json:"member_id,omitempty"`
	// The ID of the benefit concerned by this grant.
	BenefitID string `json:"benefit_id"`
	// The error information if the benefit grant failed with an unrecoverable error.
	Error    *BenefitGrantError `json:"error,omitempty"`
	Customer Customer           `json:"customer"`
	Member   *Member            `json:"member,omitempty"`
	// A benefit of type `github_repository`.
	//
	// Use it to automatically invite your backers to a private GitHub repository.
	Benefit            BenefitGitHubRepository                 `json:"benefit"`
	Properties         BenefitGrantGitHubRepositoryProperties  `json:"properties"`
	PreviousProperties *BenefitGrantGitHubRepositoryProperties `json:"previous_properties,omitempty"`
}

func (*BenefitGrantGitHubRepositoryWebhook) GetBenefit ¶ added in v0.8.5

func (*BenefitGrantGitHubRepositoryWebhook) GetBenefitID ¶ added in v0.8.5

func (b *BenefitGrantGitHubRepositoryWebhook) GetBenefitID() string

func (*BenefitGrantGitHubRepositoryWebhook) GetCreatedAt ¶ added in v0.8.5

func (b *BenefitGrantGitHubRepositoryWebhook) GetCreatedAt() time.Time

func (*BenefitGrantGitHubRepositoryWebhook) GetCustomer ¶ added in v0.8.5

func (*BenefitGrantGitHubRepositoryWebhook) GetCustomerID ¶ added in v0.8.5

func (b *BenefitGrantGitHubRepositoryWebhook) GetCustomerID() string

func (*BenefitGrantGitHubRepositoryWebhook) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitGrantGitHubRepositoryWebhook) GetCustomerIndividual() *CustomerIndividual

func (*BenefitGrantGitHubRepositoryWebhook) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitGrantGitHubRepositoryWebhook) GetCustomerTeam() *CustomerTeam

func (*BenefitGrantGitHubRepositoryWebhook) GetError ¶ added in v0.8.5

func (*BenefitGrantGitHubRepositoryWebhook) GetGrantedAt ¶ added in v0.8.5

func (b *BenefitGrantGitHubRepositoryWebhook) GetGrantedAt() *time.Time

func (*BenefitGrantGitHubRepositoryWebhook) GetID ¶ added in v0.8.5

func (*BenefitGrantGitHubRepositoryWebhook) GetIsGranted ¶ added in v0.8.5

func (b *BenefitGrantGitHubRepositoryWebhook) GetIsGranted() bool

func (*BenefitGrantGitHubRepositoryWebhook) GetIsRevoked ¶ added in v0.8.5

func (b *BenefitGrantGitHubRepositoryWebhook) GetIsRevoked() bool

func (*BenefitGrantGitHubRepositoryWebhook) GetMember ¶ added in v0.13.0

func (*BenefitGrantGitHubRepositoryWebhook) GetMemberID ¶ added in v0.13.0

func (b *BenefitGrantGitHubRepositoryWebhook) GetMemberID() *string

func (*BenefitGrantGitHubRepositoryWebhook) GetModifiedAt ¶ added in v0.8.5

func (b *BenefitGrantGitHubRepositoryWebhook) GetModifiedAt() *time.Time

func (*BenefitGrantGitHubRepositoryWebhook) GetOrderID ¶ added in v0.8.5

func (*BenefitGrantGitHubRepositoryWebhook) GetPreviousProperties ¶ added in v0.8.5

func (*BenefitGrantGitHubRepositoryWebhook) GetProperties ¶ added in v0.8.5

func (*BenefitGrantGitHubRepositoryWebhook) GetRevokedAt ¶ added in v0.8.5

func (b *BenefitGrantGitHubRepositoryWebhook) GetRevokedAt() *time.Time

func (*BenefitGrantGitHubRepositoryWebhook) GetSubscriptionID ¶ added in v0.8.5

func (b *BenefitGrantGitHubRepositoryWebhook) GetSubscriptionID() *string

func (BenefitGrantGitHubRepositoryWebhook) MarshalJSON ¶ added in v0.8.5

func (b BenefitGrantGitHubRepositoryWebhook) MarshalJSON() ([]byte, error)

func (*BenefitGrantGitHubRepositoryWebhook) UnmarshalJSON ¶ added in v0.8.5

func (b *BenefitGrantGitHubRepositoryWebhook) UnmarshalJSON(data []byte) error

type BenefitGrantLicenseKeysProperties ¶

type BenefitGrantLicenseKeysProperties struct {
	UserProvidedKey *string `json:"user_provided_key,omitempty"`
	LicenseKeyID    *string `json:"license_key_id,omitempty"`
	DisplayKey      *string `json:"display_key,omitempty"`
}

func (*BenefitGrantLicenseKeysProperties) GetDisplayKey ¶

func (b *BenefitGrantLicenseKeysProperties) GetDisplayKey() *string

func (*BenefitGrantLicenseKeysProperties) GetLicenseKeyID ¶

func (b *BenefitGrantLicenseKeysProperties) GetLicenseKeyID() *string

func (*BenefitGrantLicenseKeysProperties) GetUserProvidedKey ¶ added in v0.13.0

func (b *BenefitGrantLicenseKeysProperties) GetUserProvidedKey() *string

func (BenefitGrantLicenseKeysProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitGrantLicenseKeysProperties) MarshalJSON() ([]byte, error)

func (*BenefitGrantLicenseKeysProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitGrantLicenseKeysProperties) UnmarshalJSON(data []byte) error

type BenefitGrantLicenseKeysWebhook ¶ added in v0.8.5

type BenefitGrantLicenseKeysWebhook struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the grant.
	ID string `json:"id"`
	// The timestamp when the benefit was granted. If `None`, the benefit is not granted.
	GrantedAt *time.Time `json:"granted_at,omitempty"`
	// Whether the benefit is granted.
	IsGranted bool `json:"is_granted"`
	// The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Whether the benefit is revoked.
	IsRevoked bool `json:"is_revoked"`
	// The ID of the subscription that granted this benefit.
	SubscriptionID *string `json:"subscription_id"`
	// The ID of the order that granted this benefit.
	OrderID *string `json:"order_id"`
	// The ID of the customer concerned by this grant.
	CustomerID string `json:"customer_id"`
	// The ID of the member concerned by this grant.
	MemberID *string `json:"member_id,omitempty"`
	// The ID of the benefit concerned by this grant.
	BenefitID string `json:"benefit_id"`
	// The error information if the benefit grant failed with an unrecoverable error.
	Error              *BenefitGrantError                 `json:"error,omitempty"`
	Customer           Customer                           `json:"customer"`
	Member             *Member                            `json:"member,omitempty"`
	Benefit            BenefitLicenseKeys                 `json:"benefit"`
	Properties         BenefitGrantLicenseKeysProperties  `json:"properties"`
	PreviousProperties *BenefitGrantLicenseKeysProperties `json:"previous_properties,omitempty"`
}

func (*BenefitGrantLicenseKeysWebhook) GetBenefit ¶ added in v0.8.5

func (*BenefitGrantLicenseKeysWebhook) GetBenefitID ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) GetBenefitID() string

func (*BenefitGrantLicenseKeysWebhook) GetCreatedAt ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) GetCreatedAt() time.Time

func (*BenefitGrantLicenseKeysWebhook) GetCustomer ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) GetCustomer() Customer

func (*BenefitGrantLicenseKeysWebhook) GetCustomerID ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) GetCustomerID() string

func (*BenefitGrantLicenseKeysWebhook) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitGrantLicenseKeysWebhook) GetCustomerIndividual() *CustomerIndividual

func (*BenefitGrantLicenseKeysWebhook) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitGrantLicenseKeysWebhook) GetCustomerTeam() *CustomerTeam

func (*BenefitGrantLicenseKeysWebhook) GetError ¶ added in v0.8.5

func (*BenefitGrantLicenseKeysWebhook) GetGrantedAt ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) GetGrantedAt() *time.Time

func (*BenefitGrantLicenseKeysWebhook) GetID ¶ added in v0.8.5

func (*BenefitGrantLicenseKeysWebhook) GetIsGranted ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) GetIsGranted() bool

func (*BenefitGrantLicenseKeysWebhook) GetIsRevoked ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) GetIsRevoked() bool

func (*BenefitGrantLicenseKeysWebhook) GetMember ¶ added in v0.13.0

func (b *BenefitGrantLicenseKeysWebhook) GetMember() *Member

func (*BenefitGrantLicenseKeysWebhook) GetMemberID ¶ added in v0.13.0

func (b *BenefitGrantLicenseKeysWebhook) GetMemberID() *string

func (*BenefitGrantLicenseKeysWebhook) GetModifiedAt ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) GetModifiedAt() *time.Time

func (*BenefitGrantLicenseKeysWebhook) GetOrderID ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) GetOrderID() *string

func (*BenefitGrantLicenseKeysWebhook) GetPreviousProperties ¶ added in v0.8.5

func (*BenefitGrantLicenseKeysWebhook) GetProperties ¶ added in v0.8.5

func (*BenefitGrantLicenseKeysWebhook) GetRevokedAt ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) GetRevokedAt() *time.Time

func (*BenefitGrantLicenseKeysWebhook) GetSubscriptionID ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) GetSubscriptionID() *string

func (BenefitGrantLicenseKeysWebhook) MarshalJSON ¶ added in v0.8.5

func (b BenefitGrantLicenseKeysWebhook) MarshalJSON() ([]byte, error)

func (*BenefitGrantLicenseKeysWebhook) UnmarshalJSON ¶ added in v0.8.5

func (b *BenefitGrantLicenseKeysWebhook) UnmarshalJSON(data []byte) error

type BenefitGrantMetadata ¶ added in v0.4.20

type BenefitGrantMetadata struct {
	BenefitID      string      `json:"benefit_id"`
	BenefitGrantID string      `json:"benefit_grant_id"`
	BenefitType    BenefitType `json:"benefit_type"`
	MemberID       *string     `json:"member_id,omitempty"`
}

func (*BenefitGrantMetadata) GetBenefitGrantID ¶ added in v0.4.20

func (b *BenefitGrantMetadata) GetBenefitGrantID() string

func (*BenefitGrantMetadata) GetBenefitID ¶ added in v0.4.20

func (b *BenefitGrantMetadata) GetBenefitID() string

func (*BenefitGrantMetadata) GetBenefitType ¶ added in v0.4.20

func (b *BenefitGrantMetadata) GetBenefitType() BenefitType

func (*BenefitGrantMetadata) GetMemberID ¶ added in v0.13.0

func (b *BenefitGrantMetadata) GetMemberID() *string

func (BenefitGrantMetadata) MarshalJSON ¶ added in v0.8.4

func (b BenefitGrantMetadata) MarshalJSON() ([]byte, error)

func (*BenefitGrantMetadata) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitGrantMetadata) UnmarshalJSON(data []byte) error

type BenefitGrantMeterCreditProperties ¶ added in v0.4.10

type BenefitGrantMeterCreditProperties struct {
	LastCreditedMeterID *string `json:"last_credited_meter_id,omitempty"`
	LastCreditedUnits   *int64  `json:"last_credited_units,omitempty"`
	LastCreditedAt      *string `json:"last_credited_at,omitempty"`
}

func (*BenefitGrantMeterCreditProperties) GetLastCreditedAt ¶ added in v0.4.10

func (b *BenefitGrantMeterCreditProperties) GetLastCreditedAt() *string

func (*BenefitGrantMeterCreditProperties) GetLastCreditedMeterID ¶ added in v0.4.10

func (b *BenefitGrantMeterCreditProperties) GetLastCreditedMeterID() *string

func (*BenefitGrantMeterCreditProperties) GetLastCreditedUnits ¶ added in v0.4.10

func (b *BenefitGrantMeterCreditProperties) GetLastCreditedUnits() *int64

func (BenefitGrantMeterCreditProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitGrantMeterCreditProperties) MarshalJSON() ([]byte, error)

func (*BenefitGrantMeterCreditProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitGrantMeterCreditProperties) UnmarshalJSON(data []byte) error

type BenefitGrantMeterCreditWebhook ¶ added in v0.8.5

type BenefitGrantMeterCreditWebhook struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the grant.
	ID string `json:"id"`
	// The timestamp when the benefit was granted. If `None`, the benefit is not granted.
	GrantedAt *time.Time `json:"granted_at,omitempty"`
	// Whether the benefit is granted.
	IsGranted bool `json:"is_granted"`
	// The timestamp when the benefit was revoked. If `None`, the benefit is not revoked.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Whether the benefit is revoked.
	IsRevoked bool `json:"is_revoked"`
	// The ID of the subscription that granted this benefit.
	SubscriptionID *string `json:"subscription_id"`
	// The ID of the order that granted this benefit.
	OrderID *string `json:"order_id"`
	// The ID of the customer concerned by this grant.
	CustomerID string `json:"customer_id"`
	// The ID of the member concerned by this grant.
	MemberID *string `json:"member_id,omitempty"`
	// The ID of the benefit concerned by this grant.
	BenefitID string `json:"benefit_id"`
	// The error information if the benefit grant failed with an unrecoverable error.
	Error    *BenefitGrantError `json:"error,omitempty"`
	Customer Customer           `json:"customer"`
	Member   *Member            `json:"member,omitempty"`
	// A benefit of type `meter_unit`.
	//
	// Use it to grant a number of units on a specific meter.
	Benefit            BenefitMeterCredit                 `json:"benefit"`
	Properties         BenefitGrantMeterCreditProperties  `json:"properties"`
	PreviousProperties *BenefitGrantMeterCreditProperties `json:"previous_properties,omitempty"`
}

func (*BenefitGrantMeterCreditWebhook) GetBenefit ¶ added in v0.8.5

func (*BenefitGrantMeterCreditWebhook) GetBenefitID ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) GetBenefitID() string

func (*BenefitGrantMeterCreditWebhook) GetCreatedAt ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) GetCreatedAt() time.Time

func (*BenefitGrantMeterCreditWebhook) GetCustomer ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) GetCustomer() Customer

func (*BenefitGrantMeterCreditWebhook) GetCustomerID ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) GetCustomerID() string

func (*BenefitGrantMeterCreditWebhook) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitGrantMeterCreditWebhook) GetCustomerIndividual() *CustomerIndividual

func (*BenefitGrantMeterCreditWebhook) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitGrantMeterCreditWebhook) GetCustomerTeam() *CustomerTeam

func (*BenefitGrantMeterCreditWebhook) GetError ¶ added in v0.8.5

func (*BenefitGrantMeterCreditWebhook) GetGrantedAt ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) GetGrantedAt() *time.Time

func (*BenefitGrantMeterCreditWebhook) GetID ¶ added in v0.8.5

func (*BenefitGrantMeterCreditWebhook) GetIsGranted ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) GetIsGranted() bool

func (*BenefitGrantMeterCreditWebhook) GetIsRevoked ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) GetIsRevoked() bool

func (*BenefitGrantMeterCreditWebhook) GetMember ¶ added in v0.13.0

func (b *BenefitGrantMeterCreditWebhook) GetMember() *Member

func (*BenefitGrantMeterCreditWebhook) GetMemberID ¶ added in v0.13.0

func (b *BenefitGrantMeterCreditWebhook) GetMemberID() *string

func (*BenefitGrantMeterCreditWebhook) GetModifiedAt ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) GetModifiedAt() *time.Time

func (*BenefitGrantMeterCreditWebhook) GetOrderID ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) GetOrderID() *string

func (*BenefitGrantMeterCreditWebhook) GetPreviousProperties ¶ added in v0.8.5

func (*BenefitGrantMeterCreditWebhook) GetProperties ¶ added in v0.8.5

func (*BenefitGrantMeterCreditWebhook) GetRevokedAt ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) GetRevokedAt() *time.Time

func (*BenefitGrantMeterCreditWebhook) GetSubscriptionID ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) GetSubscriptionID() *string

func (BenefitGrantMeterCreditWebhook) MarshalJSON ¶ added in v0.8.5

func (b BenefitGrantMeterCreditWebhook) MarshalJSON() ([]byte, error)

func (*BenefitGrantMeterCreditWebhook) UnmarshalJSON ¶ added in v0.8.5

func (b *BenefitGrantMeterCreditWebhook) UnmarshalJSON(data []byte) error

type BenefitGrantSortProperty ¶ added in v0.9.0

type BenefitGrantSortProperty string
const (
	BenefitGrantSortPropertyCreatedAt      BenefitGrantSortProperty = "created_at"
	BenefitGrantSortPropertyMinusCreatedAt BenefitGrantSortProperty = "-created_at"
	BenefitGrantSortPropertyGrantedAt      BenefitGrantSortProperty = "granted_at"
	BenefitGrantSortPropertyMinusGrantedAt BenefitGrantSortProperty = "-granted_at"
	BenefitGrantSortPropertyRevokedAt      BenefitGrantSortProperty = "revoked_at"
	BenefitGrantSortPropertyMinusRevokedAt BenefitGrantSortProperty = "-revoked_at"
)

func (BenefitGrantSortProperty) ToPointer ¶ added in v0.9.0

func (*BenefitGrantSortProperty) UnmarshalJSON ¶ added in v0.9.0

func (e *BenefitGrantSortProperty) UnmarshalJSON(data []byte) error

type BenefitGrantWebhook ¶

type BenefitGrantWebhook struct {
	BenefitGrantDiscordWebhook          *BenefitGrantDiscordWebhook          `queryParam:"inline" union:"member"`
	BenefitGrantCustomWebhook           *BenefitGrantCustomWebhook           `queryParam:"inline" union:"member"`
	BenefitGrantGitHubRepositoryWebhook *BenefitGrantGitHubRepositoryWebhook `queryParam:"inline" union:"member"`
	BenefitGrantDownloadablesWebhook    *BenefitGrantDownloadablesWebhook    `queryParam:"inline" union:"member"`
	BenefitGrantLicenseKeysWebhook      *BenefitGrantLicenseKeysWebhook      `queryParam:"inline" union:"member"`
	BenefitGrantMeterCreditWebhook      *BenefitGrantMeterCreditWebhook      `queryParam:"inline" union:"member"`
	BenefitGrantFeatureFlagWebhook      *BenefitGrantFeatureFlagWebhook      `queryParam:"inline" union:"member"`

	Type BenefitGrantWebhookType
}

func CreateBenefitGrantWebhookBenefitGrantCustomWebhook ¶ added in v0.8.5

func CreateBenefitGrantWebhookBenefitGrantCustomWebhook(benefitGrantCustomWebhook BenefitGrantCustomWebhook) BenefitGrantWebhook

func CreateBenefitGrantWebhookBenefitGrantDiscordWebhook ¶ added in v0.8.5

func CreateBenefitGrantWebhookBenefitGrantDiscordWebhook(benefitGrantDiscordWebhook BenefitGrantDiscordWebhook) BenefitGrantWebhook

func CreateBenefitGrantWebhookBenefitGrantDownloadablesWebhook ¶ added in v0.8.5

func CreateBenefitGrantWebhookBenefitGrantDownloadablesWebhook(benefitGrantDownloadablesWebhook BenefitGrantDownloadablesWebhook) BenefitGrantWebhook

func CreateBenefitGrantWebhookBenefitGrantFeatureFlagWebhook ¶ added in v0.15.0

func CreateBenefitGrantWebhookBenefitGrantFeatureFlagWebhook(benefitGrantFeatureFlagWebhook BenefitGrantFeatureFlagWebhook) BenefitGrantWebhook

func CreateBenefitGrantWebhookBenefitGrantGitHubRepositoryWebhook ¶ added in v0.8.5

func CreateBenefitGrantWebhookBenefitGrantGitHubRepositoryWebhook(benefitGrantGitHubRepositoryWebhook BenefitGrantGitHubRepositoryWebhook) BenefitGrantWebhook

func CreateBenefitGrantWebhookBenefitGrantLicenseKeysWebhook ¶ added in v0.8.5

func CreateBenefitGrantWebhookBenefitGrantLicenseKeysWebhook(benefitGrantLicenseKeysWebhook BenefitGrantLicenseKeysWebhook) BenefitGrantWebhook

func CreateBenefitGrantWebhookBenefitGrantMeterCreditWebhook ¶ added in v0.8.5

func CreateBenefitGrantWebhookBenefitGrantMeterCreditWebhook(benefitGrantMeterCreditWebhook BenefitGrantMeterCreditWebhook) BenefitGrantWebhook

func (BenefitGrantWebhook) MarshalJSON ¶

func (u BenefitGrantWebhook) MarshalJSON() ([]byte, error)

func (*BenefitGrantWebhook) UnmarshalJSON ¶

func (u *BenefitGrantWebhook) UnmarshalJSON(data []byte) error

type BenefitGrantWebhookType ¶ added in v0.8.5

type BenefitGrantWebhookType string
const (
	BenefitGrantWebhookTypeBenefitGrantDiscordWebhook          BenefitGrantWebhookType = "BenefitGrantDiscordWebhook"
	BenefitGrantWebhookTypeBenefitGrantCustomWebhook           BenefitGrantWebhookType = "BenefitGrantCustomWebhook"
	BenefitGrantWebhookTypeBenefitGrantGitHubRepositoryWebhook BenefitGrantWebhookType = "BenefitGrantGitHubRepositoryWebhook"
	BenefitGrantWebhookTypeBenefitGrantDownloadablesWebhook    BenefitGrantWebhookType = "BenefitGrantDownloadablesWebhook"
	BenefitGrantWebhookTypeBenefitGrantLicenseKeysWebhook      BenefitGrantWebhookType = "BenefitGrantLicenseKeysWebhook"
	BenefitGrantWebhookTypeBenefitGrantMeterCreditWebhook      BenefitGrantWebhookType = "BenefitGrantMeterCreditWebhook"
	BenefitGrantWebhookTypeBenefitGrantFeatureFlagWebhook      BenefitGrantWebhookType = "BenefitGrantFeatureFlagWebhook"
)

type BenefitGrantedEvent ¶ added in v0.4.20

type BenefitGrantedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata BenefitGrantMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

BenefitGrantedEvent - An event created by Polar when a benefit is granted to a customer.

func (*BenefitGrantedEvent) GetChildCount ¶ added in v0.12.0

func (b *BenefitGrantedEvent) GetChildCount() *int64

func (*BenefitGrantedEvent) GetCustomer ¶ added in v0.4.20

func (b *BenefitGrantedEvent) GetCustomer() *Customer

func (*BenefitGrantedEvent) GetCustomerID ¶ added in v0.4.20

func (b *BenefitGrantedEvent) GetCustomerID() *string

func (*BenefitGrantedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitGrantedEvent) GetCustomerIndividual() *CustomerIndividual

func (*BenefitGrantedEvent) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitGrantedEvent) GetCustomerTeam() *CustomerTeam

func (*BenefitGrantedEvent) GetExternalCustomerID ¶ added in v0.4.20

func (b *BenefitGrantedEvent) GetExternalCustomerID() *string

func (*BenefitGrantedEvent) GetExternalMemberID ¶ added in v0.13.0

func (b *BenefitGrantedEvent) GetExternalMemberID() *string

func (*BenefitGrantedEvent) GetID ¶ added in v0.4.20

func (b *BenefitGrantedEvent) GetID() string

func (*BenefitGrantedEvent) GetLabel ¶ added in v0.13.0

func (b *BenefitGrantedEvent) GetLabel() string

func (*BenefitGrantedEvent) GetMemberID ¶ added in v0.13.0

func (b *BenefitGrantedEvent) GetMemberID() *string

func (*BenefitGrantedEvent) GetMetadata ¶ added in v0.4.20

func (b *BenefitGrantedEvent) GetMetadata() BenefitGrantMetadata

func (*BenefitGrantedEvent) GetName ¶ added in v0.4.20

func (b *BenefitGrantedEvent) GetName() string

func (*BenefitGrantedEvent) GetOrganizationID ¶ added in v0.4.20

func (b *BenefitGrantedEvent) GetOrganizationID() string

func (*BenefitGrantedEvent) GetParentID ¶ added in v0.13.0

func (b *BenefitGrantedEvent) GetParentID() *string

func (*BenefitGrantedEvent) GetSource ¶ added in v0.4.20

func (b *BenefitGrantedEvent) GetSource() string

func (*BenefitGrantedEvent) GetTimestamp ¶ added in v0.4.20

func (b *BenefitGrantedEvent) GetTimestamp() time.Time

func (BenefitGrantedEvent) MarshalJSON ¶ added in v0.4.20

func (b BenefitGrantedEvent) MarshalJSON() ([]byte, error)

func (*BenefitGrantedEvent) UnmarshalJSON ¶ added in v0.4.20

func (b *BenefitGrantedEvent) UnmarshalJSON(data []byte) error

type BenefitLicenseKeyActivationCreateProperties ¶ added in v0.4.9

type BenefitLicenseKeyActivationCreateProperties struct {
	Limit               int64 `json:"limit"`
	EnableCustomerAdmin bool  `json:"enable_customer_admin"`
}

func (*BenefitLicenseKeyActivationCreateProperties) GetEnableCustomerAdmin ¶ added in v0.4.9

func (b *BenefitLicenseKeyActivationCreateProperties) GetEnableCustomerAdmin() bool

func (*BenefitLicenseKeyActivationCreateProperties) GetLimit ¶ added in v0.4.9

func (BenefitLicenseKeyActivationCreateProperties) MarshalJSON ¶ added in v0.8.4

func (*BenefitLicenseKeyActivationCreateProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitLicenseKeyActivationCreateProperties) UnmarshalJSON(data []byte) error

type BenefitLicenseKeyActivationProperties ¶

type BenefitLicenseKeyActivationProperties struct {
	Limit               int64 `json:"limit"`
	EnableCustomerAdmin bool  `json:"enable_customer_admin"`
}

func (*BenefitLicenseKeyActivationProperties) GetEnableCustomerAdmin ¶

func (b *BenefitLicenseKeyActivationProperties) GetEnableCustomerAdmin() bool

func (*BenefitLicenseKeyActivationProperties) GetLimit ¶

func (BenefitLicenseKeyActivationProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitLicenseKeyActivationProperties) MarshalJSON() ([]byte, error)

func (*BenefitLicenseKeyActivationProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitLicenseKeyActivationProperties) UnmarshalJSON(data []byte) error

type BenefitLicenseKeyExpirationProperties ¶

type BenefitLicenseKeyExpirationProperties struct {
	TTL       int64     `json:"ttl"`
	Timeframe Timeframe `json:"timeframe"`
}

func (*BenefitLicenseKeyExpirationProperties) GetTTL ¶

func (*BenefitLicenseKeyExpirationProperties) GetTimeframe ¶

func (BenefitLicenseKeyExpirationProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitLicenseKeyExpirationProperties) MarshalJSON() ([]byte, error)

func (*BenefitLicenseKeyExpirationProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitLicenseKeyExpirationProperties) UnmarshalJSON(data []byte) error

type BenefitLicenseKeys ¶

type BenefitLicenseKeys struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	Properties     BenefitLicenseKeysProperties  `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitLicenseKeys) GetCreatedAt ¶

func (b *BenefitLicenseKeys) GetCreatedAt() time.Time

func (*BenefitLicenseKeys) GetDeletable ¶

func (b *BenefitLicenseKeys) GetDeletable() bool

func (*BenefitLicenseKeys) GetDescription ¶

func (b *BenefitLicenseKeys) GetDescription() string

func (*BenefitLicenseKeys) GetID ¶

func (b *BenefitLicenseKeys) GetID() string

func (*BenefitLicenseKeys) GetMetadata ¶ added in v0.4.12

func (b *BenefitLicenseKeys) GetMetadata() map[string]MetadataOutputType

func (*BenefitLicenseKeys) GetModifiedAt ¶

func (b *BenefitLicenseKeys) GetModifiedAt() *time.Time

func (*BenefitLicenseKeys) GetOrganizationID ¶

func (b *BenefitLicenseKeys) GetOrganizationID() string

func (*BenefitLicenseKeys) GetProperties ¶

func (*BenefitLicenseKeys) GetSelectable ¶

func (b *BenefitLicenseKeys) GetSelectable() bool

func (*BenefitLicenseKeys) GetType ¶

func (b *BenefitLicenseKeys) GetType() string

func (BenefitLicenseKeys) MarshalJSON ¶

func (b BenefitLicenseKeys) MarshalJSON() ([]byte, error)

func (*BenefitLicenseKeys) UnmarshalJSON ¶

func (b *BenefitLicenseKeys) UnmarshalJSON(data []byte) error

type BenefitLicenseKeysCreate ¶

type BenefitLicenseKeysCreate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitLicenseKeysCreateMetadata `json:"metadata,omitempty"`

	// The description of the benefit. Will be displayed on products having this benefit.
	Description string `json:"description"`
	// The ID of the organization owning the benefit. **Required unless you use an organization token.**
	OrganizationID *string                            `json:"organization_id,omitempty"`
	Properties     BenefitLicenseKeysCreateProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitLicenseKeysCreate) GetDescription ¶

func (b *BenefitLicenseKeysCreate) GetDescription() string

func (*BenefitLicenseKeysCreate) GetMetadata ¶ added in v0.4.12

func (*BenefitLicenseKeysCreate) GetOrganizationID ¶

func (b *BenefitLicenseKeysCreate) GetOrganizationID() *string

func (*BenefitLicenseKeysCreate) GetProperties ¶

func (*BenefitLicenseKeysCreate) GetType ¶

func (b *BenefitLicenseKeysCreate) GetType() string

func (BenefitLicenseKeysCreate) MarshalJSON ¶

func (b BenefitLicenseKeysCreate) MarshalJSON() ([]byte, error)

func (*BenefitLicenseKeysCreate) UnmarshalJSON ¶

func (b *BenefitLicenseKeysCreate) UnmarshalJSON(data []byte) error

type BenefitLicenseKeysCreateMetadata ¶ added in v0.4.12

type BenefitLicenseKeysCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitLicenseKeysCreateMetadataType
}

func CreateBenefitLicenseKeysCreateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitLicenseKeysCreateMetadataBoolean(boolean bool) BenefitLicenseKeysCreateMetadata

func CreateBenefitLicenseKeysCreateMetadataInteger ¶ added in v0.4.12

func CreateBenefitLicenseKeysCreateMetadataInteger(integer int64) BenefitLicenseKeysCreateMetadata

func CreateBenefitLicenseKeysCreateMetadataNumber ¶ added in v0.4.12

func CreateBenefitLicenseKeysCreateMetadataNumber(number float64) BenefitLicenseKeysCreateMetadata

func CreateBenefitLicenseKeysCreateMetadataStr ¶ added in v0.4.12

func CreateBenefitLicenseKeysCreateMetadataStr(str string) BenefitLicenseKeysCreateMetadata

func (BenefitLicenseKeysCreateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitLicenseKeysCreateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitLicenseKeysCreateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitLicenseKeysCreateMetadata) UnmarshalJSON(data []byte) error

type BenefitLicenseKeysCreateMetadataType ¶ added in v0.4.12

type BenefitLicenseKeysCreateMetadataType string
const (
	BenefitLicenseKeysCreateMetadataTypeStr     BenefitLicenseKeysCreateMetadataType = "str"
	BenefitLicenseKeysCreateMetadataTypeInteger BenefitLicenseKeysCreateMetadataType = "integer"
	BenefitLicenseKeysCreateMetadataTypeNumber  BenefitLicenseKeysCreateMetadataType = "number"
	BenefitLicenseKeysCreateMetadataTypeBoolean BenefitLicenseKeysCreateMetadataType = "boolean"
)

type BenefitLicenseKeysCreateProperties ¶

type BenefitLicenseKeysCreateProperties struct {
	Prefix      *string                                      `json:"prefix,omitempty"`
	Expires     *BenefitLicenseKeyExpirationProperties       `json:"expires,omitempty"`
	Activations *BenefitLicenseKeyActivationCreateProperties `json:"activations,omitempty"`
	LimitUsage  *int64                                       `json:"limit_usage,omitempty"`
}

func (*BenefitLicenseKeysCreateProperties) GetActivations ¶

func (*BenefitLicenseKeysCreateProperties) GetExpires ¶

func (*BenefitLicenseKeysCreateProperties) GetLimitUsage ¶

func (b *BenefitLicenseKeysCreateProperties) GetLimitUsage() *int64

func (*BenefitLicenseKeysCreateProperties) GetPrefix ¶

func (BenefitLicenseKeysCreateProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitLicenseKeysCreateProperties) MarshalJSON() ([]byte, error)

func (*BenefitLicenseKeysCreateProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitLicenseKeysCreateProperties) UnmarshalJSON(data []byte) error

type BenefitLicenseKeysProperties ¶

type BenefitLicenseKeysProperties struct {
	Prefix      *string                                `json:"prefix"`
	Expires     *BenefitLicenseKeyExpirationProperties `json:"expires"`
	Activations *BenefitLicenseKeyActivationProperties `json:"activations"`
	LimitUsage  *int64                                 `json:"limit_usage"`
}

func (*BenefitLicenseKeysProperties) GetActivations ¶

func (*BenefitLicenseKeysProperties) GetExpires ¶

func (*BenefitLicenseKeysProperties) GetLimitUsage ¶

func (b *BenefitLicenseKeysProperties) GetLimitUsage() *int64

func (*BenefitLicenseKeysProperties) GetPrefix ¶

func (b *BenefitLicenseKeysProperties) GetPrefix() *string

func (BenefitLicenseKeysProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitLicenseKeysProperties) MarshalJSON() ([]byte, error)

func (*BenefitLicenseKeysProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitLicenseKeysProperties) UnmarshalJSON(data []byte) error

type BenefitLicenseKeysSubscriber ¶

type BenefitLicenseKeysSubscriber struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                                 `json:"organization_id"`
	Metadata       map[string]MetadataOutputType          `json:"metadata"`
	Organization   BenefitSubscriberOrganization          `json:"organization"`
	Properties     BenefitLicenseKeysSubscriberProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitLicenseKeysSubscriber) GetCreatedAt ¶

func (b *BenefitLicenseKeysSubscriber) GetCreatedAt() time.Time

func (*BenefitLicenseKeysSubscriber) GetDeletable ¶

func (b *BenefitLicenseKeysSubscriber) GetDeletable() bool

func (*BenefitLicenseKeysSubscriber) GetDescription ¶

func (b *BenefitLicenseKeysSubscriber) GetDescription() string

func (*BenefitLicenseKeysSubscriber) GetID ¶

func (*BenefitLicenseKeysSubscriber) GetMetadata ¶ added in v0.4.12

func (*BenefitLicenseKeysSubscriber) GetModifiedAt ¶

func (b *BenefitLicenseKeysSubscriber) GetModifiedAt() *time.Time

func (*BenefitLicenseKeysSubscriber) GetOrganization ¶

func (*BenefitLicenseKeysSubscriber) GetOrganizationID ¶

func (b *BenefitLicenseKeysSubscriber) GetOrganizationID() string

func (*BenefitLicenseKeysSubscriber) GetProperties ¶

func (*BenefitLicenseKeysSubscriber) GetSelectable ¶

func (b *BenefitLicenseKeysSubscriber) GetSelectable() bool

func (*BenefitLicenseKeysSubscriber) GetType ¶

func (b *BenefitLicenseKeysSubscriber) GetType() string

func (BenefitLicenseKeysSubscriber) MarshalJSON ¶

func (b BenefitLicenseKeysSubscriber) MarshalJSON() ([]byte, error)

func (*BenefitLicenseKeysSubscriber) UnmarshalJSON ¶

func (b *BenefitLicenseKeysSubscriber) UnmarshalJSON(data []byte) error

type BenefitLicenseKeysSubscriberProperties ¶

type BenefitLicenseKeysSubscriberProperties struct {
	Prefix      *string                                `json:"prefix"`
	Expires     *BenefitLicenseKeyExpirationProperties `json:"expires"`
	Activations *BenefitLicenseKeyActivationProperties `json:"activations"`
	LimitUsage  *int64                                 `json:"limit_usage"`
}

func (*BenefitLicenseKeysSubscriberProperties) GetActivations ¶

func (*BenefitLicenseKeysSubscriberProperties) GetExpires ¶

func (*BenefitLicenseKeysSubscriberProperties) GetLimitUsage ¶

func (b *BenefitLicenseKeysSubscriberProperties) GetLimitUsage() *int64

func (*BenefitLicenseKeysSubscriberProperties) GetPrefix ¶

func (BenefitLicenseKeysSubscriberProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitLicenseKeysSubscriberProperties) MarshalJSON() ([]byte, error)

func (*BenefitLicenseKeysSubscriberProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitLicenseKeysSubscriberProperties) UnmarshalJSON(data []byte) error

type BenefitLicenseKeysUpdate ¶

type BenefitLicenseKeysUpdate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitLicenseKeysUpdateMetadata `json:"metadata,omitempty"`
	// The description of the benefit. Will be displayed on products having this benefit.
	Description *string `json:"description,omitempty"`

	Properties *BenefitLicenseKeysCreateProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

func (*BenefitLicenseKeysUpdate) GetDescription ¶

func (b *BenefitLicenseKeysUpdate) GetDescription() *string

func (*BenefitLicenseKeysUpdate) GetMetadata ¶ added in v0.4.12

func (*BenefitLicenseKeysUpdate) GetProperties ¶

func (*BenefitLicenseKeysUpdate) GetType ¶

func (b *BenefitLicenseKeysUpdate) GetType() string

func (BenefitLicenseKeysUpdate) MarshalJSON ¶

func (b BenefitLicenseKeysUpdate) MarshalJSON() ([]byte, error)

func (*BenefitLicenseKeysUpdate) UnmarshalJSON ¶

func (b *BenefitLicenseKeysUpdate) UnmarshalJSON(data []byte) error

type BenefitLicenseKeysUpdateMetadata ¶ added in v0.4.12

type BenefitLicenseKeysUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitLicenseKeysUpdateMetadataType
}

func CreateBenefitLicenseKeysUpdateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitLicenseKeysUpdateMetadataBoolean(boolean bool) BenefitLicenseKeysUpdateMetadata

func CreateBenefitLicenseKeysUpdateMetadataInteger ¶ added in v0.4.12

func CreateBenefitLicenseKeysUpdateMetadataInteger(integer int64) BenefitLicenseKeysUpdateMetadata

func CreateBenefitLicenseKeysUpdateMetadataNumber ¶ added in v0.4.12

func CreateBenefitLicenseKeysUpdateMetadataNumber(number float64) BenefitLicenseKeysUpdateMetadata

func CreateBenefitLicenseKeysUpdateMetadataStr ¶ added in v0.4.12

func CreateBenefitLicenseKeysUpdateMetadataStr(str string) BenefitLicenseKeysUpdateMetadata

func (BenefitLicenseKeysUpdateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitLicenseKeysUpdateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitLicenseKeysUpdateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitLicenseKeysUpdateMetadata) UnmarshalJSON(data []byte) error

type BenefitLicenseKeysUpdateMetadataType ¶ added in v0.4.12

type BenefitLicenseKeysUpdateMetadataType string
const (
	BenefitLicenseKeysUpdateMetadataTypeStr     BenefitLicenseKeysUpdateMetadataType = "str"
	BenefitLicenseKeysUpdateMetadataTypeInteger BenefitLicenseKeysUpdateMetadataType = "integer"
	BenefitLicenseKeysUpdateMetadataTypeNumber  BenefitLicenseKeysUpdateMetadataType = "number"
	BenefitLicenseKeysUpdateMetadataTypeBoolean BenefitLicenseKeysUpdateMetadataType = "boolean"
)

type BenefitMeterCredit ¶ added in v0.4.9

type BenefitMeterCredit struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	// Properties for a benefit of type `meter_unit`.
	Properties BenefitMeterCreditProperties `json:"properties"`
	// contains filtered or unexported fields
}

BenefitMeterCredit - A benefit of type `meter_unit`.

Use it to grant a number of units on a specific meter.

func (*BenefitMeterCredit) GetCreatedAt ¶ added in v0.4.9

func (b *BenefitMeterCredit) GetCreatedAt() time.Time

func (*BenefitMeterCredit) GetDeletable ¶ added in v0.4.9

func (b *BenefitMeterCredit) GetDeletable() bool

func (*BenefitMeterCredit) GetDescription ¶ added in v0.4.9

func (b *BenefitMeterCredit) GetDescription() string

func (*BenefitMeterCredit) GetID ¶ added in v0.4.9

func (b *BenefitMeterCredit) GetID() string

func (*BenefitMeterCredit) GetMetadata ¶ added in v0.4.12

func (b *BenefitMeterCredit) GetMetadata() map[string]MetadataOutputType

func (*BenefitMeterCredit) GetModifiedAt ¶ added in v0.4.9

func (b *BenefitMeterCredit) GetModifiedAt() *time.Time

func (*BenefitMeterCredit) GetOrganizationID ¶ added in v0.4.9

func (b *BenefitMeterCredit) GetOrganizationID() string

func (*BenefitMeterCredit) GetProperties ¶ added in v0.4.9

func (*BenefitMeterCredit) GetSelectable ¶ added in v0.4.9

func (b *BenefitMeterCredit) GetSelectable() bool

func (*BenefitMeterCredit) GetType ¶ added in v0.4.9

func (b *BenefitMeterCredit) GetType() string

func (BenefitMeterCredit) MarshalJSON ¶ added in v0.4.9

func (b BenefitMeterCredit) MarshalJSON() ([]byte, error)

func (*BenefitMeterCredit) UnmarshalJSON ¶ added in v0.4.9

func (b *BenefitMeterCredit) UnmarshalJSON(data []byte) error

type BenefitMeterCreditCreate ¶ added in v0.4.9

type BenefitMeterCreditCreate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitMeterCreditCreateMetadata `json:"metadata,omitempty"`

	// The description of the benefit. Will be displayed on products having this benefit.
	Description string `json:"description"`
	// The ID of the organization owning the benefit. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
	// Properties for creating a benefit of type `meter_unit`.
	Properties BenefitMeterCreditCreateProperties `json:"properties"`
	// contains filtered or unexported fields
}

BenefitMeterCreditCreate - Schema to create a benefit of type `meter_unit`.

func (*BenefitMeterCreditCreate) GetDescription ¶ added in v0.4.9

func (b *BenefitMeterCreditCreate) GetDescription() string

func (*BenefitMeterCreditCreate) GetMetadata ¶ added in v0.4.12

func (*BenefitMeterCreditCreate) GetOrganizationID ¶ added in v0.4.9

func (b *BenefitMeterCreditCreate) GetOrganizationID() *string

func (*BenefitMeterCreditCreate) GetProperties ¶ added in v0.4.9

func (*BenefitMeterCreditCreate) GetType ¶ added in v0.4.9

func (b *BenefitMeterCreditCreate) GetType() string

func (BenefitMeterCreditCreate) MarshalJSON ¶ added in v0.4.9

func (b BenefitMeterCreditCreate) MarshalJSON() ([]byte, error)

func (*BenefitMeterCreditCreate) UnmarshalJSON ¶ added in v0.4.9

func (b *BenefitMeterCreditCreate) UnmarshalJSON(data []byte) error

type BenefitMeterCreditCreateMetadata ¶ added in v0.4.12

type BenefitMeterCreditCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitMeterCreditCreateMetadataType
}

func CreateBenefitMeterCreditCreateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitMeterCreditCreateMetadataBoolean(boolean bool) BenefitMeterCreditCreateMetadata

func CreateBenefitMeterCreditCreateMetadataInteger ¶ added in v0.4.12

func CreateBenefitMeterCreditCreateMetadataInteger(integer int64) BenefitMeterCreditCreateMetadata

func CreateBenefitMeterCreditCreateMetadataNumber ¶ added in v0.4.12

func CreateBenefitMeterCreditCreateMetadataNumber(number float64) BenefitMeterCreditCreateMetadata

func CreateBenefitMeterCreditCreateMetadataStr ¶ added in v0.4.12

func CreateBenefitMeterCreditCreateMetadataStr(str string) BenefitMeterCreditCreateMetadata

func (BenefitMeterCreditCreateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitMeterCreditCreateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitMeterCreditCreateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitMeterCreditCreateMetadata) UnmarshalJSON(data []byte) error

type BenefitMeterCreditCreateMetadataType ¶ added in v0.4.12

type BenefitMeterCreditCreateMetadataType string
const (
	BenefitMeterCreditCreateMetadataTypeStr     BenefitMeterCreditCreateMetadataType = "str"
	BenefitMeterCreditCreateMetadataTypeInteger BenefitMeterCreditCreateMetadataType = "integer"
	BenefitMeterCreditCreateMetadataTypeNumber  BenefitMeterCreditCreateMetadataType = "number"
	BenefitMeterCreditCreateMetadataTypeBoolean BenefitMeterCreditCreateMetadataType = "boolean"
)

type BenefitMeterCreditCreateProperties ¶ added in v0.4.9

type BenefitMeterCreditCreateProperties struct {
	Units    int64  `json:"units"`
	Rollover bool   `json:"rollover"`
	MeterID  string `json:"meter_id"`
}

BenefitMeterCreditCreateProperties - Properties for creating a benefit of type `meter_unit`.

func (*BenefitMeterCreditCreateProperties) GetMeterID ¶ added in v0.4.9

func (*BenefitMeterCreditCreateProperties) GetRollover ¶ added in v0.4.17

func (b *BenefitMeterCreditCreateProperties) GetRollover() bool

func (*BenefitMeterCreditCreateProperties) GetUnits ¶ added in v0.4.10

func (BenefitMeterCreditCreateProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitMeterCreditCreateProperties) MarshalJSON() ([]byte, error)

func (*BenefitMeterCreditCreateProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitMeterCreditCreateProperties) UnmarshalJSON(data []byte) error

type BenefitMeterCreditProperties ¶ added in v0.4.9

type BenefitMeterCreditProperties struct {
	Units    int64  `json:"units"`
	Rollover bool   `json:"rollover"`
	MeterID  string `json:"meter_id"`
}

BenefitMeterCreditProperties - Properties for a benefit of type `meter_unit`.

func (*BenefitMeterCreditProperties) GetMeterID ¶ added in v0.4.9

func (b *BenefitMeterCreditProperties) GetMeterID() string

func (*BenefitMeterCreditProperties) GetRollover ¶ added in v0.4.17

func (b *BenefitMeterCreditProperties) GetRollover() bool

func (*BenefitMeterCreditProperties) GetUnits ¶ added in v0.4.10

func (b *BenefitMeterCreditProperties) GetUnits() int64

func (BenefitMeterCreditProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitMeterCreditProperties) MarshalJSON() ([]byte, error)

func (*BenefitMeterCreditProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitMeterCreditProperties) UnmarshalJSON(data []byte) error

type BenefitMeterCreditSubscriber ¶ added in v0.4.10

type BenefitMeterCreditSubscriber struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`

	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	Organization   BenefitSubscriberOrganization `json:"organization"`
	// Properties available to subscribers for a benefit of type `meter_unit`.
	Properties BenefitMeterCreditSubscriberProperties `json:"properties"`
	// contains filtered or unexported fields
}

func (*BenefitMeterCreditSubscriber) GetCreatedAt ¶ added in v0.4.10

func (b *BenefitMeterCreditSubscriber) GetCreatedAt() time.Time

func (*BenefitMeterCreditSubscriber) GetDeletable ¶ added in v0.4.10

func (b *BenefitMeterCreditSubscriber) GetDeletable() bool

func (*BenefitMeterCreditSubscriber) GetDescription ¶ added in v0.4.10

func (b *BenefitMeterCreditSubscriber) GetDescription() string

func (*BenefitMeterCreditSubscriber) GetID ¶ added in v0.4.10

func (*BenefitMeterCreditSubscriber) GetMetadata ¶ added in v0.4.12

func (*BenefitMeterCreditSubscriber) GetModifiedAt ¶ added in v0.4.10

func (b *BenefitMeterCreditSubscriber) GetModifiedAt() *time.Time

func (*BenefitMeterCreditSubscriber) GetOrganization ¶ added in v0.4.10

func (*BenefitMeterCreditSubscriber) GetOrganizationID ¶ added in v0.4.10

func (b *BenefitMeterCreditSubscriber) GetOrganizationID() string

func (*BenefitMeterCreditSubscriber) GetProperties ¶ added in v0.4.10

func (*BenefitMeterCreditSubscriber) GetSelectable ¶ added in v0.4.10

func (b *BenefitMeterCreditSubscriber) GetSelectable() bool

func (*BenefitMeterCreditSubscriber) GetType ¶ added in v0.4.10

func (b *BenefitMeterCreditSubscriber) GetType() string

func (BenefitMeterCreditSubscriber) MarshalJSON ¶ added in v0.4.10

func (b BenefitMeterCreditSubscriber) MarshalJSON() ([]byte, error)

func (*BenefitMeterCreditSubscriber) UnmarshalJSON ¶ added in v0.4.10

func (b *BenefitMeterCreditSubscriber) UnmarshalJSON(data []byte) error

type BenefitMeterCreditSubscriberProperties ¶ added in v0.4.10

type BenefitMeterCreditSubscriberProperties struct {
	Units    int64  `json:"units"`
	Rollover bool   `json:"rollover"`
	MeterID  string `json:"meter_id"`
}

BenefitMeterCreditSubscriberProperties - Properties available to subscribers for a benefit of type `meter_unit`.

func (*BenefitMeterCreditSubscriberProperties) GetMeterID ¶ added in v0.4.10

func (*BenefitMeterCreditSubscriberProperties) GetRollover ¶ added in v0.4.17

func (*BenefitMeterCreditSubscriberProperties) GetUnits ¶ added in v0.4.10

func (BenefitMeterCreditSubscriberProperties) MarshalJSON ¶ added in v0.8.4

func (b BenefitMeterCreditSubscriberProperties) MarshalJSON() ([]byte, error)

func (*BenefitMeterCreditSubscriberProperties) UnmarshalJSON ¶ added in v0.8.4

func (b *BenefitMeterCreditSubscriberProperties) UnmarshalJSON(data []byte) error

type BenefitMeterCreditUpdate ¶ added in v0.4.9

type BenefitMeterCreditUpdate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]BenefitMeterCreditUpdateMetadata `json:"metadata,omitempty"`
	// The description of the benefit. Will be displayed on products having this benefit.
	Description *string `json:"description,omitempty"`

	Properties *BenefitMeterCreditCreateProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

func (*BenefitMeterCreditUpdate) GetDescription ¶ added in v0.4.9

func (b *BenefitMeterCreditUpdate) GetDescription() *string

func (*BenefitMeterCreditUpdate) GetMetadata ¶ added in v0.4.12

func (*BenefitMeterCreditUpdate) GetProperties ¶ added in v0.4.9

func (*BenefitMeterCreditUpdate) GetType ¶ added in v0.4.9

func (b *BenefitMeterCreditUpdate) GetType() string

func (BenefitMeterCreditUpdate) MarshalJSON ¶ added in v0.4.9

func (b BenefitMeterCreditUpdate) MarshalJSON() ([]byte, error)

func (*BenefitMeterCreditUpdate) UnmarshalJSON ¶ added in v0.4.9

func (b *BenefitMeterCreditUpdate) UnmarshalJSON(data []byte) error

type BenefitMeterCreditUpdateMetadata ¶ added in v0.4.12

type BenefitMeterCreditUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type BenefitMeterCreditUpdateMetadataType
}

func CreateBenefitMeterCreditUpdateMetadataBoolean ¶ added in v0.4.12

func CreateBenefitMeterCreditUpdateMetadataBoolean(boolean bool) BenefitMeterCreditUpdateMetadata

func CreateBenefitMeterCreditUpdateMetadataInteger ¶ added in v0.4.12

func CreateBenefitMeterCreditUpdateMetadataInteger(integer int64) BenefitMeterCreditUpdateMetadata

func CreateBenefitMeterCreditUpdateMetadataNumber ¶ added in v0.4.12

func CreateBenefitMeterCreditUpdateMetadataNumber(number float64) BenefitMeterCreditUpdateMetadata

func CreateBenefitMeterCreditUpdateMetadataStr ¶ added in v0.4.12

func CreateBenefitMeterCreditUpdateMetadataStr(str string) BenefitMeterCreditUpdateMetadata

func (BenefitMeterCreditUpdateMetadata) MarshalJSON ¶ added in v0.4.12

func (u BenefitMeterCreditUpdateMetadata) MarshalJSON() ([]byte, error)

func (*BenefitMeterCreditUpdateMetadata) UnmarshalJSON ¶ added in v0.4.12

func (u *BenefitMeterCreditUpdateMetadata) UnmarshalJSON(data []byte) error

type BenefitMeterCreditUpdateMetadataType ¶ added in v0.4.12

type BenefitMeterCreditUpdateMetadataType string
const (
	BenefitMeterCreditUpdateMetadataTypeStr     BenefitMeterCreditUpdateMetadataType = "str"
	BenefitMeterCreditUpdateMetadataTypeInteger BenefitMeterCreditUpdateMetadataType = "integer"
	BenefitMeterCreditUpdateMetadataTypeNumber  BenefitMeterCreditUpdateMetadataType = "number"
	BenefitMeterCreditUpdateMetadataTypeBoolean BenefitMeterCreditUpdateMetadataType = "boolean"
)

type BenefitPublic ¶ added in v0.4.13

type BenefitPublic struct {
	// The ID of the benefit.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time  `json:"modified_at"`
	Type       BenefitType `json:"type"`
	// The description of the benefit.
	Description string `json:"description"`
	// Whether the benefit is selectable when creating a product.
	Selectable bool `json:"selectable"`
	// Whether the benefit is deletable.
	Deletable bool `json:"deletable"`
	// The ID of the organization owning the benefit.
	OrganizationID string `json:"organization_id"`
}

func (*BenefitPublic) GetCreatedAt ¶ added in v0.4.13

func (b *BenefitPublic) GetCreatedAt() time.Time

func (*BenefitPublic) GetDeletable ¶ added in v0.4.13

func (b *BenefitPublic) GetDeletable() bool

func (*BenefitPublic) GetDescription ¶ added in v0.4.13

func (b *BenefitPublic) GetDescription() string

func (*BenefitPublic) GetID ¶ added in v0.4.13

func (b *BenefitPublic) GetID() string

func (*BenefitPublic) GetModifiedAt ¶ added in v0.4.13

func (b *BenefitPublic) GetModifiedAt() *time.Time

func (*BenefitPublic) GetOrganizationID ¶ added in v0.4.13

func (b *BenefitPublic) GetOrganizationID() string

func (*BenefitPublic) GetSelectable ¶ added in v0.4.13

func (b *BenefitPublic) GetSelectable() bool

func (*BenefitPublic) GetType ¶ added in v0.4.13

func (b *BenefitPublic) GetType() BenefitType

func (BenefitPublic) MarshalJSON ¶ added in v0.4.13

func (b BenefitPublic) MarshalJSON() ([]byte, error)

func (*BenefitPublic) UnmarshalJSON ¶ added in v0.4.13

func (b *BenefitPublic) UnmarshalJSON(data []byte) error

type BenefitRevokedEvent ¶ added in v0.4.20

type BenefitRevokedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata BenefitGrantMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

BenefitRevokedEvent - An event created by Polar when a benefit is revoked from a customer.

func (*BenefitRevokedEvent) GetChildCount ¶ added in v0.12.0

func (b *BenefitRevokedEvent) GetChildCount() *int64

func (*BenefitRevokedEvent) GetCustomer ¶ added in v0.4.20

func (b *BenefitRevokedEvent) GetCustomer() *Customer

func (*BenefitRevokedEvent) GetCustomerID ¶ added in v0.4.20

func (b *BenefitRevokedEvent) GetCustomerID() *string

func (*BenefitRevokedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitRevokedEvent) GetCustomerIndividual() *CustomerIndividual

func (*BenefitRevokedEvent) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitRevokedEvent) GetCustomerTeam() *CustomerTeam

func (*BenefitRevokedEvent) GetExternalCustomerID ¶ added in v0.4.20

func (b *BenefitRevokedEvent) GetExternalCustomerID() *string

func (*BenefitRevokedEvent) GetExternalMemberID ¶ added in v0.13.0

func (b *BenefitRevokedEvent) GetExternalMemberID() *string

func (*BenefitRevokedEvent) GetID ¶ added in v0.4.20

func (b *BenefitRevokedEvent) GetID() string

func (*BenefitRevokedEvent) GetLabel ¶ added in v0.13.0

func (b *BenefitRevokedEvent) GetLabel() string

func (*BenefitRevokedEvent) GetMemberID ¶ added in v0.13.0

func (b *BenefitRevokedEvent) GetMemberID() *string

func (*BenefitRevokedEvent) GetMetadata ¶ added in v0.4.20

func (b *BenefitRevokedEvent) GetMetadata() BenefitGrantMetadata

func (*BenefitRevokedEvent) GetName ¶ added in v0.4.20

func (b *BenefitRevokedEvent) GetName() string

func (*BenefitRevokedEvent) GetOrganizationID ¶ added in v0.4.20

func (b *BenefitRevokedEvent) GetOrganizationID() string

func (*BenefitRevokedEvent) GetParentID ¶ added in v0.13.0

func (b *BenefitRevokedEvent) GetParentID() *string

func (*BenefitRevokedEvent) GetSource ¶ added in v0.4.20

func (b *BenefitRevokedEvent) GetSource() string

func (*BenefitRevokedEvent) GetTimestamp ¶ added in v0.4.20

func (b *BenefitRevokedEvent) GetTimestamp() time.Time

func (BenefitRevokedEvent) MarshalJSON ¶ added in v0.4.20

func (b BenefitRevokedEvent) MarshalJSON() ([]byte, error)

func (*BenefitRevokedEvent) UnmarshalJSON ¶ added in v0.4.20

func (b *BenefitRevokedEvent) UnmarshalJSON(data []byte) error

type BenefitSortProperty ¶ added in v0.4.9

type BenefitSortProperty string
const (
	BenefitSortPropertyCreatedAt        BenefitSortProperty = "created_at"
	BenefitSortPropertyMinusCreatedAt   BenefitSortProperty = "-created_at"
	BenefitSortPropertyDescription      BenefitSortProperty = "description"
	BenefitSortPropertyMinusDescription BenefitSortProperty = "-description"
	BenefitSortPropertyType             BenefitSortProperty = "type"
	BenefitSortPropertyMinusType        BenefitSortProperty = "-type"
	BenefitSortPropertyUserOrder        BenefitSortProperty = "user_order"
	BenefitSortPropertyMinusUserOrder   BenefitSortProperty = "-user_order"
)

func (BenefitSortProperty) ToPointer ¶ added in v0.4.9

func (*BenefitSortProperty) UnmarshalJSON ¶ added in v0.4.9

func (e *BenefitSortProperty) UnmarshalJSON(data []byte) error

type BenefitSubscriberOrganization ¶ added in v0.13.0

type BenefitSubscriberOrganization struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// Organization name shown in checkout, customer portal, emails etc.
	Name string `json:"name"`
	// Unique organization slug in checkout, customer portal and credit card statements.
	Slug string `json:"slug"`
	// Avatar URL shown in checkout, customer portal, emails etc.
	AvatarURL         *string                       `json:"avatar_url"`
	ProrationBehavior SubscriptionProrationBehavior `json:"proration_behavior"`
	// Whether customers can update their subscriptions from the customer portal.
	AllowCustomerUpdates bool `json:"allow_customer_updates"`
}

func (*BenefitSubscriberOrganization) GetAllowCustomerUpdates ¶ added in v0.13.0

func (b *BenefitSubscriberOrganization) GetAllowCustomerUpdates() bool

func (*BenefitSubscriberOrganization) GetAvatarURL ¶ added in v0.13.0

func (b *BenefitSubscriberOrganization) GetAvatarURL() *string

func (*BenefitSubscriberOrganization) GetCreatedAt ¶ added in v0.13.0

func (b *BenefitSubscriberOrganization) GetCreatedAt() time.Time

func (*BenefitSubscriberOrganization) GetID ¶ added in v0.13.0

func (*BenefitSubscriberOrganization) GetModifiedAt ¶ added in v0.13.0

func (b *BenefitSubscriberOrganization) GetModifiedAt() *time.Time

func (*BenefitSubscriberOrganization) GetName ¶ added in v0.13.0

func (*BenefitSubscriberOrganization) GetProrationBehavior ¶ added in v0.13.0

func (*BenefitSubscriberOrganization) GetSlug ¶ added in v0.13.0

func (BenefitSubscriberOrganization) MarshalJSON ¶ added in v0.13.0

func (b BenefitSubscriberOrganization) MarshalJSON() ([]byte, error)

func (*BenefitSubscriberOrganization) UnmarshalJSON ¶ added in v0.13.0

func (b *BenefitSubscriberOrganization) UnmarshalJSON(data []byte) error

type BenefitType ¶

type BenefitType string
const (
	BenefitTypeCustom           BenefitType = "custom"
	BenefitTypeDiscord          BenefitType = "discord"
	BenefitTypeGithubRepository BenefitType = "github_repository"
	BenefitTypeDownloadables    BenefitType = "downloadables"
	BenefitTypeLicenseKeys      BenefitType = "license_keys"
	BenefitTypeMeterCredit      BenefitType = "meter_credit"
	BenefitTypeFeatureFlag      BenefitType = "feature_flag"
)

func (BenefitType) ToPointer ¶

func (e BenefitType) ToPointer() *BenefitType

func (*BenefitType) UnmarshalJSON ¶

func (e *BenefitType) UnmarshalJSON(data []byte) error

type BenefitUnionType ¶

type BenefitUnionType string
const (
	BenefitUnionTypeCustom           BenefitUnionType = "custom"
	BenefitUnionTypeDiscord          BenefitUnionType = "discord"
	BenefitUnionTypeDownloadables    BenefitUnionType = "downloadables"
	BenefitUnionTypeFeatureFlag      BenefitUnionType = "feature_flag"
	BenefitUnionTypeGithubRepository BenefitUnionType = "github_repository"
	BenefitUnionTypeLicenseKeys      BenefitUnionType = "license_keys"
	BenefitUnionTypeMeterCredit      BenefitUnionType = "meter_credit"
)

type BenefitUpdatedEvent ¶ added in v0.4.20

type BenefitUpdatedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata BenefitGrantMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

BenefitUpdatedEvent - An event created by Polar when a benefit is updated.

func (*BenefitUpdatedEvent) GetChildCount ¶ added in v0.12.0

func (b *BenefitUpdatedEvent) GetChildCount() *int64

func (*BenefitUpdatedEvent) GetCustomer ¶ added in v0.4.20

func (b *BenefitUpdatedEvent) GetCustomer() *Customer

func (*BenefitUpdatedEvent) GetCustomerID ¶ added in v0.4.20

func (b *BenefitUpdatedEvent) GetCustomerID() *string

func (*BenefitUpdatedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (b *BenefitUpdatedEvent) GetCustomerIndividual() *CustomerIndividual

func (*BenefitUpdatedEvent) GetCustomerTeam ¶ added in v0.16.0

func (b *BenefitUpdatedEvent) GetCustomerTeam() *CustomerTeam

func (*BenefitUpdatedEvent) GetExternalCustomerID ¶ added in v0.4.20

func (b *BenefitUpdatedEvent) GetExternalCustomerID() *string

func (*BenefitUpdatedEvent) GetExternalMemberID ¶ added in v0.13.0

func (b *BenefitUpdatedEvent) GetExternalMemberID() *string

func (*BenefitUpdatedEvent) GetID ¶ added in v0.4.20

func (b *BenefitUpdatedEvent) GetID() string

func (*BenefitUpdatedEvent) GetLabel ¶ added in v0.13.0

func (b *BenefitUpdatedEvent) GetLabel() string

func (*BenefitUpdatedEvent) GetMemberID ¶ added in v0.13.0

func (b *BenefitUpdatedEvent) GetMemberID() *string

func (*BenefitUpdatedEvent) GetMetadata ¶ added in v0.4.20

func (b *BenefitUpdatedEvent) GetMetadata() BenefitGrantMetadata

func (*BenefitUpdatedEvent) GetName ¶ added in v0.4.20

func (b *BenefitUpdatedEvent) GetName() string

func (*BenefitUpdatedEvent) GetOrganizationID ¶ added in v0.4.20

func (b *BenefitUpdatedEvent) GetOrganizationID() string

func (*BenefitUpdatedEvent) GetParentID ¶ added in v0.13.0

func (b *BenefitUpdatedEvent) GetParentID() *string

func (*BenefitUpdatedEvent) GetSource ¶ added in v0.4.20

func (b *BenefitUpdatedEvent) GetSource() string

func (*BenefitUpdatedEvent) GetTimestamp ¶ added in v0.4.20

func (b *BenefitUpdatedEvent) GetTimestamp() time.Time

func (BenefitUpdatedEvent) MarshalJSON ¶ added in v0.4.20

func (b BenefitUpdatedEvent) MarshalJSON() ([]byte, error)

func (*BenefitUpdatedEvent) UnmarshalJSON ¶ added in v0.4.20

func (b *BenefitUpdatedEvent) UnmarshalJSON(data []byte) error

type BillingAddressFieldMode ¶ added in v0.7.2

type BillingAddressFieldMode string
const (
	BillingAddressFieldModeRequired BillingAddressFieldMode = "required"
	BillingAddressFieldModeOptional BillingAddressFieldMode = "optional"
	BillingAddressFieldModeDisabled BillingAddressFieldMode = "disabled"
)

func (BillingAddressFieldMode) ToPointer ¶ added in v0.7.2

func (*BillingAddressFieldMode) UnmarshalJSON ¶ added in v0.7.2

func (e *BillingAddressFieldMode) UnmarshalJSON(data []byte) error

type CanceledSubscriptions ¶ added in v0.9.0

type CanceledSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CanceledSubscriptionsType
}

func CreateCanceledSubscriptionsInteger ¶ added in v0.9.0

func CreateCanceledSubscriptionsInteger(integer int64) CanceledSubscriptions

func CreateCanceledSubscriptionsNumber ¶ added in v0.9.0

func CreateCanceledSubscriptionsNumber(number float64) CanceledSubscriptions

func (CanceledSubscriptions) MarshalJSON ¶ added in v0.9.0

func (u CanceledSubscriptions) MarshalJSON() ([]byte, error)

func (*CanceledSubscriptions) UnmarshalJSON ¶ added in v0.9.0

func (u *CanceledSubscriptions) UnmarshalJSON(data []byte) error

type CanceledSubscriptionsCustomerService ¶ added in v0.9.0

type CanceledSubscriptionsCustomerService struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CanceledSubscriptionsCustomerServiceType
}

func CreateCanceledSubscriptionsCustomerServiceInteger ¶ added in v0.9.0

func CreateCanceledSubscriptionsCustomerServiceInteger(integer int64) CanceledSubscriptionsCustomerService

func CreateCanceledSubscriptionsCustomerServiceNumber ¶ added in v0.9.0

func CreateCanceledSubscriptionsCustomerServiceNumber(number float64) CanceledSubscriptionsCustomerService

func (CanceledSubscriptionsCustomerService) MarshalJSON ¶ added in v0.9.0

func (u CanceledSubscriptionsCustomerService) MarshalJSON() ([]byte, error)

func (*CanceledSubscriptionsCustomerService) UnmarshalJSON ¶ added in v0.9.0

func (u *CanceledSubscriptionsCustomerService) UnmarshalJSON(data []byte) error

type CanceledSubscriptionsCustomerServiceType ¶ added in v0.9.0

type CanceledSubscriptionsCustomerServiceType string
const (
	CanceledSubscriptionsCustomerServiceTypeInteger CanceledSubscriptionsCustomerServiceType = "integer"
	CanceledSubscriptionsCustomerServiceTypeNumber  CanceledSubscriptionsCustomerServiceType = "number"
)

type CanceledSubscriptionsLowQuality ¶ added in v0.9.0

type CanceledSubscriptionsLowQuality struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CanceledSubscriptionsLowQualityType
}

func CreateCanceledSubscriptionsLowQualityInteger ¶ added in v0.9.0

func CreateCanceledSubscriptionsLowQualityInteger(integer int64) CanceledSubscriptionsLowQuality

func CreateCanceledSubscriptionsLowQualityNumber ¶ added in v0.9.0

func CreateCanceledSubscriptionsLowQualityNumber(number float64) CanceledSubscriptionsLowQuality

func (CanceledSubscriptionsLowQuality) MarshalJSON ¶ added in v0.9.0

func (u CanceledSubscriptionsLowQuality) MarshalJSON() ([]byte, error)

func (*CanceledSubscriptionsLowQuality) UnmarshalJSON ¶ added in v0.9.0

func (u *CanceledSubscriptionsLowQuality) UnmarshalJSON(data []byte) error

type CanceledSubscriptionsLowQualityType ¶ added in v0.9.0

type CanceledSubscriptionsLowQualityType string
const (
	CanceledSubscriptionsLowQualityTypeInteger CanceledSubscriptionsLowQualityType = "integer"
	CanceledSubscriptionsLowQualityTypeNumber  CanceledSubscriptionsLowQualityType = "number"
)

type CanceledSubscriptionsMissingFeatures ¶ added in v0.9.0

type CanceledSubscriptionsMissingFeatures struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CanceledSubscriptionsMissingFeaturesType
}

func CreateCanceledSubscriptionsMissingFeaturesInteger ¶ added in v0.9.0

func CreateCanceledSubscriptionsMissingFeaturesInteger(integer int64) CanceledSubscriptionsMissingFeatures

func CreateCanceledSubscriptionsMissingFeaturesNumber ¶ added in v0.9.0

func CreateCanceledSubscriptionsMissingFeaturesNumber(number float64) CanceledSubscriptionsMissingFeatures

func (CanceledSubscriptionsMissingFeatures) MarshalJSON ¶ added in v0.9.0

func (u CanceledSubscriptionsMissingFeatures) MarshalJSON() ([]byte, error)

func (*CanceledSubscriptionsMissingFeatures) UnmarshalJSON ¶ added in v0.9.0

func (u *CanceledSubscriptionsMissingFeatures) UnmarshalJSON(data []byte) error

type CanceledSubscriptionsMissingFeaturesType ¶ added in v0.9.0

type CanceledSubscriptionsMissingFeaturesType string
const (
	CanceledSubscriptionsMissingFeaturesTypeInteger CanceledSubscriptionsMissingFeaturesType = "integer"
	CanceledSubscriptionsMissingFeaturesTypeNumber  CanceledSubscriptionsMissingFeaturesType = "number"
)

type CanceledSubscriptionsOther ¶ added in v0.9.0

type CanceledSubscriptionsOther struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CanceledSubscriptionsOtherType
}

func CreateCanceledSubscriptionsOtherInteger ¶ added in v0.9.0

func CreateCanceledSubscriptionsOtherInteger(integer int64) CanceledSubscriptionsOther

func CreateCanceledSubscriptionsOtherNumber ¶ added in v0.9.0

func CreateCanceledSubscriptionsOtherNumber(number float64) CanceledSubscriptionsOther

func (CanceledSubscriptionsOther) MarshalJSON ¶ added in v0.9.0

func (u CanceledSubscriptionsOther) MarshalJSON() ([]byte, error)

func (*CanceledSubscriptionsOther) UnmarshalJSON ¶ added in v0.9.0

func (u *CanceledSubscriptionsOther) UnmarshalJSON(data []byte) error

type CanceledSubscriptionsOtherType ¶ added in v0.9.0

type CanceledSubscriptionsOtherType string
const (
	CanceledSubscriptionsOtherTypeInteger CanceledSubscriptionsOtherType = "integer"
	CanceledSubscriptionsOtherTypeNumber  CanceledSubscriptionsOtherType = "number"
)

type CanceledSubscriptionsSwitchedService ¶ added in v0.9.0

type CanceledSubscriptionsSwitchedService struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CanceledSubscriptionsSwitchedServiceType
}

func CreateCanceledSubscriptionsSwitchedServiceInteger ¶ added in v0.9.0

func CreateCanceledSubscriptionsSwitchedServiceInteger(integer int64) CanceledSubscriptionsSwitchedService

func CreateCanceledSubscriptionsSwitchedServiceNumber ¶ added in v0.9.0

func CreateCanceledSubscriptionsSwitchedServiceNumber(number float64) CanceledSubscriptionsSwitchedService

func (CanceledSubscriptionsSwitchedService) MarshalJSON ¶ added in v0.9.0

func (u CanceledSubscriptionsSwitchedService) MarshalJSON() ([]byte, error)

func (*CanceledSubscriptionsSwitchedService) UnmarshalJSON ¶ added in v0.9.0

func (u *CanceledSubscriptionsSwitchedService) UnmarshalJSON(data []byte) error

type CanceledSubscriptionsSwitchedServiceType ¶ added in v0.9.0

type CanceledSubscriptionsSwitchedServiceType string
const (
	CanceledSubscriptionsSwitchedServiceTypeInteger CanceledSubscriptionsSwitchedServiceType = "integer"
	CanceledSubscriptionsSwitchedServiceTypeNumber  CanceledSubscriptionsSwitchedServiceType = "number"
)

type CanceledSubscriptionsTooComplex ¶ added in v0.9.0

type CanceledSubscriptionsTooComplex struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CanceledSubscriptionsTooComplexType
}

func CreateCanceledSubscriptionsTooComplexInteger ¶ added in v0.9.0

func CreateCanceledSubscriptionsTooComplexInteger(integer int64) CanceledSubscriptionsTooComplex

func CreateCanceledSubscriptionsTooComplexNumber ¶ added in v0.9.0

func CreateCanceledSubscriptionsTooComplexNumber(number float64) CanceledSubscriptionsTooComplex

func (CanceledSubscriptionsTooComplex) MarshalJSON ¶ added in v0.9.0

func (u CanceledSubscriptionsTooComplex) MarshalJSON() ([]byte, error)

func (*CanceledSubscriptionsTooComplex) UnmarshalJSON ¶ added in v0.9.0

func (u *CanceledSubscriptionsTooComplex) UnmarshalJSON(data []byte) error

type CanceledSubscriptionsTooComplexType ¶ added in v0.9.0

type CanceledSubscriptionsTooComplexType string
const (
	CanceledSubscriptionsTooComplexTypeInteger CanceledSubscriptionsTooComplexType = "integer"
	CanceledSubscriptionsTooComplexTypeNumber  CanceledSubscriptionsTooComplexType = "number"
)

type CanceledSubscriptionsTooExpensive ¶ added in v0.9.0

type CanceledSubscriptionsTooExpensive struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CanceledSubscriptionsTooExpensiveType
}

func CreateCanceledSubscriptionsTooExpensiveInteger ¶ added in v0.9.0

func CreateCanceledSubscriptionsTooExpensiveInteger(integer int64) CanceledSubscriptionsTooExpensive

func CreateCanceledSubscriptionsTooExpensiveNumber ¶ added in v0.9.0

func CreateCanceledSubscriptionsTooExpensiveNumber(number float64) CanceledSubscriptionsTooExpensive

func (CanceledSubscriptionsTooExpensive) MarshalJSON ¶ added in v0.9.0

func (u CanceledSubscriptionsTooExpensive) MarshalJSON() ([]byte, error)

func (*CanceledSubscriptionsTooExpensive) UnmarshalJSON ¶ added in v0.9.0

func (u *CanceledSubscriptionsTooExpensive) UnmarshalJSON(data []byte) error

type CanceledSubscriptionsTooExpensiveType ¶ added in v0.9.0

type CanceledSubscriptionsTooExpensiveType string
const (
	CanceledSubscriptionsTooExpensiveTypeInteger CanceledSubscriptionsTooExpensiveType = "integer"
	CanceledSubscriptionsTooExpensiveTypeNumber  CanceledSubscriptionsTooExpensiveType = "number"
)

type CanceledSubscriptionsType ¶ added in v0.9.0

type CanceledSubscriptionsType string
const (
	CanceledSubscriptionsTypeInteger CanceledSubscriptionsType = "integer"
	CanceledSubscriptionsTypeNumber  CanceledSubscriptionsType = "number"
)

type CanceledSubscriptionsUnused ¶ added in v0.9.0

type CanceledSubscriptionsUnused struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CanceledSubscriptionsUnusedType
}

func CreateCanceledSubscriptionsUnusedInteger ¶ added in v0.9.0

func CreateCanceledSubscriptionsUnusedInteger(integer int64) CanceledSubscriptionsUnused

func CreateCanceledSubscriptionsUnusedNumber ¶ added in v0.9.0

func CreateCanceledSubscriptionsUnusedNumber(number float64) CanceledSubscriptionsUnused

func (CanceledSubscriptionsUnused) MarshalJSON ¶ added in v0.9.0

func (u CanceledSubscriptionsUnused) MarshalJSON() ([]byte, error)

func (*CanceledSubscriptionsUnused) UnmarshalJSON ¶ added in v0.9.0

func (u *CanceledSubscriptionsUnused) UnmarshalJSON(data []byte) error

type CanceledSubscriptionsUnusedType ¶ added in v0.9.0

type CanceledSubscriptionsUnusedType string
const (
	CanceledSubscriptionsUnusedTypeInteger CanceledSubscriptionsUnusedType = "integer"
	CanceledSubscriptionsUnusedTypeNumber  CanceledSubscriptionsUnusedType = "number"
)

type CardPayment ¶ added in v0.4.17

type CardPayment struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID        string           `json:"id"`
	Processor PaymentProcessor `json:"processor"`
	Status    PaymentStatus    `json:"status"`
	// The payment amount in cents.
	Amount int64 `json:"amount"`
	// The payment currency. Currently, only `usd` is supported.
	Currency string `json:"currency"`

	// Error code, if the payment was declined.
	DeclineReason *string `json:"decline_reason"`
	// Human-readable error message, if the payment was declined.
	DeclineMessage *string `json:"decline_message"`
	// The ID of the organization that owns the payment.
	OrganizationID string `json:"organization_id"`
	// The ID of the checkout session associated with this payment.
	CheckoutID *string `json:"checkout_id"`
	// The ID of the order associated with this payment.
	OrderID *string `json:"order_id"`
	// Additional metadata from the payment processor for internal use.
	ProcessorMetadata map[string]any `json:"processor_metadata,omitempty"`
	// Additional metadata for a card payment method.
	MethodMetadata CardPaymentMetadata `json:"method_metadata"`
	// contains filtered or unexported fields
}

CardPayment - Schema of a payment with a card payment method.

func (*CardPayment) GetAmount ¶ added in v0.4.17

func (c *CardPayment) GetAmount() int64

func (*CardPayment) GetCheckoutID ¶ added in v0.4.17

func (c *CardPayment) GetCheckoutID() *string

func (*CardPayment) GetCreatedAt ¶ added in v0.4.17

func (c *CardPayment) GetCreatedAt() time.Time

func (*CardPayment) GetCurrency ¶ added in v0.4.17

func (c *CardPayment) GetCurrency() string

func (*CardPayment) GetDeclineMessage ¶ added in v0.4.17

func (c *CardPayment) GetDeclineMessage() *string

func (*CardPayment) GetDeclineReason ¶ added in v0.4.17

func (c *CardPayment) GetDeclineReason() *string

func (*CardPayment) GetID ¶ added in v0.4.17

func (c *CardPayment) GetID() string

func (*CardPayment) GetMethod ¶ added in v0.4.17

func (c *CardPayment) GetMethod() string

func (*CardPayment) GetMethodMetadata ¶ added in v0.4.17

func (c *CardPayment) GetMethodMetadata() CardPaymentMetadata

func (*CardPayment) GetModifiedAt ¶ added in v0.4.17

func (c *CardPayment) GetModifiedAt() *time.Time

func (*CardPayment) GetOrderID ¶ added in v0.4.17

func (c *CardPayment) GetOrderID() *string

func (*CardPayment) GetOrganizationID ¶ added in v0.4.17

func (c *CardPayment) GetOrganizationID() string

func (*CardPayment) GetProcessor ¶ added in v0.4.17

func (c *CardPayment) GetProcessor() PaymentProcessor

func (*CardPayment) GetProcessorMetadata ¶ added in v0.8.1

func (c *CardPayment) GetProcessorMetadata() map[string]any

func (*CardPayment) GetStatus ¶ added in v0.4.17

func (c *CardPayment) GetStatus() PaymentStatus

func (CardPayment) MarshalJSON ¶ added in v0.4.17

func (c CardPayment) MarshalJSON() ([]byte, error)

func (*CardPayment) UnmarshalJSON ¶ added in v0.4.17

func (c *CardPayment) UnmarshalJSON(data []byte) error

type CardPaymentMetadata ¶ added in v0.4.17

type CardPaymentMetadata struct {
	// The brand of the card used for the payment.
	Brand string `json:"brand"`
	// The last 4 digits of the card number.
	Last4 string `json:"last4"`
}

CardPaymentMetadata - Additional metadata for a card payment method.

func (*CardPaymentMetadata) GetBrand ¶ added in v0.4.17

func (c *CardPaymentMetadata) GetBrand() string

func (*CardPaymentMetadata) GetLast4 ¶ added in v0.4.17

func (c *CardPaymentMetadata) GetLast4() string

func (CardPaymentMetadata) MarshalJSON ¶ added in v0.8.4

func (c CardPaymentMetadata) MarshalJSON() ([]byte, error)

func (*CardPaymentMetadata) UnmarshalJSON ¶ added in v0.8.4

func (c *CardPaymentMetadata) UnmarshalJSON(data []byte) error

type Cashflow ¶ added in v0.12.0

type Cashflow struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CashflowType
}

func CreateCashflowInteger ¶ added in v0.12.0

func CreateCashflowInteger(integer int64) Cashflow

func CreateCashflowNumber ¶ added in v0.12.0

func CreateCashflowNumber(number float64) Cashflow

func (Cashflow) MarshalJSON ¶ added in v0.12.0

func (u Cashflow) MarshalJSON() ([]byte, error)

func (*Cashflow) UnmarshalJSON ¶ added in v0.12.0

func (u *Cashflow) UnmarshalJSON(data []byte) error

type CashflowType ¶ added in v0.12.0

type CashflowType string
const (
	CashflowTypeInteger CashflowType = "integer"
	CashflowTypeNumber  CashflowType = "number"
)

type Checkout ¶

type Checkout struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// Key-value object storing custom field values.
	CustomFieldData  map[string]*CheckoutCustomFieldData `json:"custom_field_data,omitempty"`
	PaymentProcessor PaymentProcessor                    `json:"payment_processor"`
	Status           CheckoutStatus                      `json:"status"`
	// Client secret used to update and complete the checkout session from the client.
	ClientSecret string `json:"client_secret"`
	// URL where the customer can access the checkout session.
	URL string `json:"url"`
	// Expiration date and time of the checkout session.
	ExpiresAt time.Time `json:"expires_at"`
	// URL where the customer will be redirected after a successful payment.
	SuccessURL string `json:"success_url"`
	// When set, a back button will be shown in the checkout to return to this URL.
	ReturnURL *string `json:"return_url"`
	// When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page.
	EmbedOrigin *string `json:"embed_origin"`
	// Amount in cents, before discounts and taxes.
	Amount int64 `json:"amount"`
	// Predefined number of seats (works with seat-based pricing only)
	Seats *int64 `json:"seats,omitempty"`
	// Minimum number of seats (works with seat-based pricing only)
	MinSeats *int64 `json:"min_seats,omitempty"`
	// Maximum number of seats (works with seat-based pricing only)
	MaxSeats *int64 `json:"max_seats,omitempty"`
	// Discount amount in cents.
	DiscountAmount int64 `json:"discount_amount"`
	// Amount in cents, after discounts but before taxes.
	NetAmount int64 `json:"net_amount"`
	// Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it.
	TaxAmount *int64 `json:"tax_amount"`
	// Amount in cents, after discounts and taxes.
	TotalAmount int64 `json:"total_amount"`
	// Currency code of the checkout session.
	Currency string `json:"currency"`
	// Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.
	AllowTrial *bool `json:"allow_trial"`
	// Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product.
	ActiveTrialInterval *TrialInterval `json:"active_trial_interval"`
	// Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product.
	ActiveTrialIntervalCount *int64 `json:"active_trial_interval_count"`
	// End date and time of the trial period, if any.
	TrialEnd *time.Time `json:"trial_end"`
	// ID of the organization owning the checkout session.
	OrganizationID string `json:"organization_id"`
	// ID of the product to checkout.
	ProductID *string `json:"product_id"`
	// ID of the product price to checkout.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	ProductPriceID *string `json:"product_price_id"`
	// ID of the discount applied to the checkout.
	DiscountID *string `json:"discount_id"`
	// Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.
	AllowDiscountCodes bool `json:"allow_discount_codes"`
	// Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.
	RequireBillingAddress bool `json:"require_billing_address"`
	// Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.
	IsDiscountApplicable bool `json:"is_discount_applicable"`
	// Whether the product price is free, regardless of discounts.
	IsFreeProductPrice bool `json:"is_free_product_price"`
	// Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.
	IsPaymentRequired bool `json:"is_payment_required"`
	// Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.
	IsPaymentSetupRequired bool `json:"is_payment_setup_required"`
	// Whether the checkout requires a payment form, whether because of a payment or payment method setup.
	IsPaymentFormRequired bool    `json:"is_payment_form_required"`
	CustomerID            *string `json:"customer_id"`
	// Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.
	IsBusinessCustomer bool `json:"is_business_customer"`
	// Name of the customer.
	CustomerName *string `json:"customer_name"`
	// Email address of the customer.
	CustomerEmail            *string                      `json:"customer_email"`
	CustomerIPAddress        *string                      `json:"customer_ip_address"`
	CustomerBillingName      *string                      `json:"customer_billing_name"`
	CustomerBillingAddress   *Address                     `json:"customer_billing_address"`
	CustomerTaxID            *string                      `json:"customer_tax_id"`
	Locale                   *string                      `json:"locale,omitempty"`
	PaymentProcessorMetadata map[string]string            `json:"payment_processor_metadata"`
	BillingAddressFields     CheckoutBillingAddressFields `json:"billing_address_fields"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64                        `json:"trial_interval_count"`
	Metadata           map[string]MetadataOutputType `json:"metadata"`
	// ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set.
	ExternalCustomerID *string `json:"external_customer_id"`
	// List of products available to select.
	Products []CheckoutProduct `json:"products"`
	// Product selected to checkout.
	Product *CheckoutProduct `json:"product"`
	// Price of the selected product.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	ProductPrice *CheckoutProductPrice `json:"product_price"`
	// Mapping of product IDs to their list of prices.
	Prices               map[string][]CheckoutPrices `json:"prices"`
	Discount             *CheckoutDiscount           `json:"discount"`
	SubscriptionID       *string                     `json:"subscription_id"`
	AttachedCustomFields []AttachedCustomField       `json:"attached_custom_fields"`
	CustomerMetadata     map[string]CustomerMetadata `json:"customer_metadata"`
}

Checkout session data retrieved using an access token.

func (*Checkout) GetActiveTrialInterval ¶ added in v0.9.1

func (c *Checkout) GetActiveTrialInterval() *TrialInterval

func (*Checkout) GetActiveTrialIntervalCount ¶ added in v0.9.1

func (c *Checkout) GetActiveTrialIntervalCount() *int64

func (*Checkout) GetAllowDiscountCodes ¶

func (c *Checkout) GetAllowDiscountCodes() bool

func (*Checkout) GetAllowTrial ¶ added in v0.13.0

func (c *Checkout) GetAllowTrial() *bool

func (*Checkout) GetAmount ¶

func (c *Checkout) GetAmount() int64

func (*Checkout) GetAttachedCustomFields ¶

func (c *Checkout) GetAttachedCustomFields() []AttachedCustomField

func (*Checkout) GetBillingAddressFields ¶ added in v0.7.2

func (c *Checkout) GetBillingAddressFields() CheckoutBillingAddressFields

func (*Checkout) GetClientSecret ¶

func (c *Checkout) GetClientSecret() string

func (*Checkout) GetCreatedAt ¶

func (c *Checkout) GetCreatedAt() time.Time

func (*Checkout) GetCurrency ¶

func (c *Checkout) GetCurrency() string

func (*Checkout) GetCustomFieldData ¶

func (c *Checkout) GetCustomFieldData() map[string]*CheckoutCustomFieldData

func (*Checkout) GetCustomerBillingAddress ¶

func (c *Checkout) GetCustomerBillingAddress() *Address

func (*Checkout) GetCustomerBillingName ¶ added in v0.4.20

func (c *Checkout) GetCustomerBillingName() *string

func (*Checkout) GetCustomerEmail ¶

func (c *Checkout) GetCustomerEmail() *string

func (*Checkout) GetCustomerID ¶

func (c *Checkout) GetCustomerID() *string

func (*Checkout) GetCustomerIPAddress ¶

func (c *Checkout) GetCustomerIPAddress() *string

func (*Checkout) GetCustomerMetadata ¶

func (c *Checkout) GetCustomerMetadata() map[string]CustomerMetadata

func (*Checkout) GetCustomerName ¶

func (c *Checkout) GetCustomerName() *string

func (*Checkout) GetCustomerTaxID ¶

func (c *Checkout) GetCustomerTaxID() *string

func (*Checkout) GetDiscount ¶

func (c *Checkout) GetDiscount() *CheckoutDiscount

func (*Checkout) GetDiscountAmount ¶ added in v0.4.8

func (c *Checkout) GetDiscountAmount() int64

func (*Checkout) GetDiscountID ¶

func (c *Checkout) GetDiscountID() *string

func (*Checkout) GetEmbedOrigin ¶

func (c *Checkout) GetEmbedOrigin() *string

func (*Checkout) GetExpiresAt ¶

func (c *Checkout) GetExpiresAt() time.Time

func (*Checkout) GetExternalCustomerID ¶ added in v0.7.0

func (c *Checkout) GetExternalCustomerID() *string

func (*Checkout) GetID ¶

func (c *Checkout) GetID() string

func (*Checkout) GetIsBusinessCustomer ¶ added in v0.4.20

func (c *Checkout) GetIsBusinessCustomer() bool

func (*Checkout) GetIsDiscountApplicable ¶

func (c *Checkout) GetIsDiscountApplicable() bool

func (*Checkout) GetIsFreeProductPrice ¶

func (c *Checkout) GetIsFreeProductPrice() bool

func (*Checkout) GetIsPaymentFormRequired ¶

func (c *Checkout) GetIsPaymentFormRequired() bool

func (*Checkout) GetIsPaymentRequired ¶

func (c *Checkout) GetIsPaymentRequired() bool

func (*Checkout) GetIsPaymentSetupRequired ¶

func (c *Checkout) GetIsPaymentSetupRequired() bool

func (*Checkout) GetLocale ¶ added in v0.13.0

func (c *Checkout) GetLocale() *string

func (*Checkout) GetMaxSeats ¶ added in v0.15.0

func (c *Checkout) GetMaxSeats() *int64

func (*Checkout) GetMetadata ¶

func (c *Checkout) GetMetadata() map[string]MetadataOutputType

func (*Checkout) GetMinSeats ¶ added in v0.15.0

func (c *Checkout) GetMinSeats() *int64

func (*Checkout) GetModifiedAt ¶

func (c *Checkout) GetModifiedAt() *time.Time

func (*Checkout) GetNetAmount ¶ added in v0.4.8

func (c *Checkout) GetNetAmount() int64

func (*Checkout) GetOrganizationID ¶ added in v0.12.0

func (c *Checkout) GetOrganizationID() string

func (*Checkout) GetPaymentProcessor ¶

func (c *Checkout) GetPaymentProcessor() PaymentProcessor

func (*Checkout) GetPaymentProcessorMetadata ¶

func (c *Checkout) GetPaymentProcessorMetadata() map[string]string

func (*Checkout) GetPrices ¶ added in v0.13.0

func (c *Checkout) GetPrices() map[string][]CheckoutPrices

func (*Checkout) GetProduct ¶

func (c *Checkout) GetProduct() *CheckoutProduct

func (*Checkout) GetProductID ¶

func (c *Checkout) GetProductID() *string

func (*Checkout) GetProductPrice ¶

func (c *Checkout) GetProductPrice() *CheckoutProductPrice

func (*Checkout) GetProductPriceID ¶

func (c *Checkout) GetProductPriceID() *string

func (*Checkout) GetProducts ¶ added in v0.3.0

func (c *Checkout) GetProducts() []CheckoutProduct

func (*Checkout) GetRequireBillingAddress ¶ added in v0.4.14

func (c *Checkout) GetRequireBillingAddress() bool

func (*Checkout) GetReturnURL ¶ added in v0.10.1

func (c *Checkout) GetReturnURL() *string

func (*Checkout) GetSeats ¶ added in v0.10.0

func (c *Checkout) GetSeats() *int64

func (*Checkout) GetStatus ¶

func (c *Checkout) GetStatus() CheckoutStatus

func (*Checkout) GetSubscriptionID ¶

func (c *Checkout) GetSubscriptionID() *string

func (*Checkout) GetSuccessURL ¶

func (c *Checkout) GetSuccessURL() string

func (*Checkout) GetTaxAmount ¶

func (c *Checkout) GetTaxAmount() *int64

func (*Checkout) GetTotalAmount ¶

func (c *Checkout) GetTotalAmount() int64

func (*Checkout) GetTrialEnd ¶ added in v0.9.1

func (c *Checkout) GetTrialEnd() *time.Time

func (*Checkout) GetTrialInterval ¶ added in v0.9.1

func (c *Checkout) GetTrialInterval() *TrialInterval

func (*Checkout) GetTrialIntervalCount ¶ added in v0.9.1

func (c *Checkout) GetTrialIntervalCount() *int64

func (*Checkout) GetURL ¶

func (c *Checkout) GetURL() string

func (Checkout) MarshalJSON ¶

func (c Checkout) MarshalJSON() ([]byte, error)

func (*Checkout) UnmarshalJSON ¶

func (c *Checkout) UnmarshalJSON(data []byte) error

type CheckoutBillingAddressFields ¶ added in v0.7.2

type CheckoutBillingAddressFields struct {
	Country    BillingAddressFieldMode `json:"country"`
	State      BillingAddressFieldMode `json:"state"`
	City       BillingAddressFieldMode `json:"city"`
	PostalCode BillingAddressFieldMode `json:"postal_code"`
	Line1      BillingAddressFieldMode `json:"line1"`
	Line2      BillingAddressFieldMode `json:"line2"`
}

func (*CheckoutBillingAddressFields) GetCity ¶ added in v0.7.2

func (*CheckoutBillingAddressFields) GetCountry ¶ added in v0.7.2

func (*CheckoutBillingAddressFields) GetLine1 ¶ added in v0.7.2

func (*CheckoutBillingAddressFields) GetLine2 ¶ added in v0.7.2

func (*CheckoutBillingAddressFields) GetPostalCode ¶ added in v0.7.2

func (*CheckoutBillingAddressFields) GetState ¶ added in v0.7.2

type CheckoutConfirmStripe ¶

type CheckoutConfirmStripe struct {
	// Key-value object storing custom field values.
	CustomFieldData map[string]*CheckoutConfirmStripeCustomFieldData `json:"custom_field_data,omitempty"`
	// ID of the product to checkout. Must be present in the checkout's product list.
	ProductID *string `json:"product_id,omitempty"`
	// ID of the product price to checkout. Must correspond to a price present in the checkout's product list.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	ProductPriceID *string `json:"product_price_id,omitempty"`
	Amount         *int64  `json:"amount,omitempty"`
	// Number of seats for seat-based pricing.
	Seats                  *int64        `json:"seats,omitempty"`
	IsBusinessCustomer     *bool         `json:"is_business_customer,omitempty"`
	CustomerName           *string       `json:"customer_name,omitempty"`
	CustomerEmail          *string       `json:"customer_email,omitempty"`
	CustomerBillingName    *string       `json:"customer_billing_name,omitempty"`
	CustomerBillingAddress *AddressInput `json:"customer_billing_address,omitempty"`
	CustomerTaxID          *string       `json:"customer_tax_id,omitempty"`
	Locale                 *string       `json:"locale,omitempty"`
	// Discount code to apply to the checkout.
	DiscountCode *string `json:"discount_code,omitempty"`

	// ID of the Stripe confirmation token. Required for fixed prices and custom prices.
	ConfirmationTokenID *string `json:"confirmation_token_id,omitempty"`
	// contains filtered or unexported fields
}

CheckoutConfirmStripe - Confirm a checkout session using a Stripe confirmation token.

func (*CheckoutConfirmStripe) GetAllowTrial ¶ added in v0.13.0

func (c *CheckoutConfirmStripe) GetAllowTrial() *bool

func (*CheckoutConfirmStripe) GetAmount ¶

func (c *CheckoutConfirmStripe) GetAmount() *int64

func (*CheckoutConfirmStripe) GetConfirmationTokenID ¶

func (c *CheckoutConfirmStripe) GetConfirmationTokenID() *string

func (*CheckoutConfirmStripe) GetCustomFieldData ¶

func (*CheckoutConfirmStripe) GetCustomerBillingAddress ¶

func (c *CheckoutConfirmStripe) GetCustomerBillingAddress() *AddressInput

func (*CheckoutConfirmStripe) GetCustomerBillingName ¶ added in v0.4.20

func (c *CheckoutConfirmStripe) GetCustomerBillingName() *string

func (*CheckoutConfirmStripe) GetCustomerEmail ¶

func (c *CheckoutConfirmStripe) GetCustomerEmail() *string

func (*CheckoutConfirmStripe) GetCustomerName ¶

func (c *CheckoutConfirmStripe) GetCustomerName() *string

func (*CheckoutConfirmStripe) GetCustomerTaxID ¶

func (c *CheckoutConfirmStripe) GetCustomerTaxID() *string

func (*CheckoutConfirmStripe) GetDiscountCode ¶

func (c *CheckoutConfirmStripe) GetDiscountCode() *string

func (*CheckoutConfirmStripe) GetIsBusinessCustomer ¶ added in v0.4.20

func (c *CheckoutConfirmStripe) GetIsBusinessCustomer() *bool

func (*CheckoutConfirmStripe) GetLocale ¶ added in v0.13.0

func (c *CheckoutConfirmStripe) GetLocale() *string

func (*CheckoutConfirmStripe) GetProductID ¶ added in v0.3.0

func (c *CheckoutConfirmStripe) GetProductID() *string

func (*CheckoutConfirmStripe) GetProductPriceID ¶

func (c *CheckoutConfirmStripe) GetProductPriceID() *string

func (*CheckoutConfirmStripe) GetSeats ¶ added in v0.10.0

func (c *CheckoutConfirmStripe) GetSeats() *int64

func (CheckoutConfirmStripe) MarshalJSON ¶ added in v0.13.0

func (c CheckoutConfirmStripe) MarshalJSON() ([]byte, error)

func (*CheckoutConfirmStripe) UnmarshalJSON ¶ added in v0.13.0

func (c *CheckoutConfirmStripe) UnmarshalJSON(data []byte) error

type CheckoutConfirmStripeCustomFieldData ¶

type CheckoutConfirmStripeCustomFieldData struct {
	Str      *string    `queryParam:"inline" union:"member"`
	Integer  *int64     `queryParam:"inline" union:"member"`
	Boolean  *bool      `queryParam:"inline" union:"member"`
	DateTime *time.Time `queryParam:"inline" union:"member"`

	Type CheckoutConfirmStripeCustomFieldDataType
}

func CreateCheckoutConfirmStripeCustomFieldDataBoolean ¶ added in v0.1.5

func CreateCheckoutConfirmStripeCustomFieldDataBoolean(boolean bool) CheckoutConfirmStripeCustomFieldData

func CreateCheckoutConfirmStripeCustomFieldDataDateTime ¶ added in v0.1.5

func CreateCheckoutConfirmStripeCustomFieldDataDateTime(dateTime time.Time) CheckoutConfirmStripeCustomFieldData

func CreateCheckoutConfirmStripeCustomFieldDataInteger ¶ added in v0.1.5

func CreateCheckoutConfirmStripeCustomFieldDataInteger(integer int64) CheckoutConfirmStripeCustomFieldData

func CreateCheckoutConfirmStripeCustomFieldDataStr ¶ added in v0.1.5

func CreateCheckoutConfirmStripeCustomFieldDataStr(str string) CheckoutConfirmStripeCustomFieldData

func (CheckoutConfirmStripeCustomFieldData) MarshalJSON ¶ added in v0.1.5

func (u CheckoutConfirmStripeCustomFieldData) MarshalJSON() ([]byte, error)

func (*CheckoutConfirmStripeCustomFieldData) UnmarshalJSON ¶ added in v0.1.5

func (u *CheckoutConfirmStripeCustomFieldData) UnmarshalJSON(data []byte) error

type CheckoutConfirmStripeCustomFieldDataType ¶ added in v0.1.5

type CheckoutConfirmStripeCustomFieldDataType string
const (
	CheckoutConfirmStripeCustomFieldDataTypeStr      CheckoutConfirmStripeCustomFieldDataType = "str"
	CheckoutConfirmStripeCustomFieldDataTypeInteger  CheckoutConfirmStripeCustomFieldDataType = "integer"
	CheckoutConfirmStripeCustomFieldDataTypeBoolean  CheckoutConfirmStripeCustomFieldDataType = "boolean"
	CheckoutConfirmStripeCustomFieldDataTypeDateTime CheckoutConfirmStripeCustomFieldDataType = "date-time"
)

type CheckoutCreate ¶

type CheckoutCreate struct {
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval,omitempty"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count,omitempty"`
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CheckoutCreateMetadata `json:"metadata,omitempty"`
	// Key-value object storing custom field values.
	CustomFieldData map[string]*CheckoutCreateCustomFieldData `json:"custom_field_data,omitempty"`
	// ID of the discount to apply to the checkout.
	DiscountID *string `json:"discount_id,omitempty"`
	// Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.
	AllowDiscountCodes *bool `default:"true" json:"allow_discount_codes"`
	// Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.
	RequireBillingAddress *bool  `default:"false" json:"require_billing_address"`
	Amount                *int64 `json:"amount,omitempty"`
	// Predefined number of seats (works with seat-based pricing only)
	Seats *int64 `json:"seats,omitempty"`
	// Minimum number of seats (works with seat-based pricing only)
	MinSeats *int64 `json:"min_seats,omitempty"`
	// Maximum number of seats (works with seat-based pricing only)
	MaxSeats *int64 `json:"max_seats,omitempty"`
	// Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.
	AllowTrial *bool `default:"true" json:"allow_trial"`
	// ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer.
	CustomerID *string `json:"customer_id,omitempty"`
	// Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.
	IsBusinessCustomer *bool `default:"false" json:"is_business_customer"`
	// ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set.
	ExternalCustomerID     *string       `json:"external_customer_id,omitempty"`
	CustomerName           *string       `json:"customer_name,omitempty"`
	CustomerEmail          *string       `json:"customer_email,omitempty"`
	CustomerIPAddress      *string       `json:"customer_ip_address,omitempty"`
	CustomerBillingName    *string       `json:"customer_billing_name,omitempty"`
	CustomerBillingAddress *AddressInput `json:"customer_billing_address,omitempty"`
	CustomerTaxID          *string       `json:"customer_tax_id,omitempty"`
	// Key-value object allowing you to store additional information that'll be copied to the created customer.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	CustomerMetadata map[string]CheckoutCreateCustomerMetadata `json:"customer_metadata,omitempty"`
	// ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten.
	SubscriptionID *string `json:"subscription_id,omitempty"`
	// URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.
	SuccessURL *string `json:"success_url,omitempty"`
	// When set, a back button will be shown in the checkout to return to this URL.
	ReturnURL *string `json:"return_url,omitempty"`
	// If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page.
	EmbedOrigin *string              `json:"embed_origin,omitempty"`
	Locale      *string              `json:"locale,omitempty"`
	Currency    *PresentmentCurrency `json:"currency,omitempty"`
	// List of product IDs available to select at that checkout. The first one will be selected by default.
	Products []string `json:"products"`
	// Optional mapping of product IDs to a list of ad-hoc prices to create for that product. If not set, catalog prices of the product will be used.
	Prices map[string][]CheckoutCreatePrices `json:"prices,omitempty"`
}

CheckoutCreate - Create a new checkout session from a list of products. Customers will be able to switch between those products.

Metadata set on the checkout will be copied to the resulting order and/or subscription.

func (*CheckoutCreate) GetAllowDiscountCodes ¶ added in v0.4.13

func (c *CheckoutCreate) GetAllowDiscountCodes() *bool

func (*CheckoutCreate) GetAllowTrial ¶ added in v0.13.0

func (c *CheckoutCreate) GetAllowTrial() *bool

func (*CheckoutCreate) GetAmount ¶ added in v0.4.13

func (c *CheckoutCreate) GetAmount() *int64

func (*CheckoutCreate) GetCurrency ¶ added in v0.13.0

func (c *CheckoutCreate) GetCurrency() *PresentmentCurrency

func (*CheckoutCreate) GetCustomFieldData ¶ added in v0.4.13

func (c *CheckoutCreate) GetCustomFieldData() map[string]*CheckoutCreateCustomFieldData

func (*CheckoutCreate) GetCustomerBillingAddress ¶ added in v0.4.13

func (c *CheckoutCreate) GetCustomerBillingAddress() *AddressInput

func (*CheckoutCreate) GetCustomerBillingName ¶ added in v0.4.20

func (c *CheckoutCreate) GetCustomerBillingName() *string

func (*CheckoutCreate) GetCustomerEmail ¶ added in v0.4.13

func (c *CheckoutCreate) GetCustomerEmail() *string

func (*CheckoutCreate) GetCustomerID ¶ added in v0.4.13

func (c *CheckoutCreate) GetCustomerID() *string

func (*CheckoutCreate) GetCustomerIPAddress ¶ added in v0.4.13

func (c *CheckoutCreate) GetCustomerIPAddress() *string

func (*CheckoutCreate) GetCustomerMetadata ¶ added in v0.4.13

func (c *CheckoutCreate) GetCustomerMetadata() map[string]CheckoutCreateCustomerMetadata

func (*CheckoutCreate) GetCustomerName ¶ added in v0.4.13

func (c *CheckoutCreate) GetCustomerName() *string

func (*CheckoutCreate) GetCustomerTaxID ¶ added in v0.4.13

func (c *CheckoutCreate) GetCustomerTaxID() *string

func (*CheckoutCreate) GetDiscountID ¶ added in v0.4.13

func (c *CheckoutCreate) GetDiscountID() *string

func (*CheckoutCreate) GetEmbedOrigin ¶ added in v0.4.13

func (c *CheckoutCreate) GetEmbedOrigin() *string

func (*CheckoutCreate) GetExternalCustomerID ¶ added in v0.7.0

func (c *CheckoutCreate) GetExternalCustomerID() *string

func (*CheckoutCreate) GetIsBusinessCustomer ¶ added in v0.4.20

func (c *CheckoutCreate) GetIsBusinessCustomer() *bool

func (*CheckoutCreate) GetLocale ¶ added in v0.13.0

func (c *CheckoutCreate) GetLocale() *string

func (*CheckoutCreate) GetMaxSeats ¶ added in v0.15.0

func (c *CheckoutCreate) GetMaxSeats() *int64

func (*CheckoutCreate) GetMetadata ¶ added in v0.4.13

func (c *CheckoutCreate) GetMetadata() map[string]CheckoutCreateMetadata

func (*CheckoutCreate) GetMinSeats ¶ added in v0.15.0

func (c *CheckoutCreate) GetMinSeats() *int64

func (*CheckoutCreate) GetPrices ¶ added in v0.13.0

func (c *CheckoutCreate) GetPrices() map[string][]CheckoutCreatePrices

func (*CheckoutCreate) GetProducts ¶ added in v0.4.13

func (c *CheckoutCreate) GetProducts() []string

func (*CheckoutCreate) GetRequireBillingAddress ¶ added in v0.4.14

func (c *CheckoutCreate) GetRequireBillingAddress() *bool

func (*CheckoutCreate) GetReturnURL ¶ added in v0.10.1

func (c *CheckoutCreate) GetReturnURL() *string

func (*CheckoutCreate) GetSeats ¶ added in v0.10.0

func (c *CheckoutCreate) GetSeats() *int64

func (*CheckoutCreate) GetSubscriptionID ¶ added in v0.4.13

func (c *CheckoutCreate) GetSubscriptionID() *string

func (*CheckoutCreate) GetSuccessURL ¶ added in v0.4.13

func (c *CheckoutCreate) GetSuccessURL() *string

func (*CheckoutCreate) GetTrialInterval ¶ added in v0.9.1

func (c *CheckoutCreate) GetTrialInterval() *TrialInterval

func (*CheckoutCreate) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CheckoutCreate) GetTrialIntervalCount() *int64

func (CheckoutCreate) MarshalJSON ¶

func (c CheckoutCreate) MarshalJSON() ([]byte, error)

func (*CheckoutCreate) UnmarshalJSON ¶

func (c *CheckoutCreate) UnmarshalJSON(data []byte) error

type CheckoutCreateCustomFieldData ¶ added in v0.4.13

type CheckoutCreateCustomFieldData struct {
	Str      *string    `queryParam:"inline" union:"member"`
	Integer  *int64     `queryParam:"inline" union:"member"`
	Boolean  *bool      `queryParam:"inline" union:"member"`
	DateTime *time.Time `queryParam:"inline" union:"member"`

	Type CheckoutCreateCustomFieldDataType
}

func CreateCheckoutCreateCustomFieldDataBoolean ¶ added in v0.4.13

func CreateCheckoutCreateCustomFieldDataBoolean(boolean bool) CheckoutCreateCustomFieldData

func CreateCheckoutCreateCustomFieldDataDateTime ¶ added in v0.4.13

func CreateCheckoutCreateCustomFieldDataDateTime(dateTime time.Time) CheckoutCreateCustomFieldData

func CreateCheckoutCreateCustomFieldDataInteger ¶ added in v0.4.13

func CreateCheckoutCreateCustomFieldDataInteger(integer int64) CheckoutCreateCustomFieldData

func CreateCheckoutCreateCustomFieldDataStr ¶ added in v0.4.13

func CreateCheckoutCreateCustomFieldDataStr(str string) CheckoutCreateCustomFieldData

func (CheckoutCreateCustomFieldData) MarshalJSON ¶ added in v0.4.13

func (u CheckoutCreateCustomFieldData) MarshalJSON() ([]byte, error)

func (*CheckoutCreateCustomFieldData) UnmarshalJSON ¶ added in v0.4.13

func (u *CheckoutCreateCustomFieldData) UnmarshalJSON(data []byte) error

type CheckoutCreateCustomFieldDataType ¶ added in v0.4.13

type CheckoutCreateCustomFieldDataType string
const (
	CheckoutCreateCustomFieldDataTypeStr      CheckoutCreateCustomFieldDataType = "str"
	CheckoutCreateCustomFieldDataTypeInteger  CheckoutCreateCustomFieldDataType = "integer"
	CheckoutCreateCustomFieldDataTypeBoolean  CheckoutCreateCustomFieldDataType = "boolean"
	CheckoutCreateCustomFieldDataTypeDateTime CheckoutCreateCustomFieldDataType = "date-time"
)

type CheckoutCreateCustomerMetadata ¶ added in v0.4.13

type CheckoutCreateCustomerMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CheckoutCreateCustomerMetadataType
}

func CreateCheckoutCreateCustomerMetadataBoolean ¶ added in v0.4.13

func CreateCheckoutCreateCustomerMetadataBoolean(boolean bool) CheckoutCreateCustomerMetadata

func CreateCheckoutCreateCustomerMetadataInteger ¶ added in v0.4.13

func CreateCheckoutCreateCustomerMetadataInteger(integer int64) CheckoutCreateCustomerMetadata

func CreateCheckoutCreateCustomerMetadataNumber ¶ added in v0.4.13

func CreateCheckoutCreateCustomerMetadataNumber(number float64) CheckoutCreateCustomerMetadata

func CreateCheckoutCreateCustomerMetadataStr ¶ added in v0.4.13

func CreateCheckoutCreateCustomerMetadataStr(str string) CheckoutCreateCustomerMetadata

func (CheckoutCreateCustomerMetadata) MarshalJSON ¶ added in v0.4.13

func (u CheckoutCreateCustomerMetadata) MarshalJSON() ([]byte, error)

func (*CheckoutCreateCustomerMetadata) UnmarshalJSON ¶ added in v0.4.13

func (u *CheckoutCreateCustomerMetadata) UnmarshalJSON(data []byte) error

type CheckoutCreateCustomerMetadataType ¶ added in v0.4.13

type CheckoutCreateCustomerMetadataType string
const (
	CheckoutCreateCustomerMetadataTypeStr     CheckoutCreateCustomerMetadataType = "str"
	CheckoutCreateCustomerMetadataTypeInteger CheckoutCreateCustomerMetadataType = "integer"
	CheckoutCreateCustomerMetadataTypeNumber  CheckoutCreateCustomerMetadataType = "number"
	CheckoutCreateCustomerMetadataTypeBoolean CheckoutCreateCustomerMetadataType = "boolean"
)

type CheckoutCreateMetadata ¶ added in v0.4.13

type CheckoutCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CheckoutCreateMetadataType
}

func CreateCheckoutCreateMetadataBoolean ¶ added in v0.4.13

func CreateCheckoutCreateMetadataBoolean(boolean bool) CheckoutCreateMetadata

func CreateCheckoutCreateMetadataInteger ¶ added in v0.4.13

func CreateCheckoutCreateMetadataInteger(integer int64) CheckoutCreateMetadata

func CreateCheckoutCreateMetadataNumber ¶ added in v0.4.13

func CreateCheckoutCreateMetadataNumber(number float64) CheckoutCreateMetadata

func CreateCheckoutCreateMetadataStr ¶ added in v0.4.13

func CreateCheckoutCreateMetadataStr(str string) CheckoutCreateMetadata

func (CheckoutCreateMetadata) MarshalJSON ¶ added in v0.4.13

func (u CheckoutCreateMetadata) MarshalJSON() ([]byte, error)

func (*CheckoutCreateMetadata) UnmarshalJSON ¶ added in v0.4.13

func (u *CheckoutCreateMetadata) UnmarshalJSON(data []byte) error

type CheckoutCreateMetadataType ¶ added in v0.4.13

type CheckoutCreateMetadataType string
const (
	CheckoutCreateMetadataTypeStr     CheckoutCreateMetadataType = "str"
	CheckoutCreateMetadataTypeInteger CheckoutCreateMetadataType = "integer"
	CheckoutCreateMetadataTypeNumber  CheckoutCreateMetadataType = "number"
	CheckoutCreateMetadataTypeBoolean CheckoutCreateMetadataType = "boolean"
)

type CheckoutCreatePrices ¶ added in v0.13.0

type CheckoutCreatePrices struct {
	ProductPriceFixedCreate       *ProductPriceFixedCreate       `queryParam:"inline" union:"member"`
	ProductPriceCustomCreate      *ProductPriceCustomCreate      `queryParam:"inline" union:"member"`
	ProductPriceFreeCreate        *ProductPriceFreeCreate        `queryParam:"inline" union:"member"`
	ProductPriceSeatBasedCreate   *ProductPriceSeatBasedCreate   `queryParam:"inline" union:"member"`
	ProductPriceMeteredUnitCreate *ProductPriceMeteredUnitCreate `queryParam:"inline" union:"member"`

	Type CheckoutCreatePricesType
}

func CreateCheckoutCreatePricesCustom ¶ added in v0.13.0

func CreateCheckoutCreatePricesCustom(custom ProductPriceCustomCreate) CheckoutCreatePrices

func CreateCheckoutCreatePricesFixed ¶ added in v0.13.0

func CreateCheckoutCreatePricesFixed(fixed ProductPriceFixedCreate) CheckoutCreatePrices

func CreateCheckoutCreatePricesFree ¶ added in v0.13.0

func CreateCheckoutCreatePricesFree(free ProductPriceFreeCreate) CheckoutCreatePrices

func CreateCheckoutCreatePricesMeteredUnit ¶ added in v0.13.0

func CreateCheckoutCreatePricesMeteredUnit(meteredUnit ProductPriceMeteredUnitCreate) CheckoutCreatePrices

func CreateCheckoutCreatePricesSeatBased ¶ added in v0.13.0

func CreateCheckoutCreatePricesSeatBased(seatBased ProductPriceSeatBasedCreate) CheckoutCreatePrices

func (CheckoutCreatePrices) MarshalJSON ¶ added in v0.13.0

func (u CheckoutCreatePrices) MarshalJSON() ([]byte, error)

func (*CheckoutCreatePrices) UnmarshalJSON ¶ added in v0.13.0

func (u *CheckoutCreatePrices) UnmarshalJSON(data []byte) error

type CheckoutCreatePricesType ¶ added in v0.13.0

type CheckoutCreatePricesType string
const (
	CheckoutCreatePricesTypeCustom      CheckoutCreatePricesType = "custom"
	CheckoutCreatePricesTypeFixed       CheckoutCreatePricesType = "fixed"
	CheckoutCreatePricesTypeFree        CheckoutCreatePricesType = "free"
	CheckoutCreatePricesTypeMeteredUnit CheckoutCreatePricesType = "metered_unit"
	CheckoutCreatePricesTypeSeatBased   CheckoutCreatePricesType = "seat_based"
)

type CheckoutCreatedEvent ¶ added in v0.13.0

type CheckoutCreatedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata CheckoutCreatedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

CheckoutCreatedEvent - An event created by Polar when a checkout is created.

func (*CheckoutCreatedEvent) GetChildCount ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetChildCount() *int64

func (*CheckoutCreatedEvent) GetCustomer ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetCustomer() *Customer

func (*CheckoutCreatedEvent) GetCustomerID ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetCustomerID() *string

func (*CheckoutCreatedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (c *CheckoutCreatedEvent) GetCustomerIndividual() *CustomerIndividual

func (*CheckoutCreatedEvent) GetCustomerTeam ¶ added in v0.16.0

func (c *CheckoutCreatedEvent) GetCustomerTeam() *CustomerTeam

func (*CheckoutCreatedEvent) GetExternalCustomerID ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetExternalCustomerID() *string

func (*CheckoutCreatedEvent) GetExternalMemberID ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetExternalMemberID() *string

func (*CheckoutCreatedEvent) GetID ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetID() string

func (*CheckoutCreatedEvent) GetLabel ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetLabel() string

func (*CheckoutCreatedEvent) GetMemberID ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetMemberID() *string

func (*CheckoutCreatedEvent) GetMetadata ¶ added in v0.13.0

func (*CheckoutCreatedEvent) GetName ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetName() string

func (*CheckoutCreatedEvent) GetOrganizationID ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetOrganizationID() string

func (*CheckoutCreatedEvent) GetParentID ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetParentID() *string

func (*CheckoutCreatedEvent) GetSource ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetSource() string

func (*CheckoutCreatedEvent) GetTimestamp ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) GetTimestamp() time.Time

func (CheckoutCreatedEvent) MarshalJSON ¶ added in v0.13.0

func (c CheckoutCreatedEvent) MarshalJSON() ([]byte, error)

func (*CheckoutCreatedEvent) UnmarshalJSON ¶ added in v0.13.0

func (c *CheckoutCreatedEvent) UnmarshalJSON(data []byte) error

type CheckoutCreatedMetadata ¶ added in v0.13.0

type CheckoutCreatedMetadata struct {
	CheckoutID     string  `json:"checkout_id"`
	CheckoutStatus string  `json:"checkout_status"`
	ProductID      *string `json:"product_id,omitempty"`
}

func (*CheckoutCreatedMetadata) GetCheckoutID ¶ added in v0.13.0

func (c *CheckoutCreatedMetadata) GetCheckoutID() string

func (*CheckoutCreatedMetadata) GetCheckoutStatus ¶ added in v0.13.0

func (c *CheckoutCreatedMetadata) GetCheckoutStatus() string

func (*CheckoutCreatedMetadata) GetProductID ¶ added in v0.13.0

func (c *CheckoutCreatedMetadata) GetProductID() *string

func (CheckoutCreatedMetadata) MarshalJSON ¶ added in v0.13.0

func (c CheckoutCreatedMetadata) MarshalJSON() ([]byte, error)

func (*CheckoutCreatedMetadata) UnmarshalJSON ¶ added in v0.13.0

func (c *CheckoutCreatedMetadata) UnmarshalJSON(data []byte) error

type CheckoutCustomFieldData ¶

type CheckoutCustomFieldData struct {
	Str      *string    `queryParam:"inline" union:"member"`
	Integer  *int64     `queryParam:"inline" union:"member"`
	Boolean  *bool      `queryParam:"inline" union:"member"`
	DateTime *time.Time `queryParam:"inline" union:"member"`

	Type CheckoutCustomFieldDataType
}

func CreateCheckoutCustomFieldDataBoolean ¶ added in v0.1.5

func CreateCheckoutCustomFieldDataBoolean(boolean bool) CheckoutCustomFieldData

func CreateCheckoutCustomFieldDataDateTime ¶ added in v0.1.5

func CreateCheckoutCustomFieldDataDateTime(dateTime time.Time) CheckoutCustomFieldData

func CreateCheckoutCustomFieldDataInteger ¶ added in v0.1.5

func CreateCheckoutCustomFieldDataInteger(integer int64) CheckoutCustomFieldData

func CreateCheckoutCustomFieldDataStr ¶ added in v0.1.5

func CreateCheckoutCustomFieldDataStr(str string) CheckoutCustomFieldData

func (CheckoutCustomFieldData) MarshalJSON ¶ added in v0.1.5

func (u CheckoutCustomFieldData) MarshalJSON() ([]byte, error)

func (*CheckoutCustomFieldData) UnmarshalJSON ¶ added in v0.1.5

func (u *CheckoutCustomFieldData) UnmarshalJSON(data []byte) error

type CheckoutCustomFieldDataType ¶ added in v0.1.5

type CheckoutCustomFieldDataType string
const (
	CheckoutCustomFieldDataTypeStr      CheckoutCustomFieldDataType = "str"
	CheckoutCustomFieldDataTypeInteger  CheckoutCustomFieldDataType = "integer"
	CheckoutCustomFieldDataTypeBoolean  CheckoutCustomFieldDataType = "boolean"
	CheckoutCustomFieldDataTypeDateTime CheckoutCustomFieldDataType = "date-time"
)

type CheckoutDiscount ¶

type CheckoutDiscount struct {
	CheckoutDiscountFixedOnceForeverDuration      *CheckoutDiscountFixedOnceForeverDuration      `queryParam:"inline" union:"member"`
	CheckoutDiscountFixedRepeatDuration           *CheckoutDiscountFixedRepeatDuration           `queryParam:"inline" union:"member"`
	CheckoutDiscountPercentageOnceForeverDuration *CheckoutDiscountPercentageOnceForeverDuration `queryParam:"inline" union:"member"`
	CheckoutDiscountPercentageRepeatDuration      *CheckoutDiscountPercentageRepeatDuration      `queryParam:"inline" union:"member"`

	Type CheckoutDiscountType
}

func CreateCheckoutDiscountCheckoutDiscountFixedOnceForeverDuration ¶

func CreateCheckoutDiscountCheckoutDiscountFixedOnceForeverDuration(checkoutDiscountFixedOnceForeverDuration CheckoutDiscountFixedOnceForeverDuration) CheckoutDiscount

func CreateCheckoutDiscountCheckoutDiscountFixedRepeatDuration ¶

func CreateCheckoutDiscountCheckoutDiscountFixedRepeatDuration(checkoutDiscountFixedRepeatDuration CheckoutDiscountFixedRepeatDuration) CheckoutDiscount

func CreateCheckoutDiscountCheckoutDiscountPercentageOnceForeverDuration ¶

func CreateCheckoutDiscountCheckoutDiscountPercentageOnceForeverDuration(checkoutDiscountPercentageOnceForeverDuration CheckoutDiscountPercentageOnceForeverDuration) CheckoutDiscount

func CreateCheckoutDiscountCheckoutDiscountPercentageRepeatDuration ¶

func CreateCheckoutDiscountCheckoutDiscountPercentageRepeatDuration(checkoutDiscountPercentageRepeatDuration CheckoutDiscountPercentageRepeatDuration) CheckoutDiscount

func (CheckoutDiscount) MarshalJSON ¶

func (u CheckoutDiscount) MarshalJSON() ([]byte, error)

func (*CheckoutDiscount) UnmarshalJSON ¶

func (u *CheckoutDiscount) UnmarshalJSON(data []byte) error

type CheckoutDiscountFixedOnceForeverDuration ¶

type CheckoutDiscountFixedOnceForeverDuration struct {
	Duration DiscountDuration `json:"duration"`
	Type     DiscountType     `json:"type"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Amount int64 `json:"amount"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Currency string `json:"currency"`
	// Map of currency to fixed amount to discount from the total.
	Amounts map[string]int64 `json:"amounts"`
	// The ID of the object.
	ID   string  `json:"id"`
	Name string  `json:"name"`
	Code *string `json:"code"`
}

CheckoutDiscountFixedOnceForeverDuration - Schema for a fixed amount discount that is applied once or forever.

func (*CheckoutDiscountFixedOnceForeverDuration) GetAmount ¶

func (*CheckoutDiscountFixedOnceForeverDuration) GetAmounts ¶ added in v0.15.0

func (*CheckoutDiscountFixedOnceForeverDuration) GetCode ¶

func (*CheckoutDiscountFixedOnceForeverDuration) GetCurrency ¶

func (*CheckoutDiscountFixedOnceForeverDuration) GetDuration ¶

func (*CheckoutDiscountFixedOnceForeverDuration) GetID ¶

func (*CheckoutDiscountFixedOnceForeverDuration) GetName ¶

func (*CheckoutDiscountFixedOnceForeverDuration) GetType ¶

func (CheckoutDiscountFixedOnceForeverDuration) MarshalJSON ¶ added in v0.8.4

func (*CheckoutDiscountFixedOnceForeverDuration) UnmarshalJSON ¶ added in v0.8.4

func (c *CheckoutDiscountFixedOnceForeverDuration) UnmarshalJSON(data []byte) error

type CheckoutDiscountFixedRepeatDuration ¶

type CheckoutDiscountFixedRepeatDuration struct {
	Duration         DiscountDuration `json:"duration"`
	DurationInMonths int64            `json:"duration_in_months"`
	Type             DiscountType     `json:"type"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Amount int64 `json:"amount"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Currency string `json:"currency"`
	// Map of currency to fixed amount to discount from the total.
	Amounts map[string]int64 `json:"amounts"`
	// The ID of the object.
	ID   string  `json:"id"`
	Name string  `json:"name"`
	Code *string `json:"code"`
}

CheckoutDiscountFixedRepeatDuration - Schema for a fixed amount discount that is applied on every invoice for a certain number of months.

func (*CheckoutDiscountFixedRepeatDuration) GetAmount ¶

func (*CheckoutDiscountFixedRepeatDuration) GetAmounts ¶ added in v0.15.0

func (c *CheckoutDiscountFixedRepeatDuration) GetAmounts() map[string]int64

func (*CheckoutDiscountFixedRepeatDuration) GetCode ¶

func (*CheckoutDiscountFixedRepeatDuration) GetCurrency ¶

func (*CheckoutDiscountFixedRepeatDuration) GetDuration ¶

func (*CheckoutDiscountFixedRepeatDuration) GetDurationInMonths ¶

func (c *CheckoutDiscountFixedRepeatDuration) GetDurationInMonths() int64

func (*CheckoutDiscountFixedRepeatDuration) GetID ¶

func (*CheckoutDiscountFixedRepeatDuration) GetName ¶

func (*CheckoutDiscountFixedRepeatDuration) GetType ¶

func (CheckoutDiscountFixedRepeatDuration) MarshalJSON ¶ added in v0.8.4

func (c CheckoutDiscountFixedRepeatDuration) MarshalJSON() ([]byte, error)

func (*CheckoutDiscountFixedRepeatDuration) UnmarshalJSON ¶ added in v0.8.4

func (c *CheckoutDiscountFixedRepeatDuration) UnmarshalJSON(data []byte) error

type CheckoutDiscountPercentageOnceForeverDuration ¶

type CheckoutDiscountPercentageOnceForeverDuration struct {
	Duration DiscountDuration `json:"duration"`
	Type     DiscountType     `json:"type"`
	// Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.
	BasisPoints int64 `json:"basis_points"`
	// The ID of the object.
	ID   string  `json:"id"`
	Name string  `json:"name"`
	Code *string `json:"code"`
}

CheckoutDiscountPercentageOnceForeverDuration - Schema for a percentage discount that is applied once or forever.

func (*CheckoutDiscountPercentageOnceForeverDuration) GetBasisPoints ¶

func (*CheckoutDiscountPercentageOnceForeverDuration) GetCode ¶

func (*CheckoutDiscountPercentageOnceForeverDuration) GetDuration ¶

func (*CheckoutDiscountPercentageOnceForeverDuration) GetID ¶

func (*CheckoutDiscountPercentageOnceForeverDuration) GetName ¶

func (*CheckoutDiscountPercentageOnceForeverDuration) GetType ¶

func (CheckoutDiscountPercentageOnceForeverDuration) MarshalJSON ¶ added in v0.8.4

func (*CheckoutDiscountPercentageOnceForeverDuration) UnmarshalJSON ¶ added in v0.8.4

func (c *CheckoutDiscountPercentageOnceForeverDuration) UnmarshalJSON(data []byte) error

type CheckoutDiscountPercentageRepeatDuration ¶

type CheckoutDiscountPercentageRepeatDuration struct {
	Duration         DiscountDuration `json:"duration"`
	DurationInMonths int64            `json:"duration_in_months"`
	Type             DiscountType     `json:"type"`
	// Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.
	BasisPoints int64 `json:"basis_points"`
	// The ID of the object.
	ID   string  `json:"id"`
	Name string  `json:"name"`
	Code *string `json:"code"`
}

CheckoutDiscountPercentageRepeatDuration - Schema for a percentage discount that is applied on every invoice for a certain number of months.

func (*CheckoutDiscountPercentageRepeatDuration) GetBasisPoints ¶

func (c *CheckoutDiscountPercentageRepeatDuration) GetBasisPoints() int64

func (*CheckoutDiscountPercentageRepeatDuration) GetCode ¶

func (*CheckoutDiscountPercentageRepeatDuration) GetDuration ¶

func (*CheckoutDiscountPercentageRepeatDuration) GetDurationInMonths ¶

func (c *CheckoutDiscountPercentageRepeatDuration) GetDurationInMonths() int64

func (*CheckoutDiscountPercentageRepeatDuration) GetID ¶

func (*CheckoutDiscountPercentageRepeatDuration) GetName ¶

func (*CheckoutDiscountPercentageRepeatDuration) GetType ¶

func (CheckoutDiscountPercentageRepeatDuration) MarshalJSON ¶ added in v0.8.4

func (*CheckoutDiscountPercentageRepeatDuration) UnmarshalJSON ¶ added in v0.8.4

func (c *CheckoutDiscountPercentageRepeatDuration) UnmarshalJSON(data []byte) error

type CheckoutDiscountType ¶

type CheckoutDiscountType string
const (
	CheckoutDiscountTypeCheckoutDiscountFixedOnceForeverDuration      CheckoutDiscountType = "CheckoutDiscountFixedOnceForeverDuration"
	CheckoutDiscountTypeCheckoutDiscountFixedRepeatDuration           CheckoutDiscountType = "CheckoutDiscountFixedRepeatDuration"
	CheckoutDiscountTypeCheckoutDiscountPercentageOnceForeverDuration CheckoutDiscountType = "CheckoutDiscountPercentageOnceForeverDuration"
	CheckoutDiscountTypeCheckoutDiscountPercentageRepeatDuration      CheckoutDiscountType = "CheckoutDiscountPercentageRepeatDuration"
)
type CheckoutLink struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64                        `json:"trial_interval_count"`
	Metadata           map[string]MetadataOutputType `json:"metadata"`
	PaymentProcessor   PaymentProcessor              `json:"payment_processor"`
	// Client secret used to access the checkout link.
	ClientSecret string `json:"client_secret"`
	// URL where the customer will be redirected after a successful payment.
	SuccessURL *string `json:"success_url"`
	// When set, a back button will be shown in the checkout to return to this URL.
	ReturnURL *string `json:"return_url"`
	// Optional label to distinguish links internally
	Label *string `json:"label"`
	// Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.
	AllowDiscountCodes bool `json:"allow_discount_codes"`
	// Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.
	RequireBillingAddress bool `json:"require_billing_address"`
	// ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.
	DiscountID *string `json:"discount_id"`
	// The organization ID.
	OrganizationID string                `json:"organization_id"`
	Products       []CheckoutLinkProduct `json:"products"`
	Discount       *CheckoutLinkDiscount `json:"discount"`
	URL            string                `json:"url"`
}

CheckoutLink - Checkout link data.

func (*CheckoutLink) GetAllowDiscountCodes ¶

func (c *CheckoutLink) GetAllowDiscountCodes() bool

func (*CheckoutLink) GetClientSecret ¶

func (c *CheckoutLink) GetClientSecret() string

func (*CheckoutLink) GetCreatedAt ¶

func (c *CheckoutLink) GetCreatedAt() time.Time

func (*CheckoutLink) GetDiscount ¶

func (c *CheckoutLink) GetDiscount() *CheckoutLinkDiscount

func (*CheckoutLink) GetDiscountID ¶

func (c *CheckoutLink) GetDiscountID() *string

func (*CheckoutLink) GetID ¶

func (c *CheckoutLink) GetID() string

func (*CheckoutLink) GetLabel ¶

func (c *CheckoutLink) GetLabel() *string

func (*CheckoutLink) GetMetadata ¶

func (c *CheckoutLink) GetMetadata() map[string]MetadataOutputType

func (*CheckoutLink) GetModifiedAt ¶

func (c *CheckoutLink) GetModifiedAt() *time.Time

func (*CheckoutLink) GetOrganizationID ¶ added in v0.3.0

func (c *CheckoutLink) GetOrganizationID() string

func (*CheckoutLink) GetPaymentProcessor ¶

func (c *CheckoutLink) GetPaymentProcessor() PaymentProcessor

func (*CheckoutLink) GetProducts ¶ added in v0.3.0

func (c *CheckoutLink) GetProducts() []CheckoutLinkProduct

func (*CheckoutLink) GetRequireBillingAddress ¶ added in v0.4.14

func (c *CheckoutLink) GetRequireBillingAddress() bool

func (*CheckoutLink) GetReturnURL ¶ added in v0.13.0

func (c *CheckoutLink) GetReturnURL() *string

func (*CheckoutLink) GetSuccessURL ¶

func (c *CheckoutLink) GetSuccessURL() *string

func (*CheckoutLink) GetTrialInterval ¶ added in v0.9.1

func (c *CheckoutLink) GetTrialInterval() *TrialInterval

func (*CheckoutLink) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CheckoutLink) GetTrialIntervalCount() *int64

func (*CheckoutLink) GetURL ¶

func (c *CheckoutLink) GetURL() string

func (CheckoutLink) MarshalJSON ¶

func (c CheckoutLink) MarshalJSON() ([]byte, error)

func (*CheckoutLink) UnmarshalJSON ¶

func (c *CheckoutLink) UnmarshalJSON(data []byte) error

type CheckoutLinkCreate ¶

type CheckoutLinkCreate struct {
	CheckoutLinkCreateProductPrice *CheckoutLinkCreateProductPrice `queryParam:"inline" union:"member"`
	CheckoutLinkCreateProduct      *CheckoutLinkCreateProduct      `queryParam:"inline" union:"member"`
	CheckoutLinkCreateProducts     *CheckoutLinkCreateProducts     `queryParam:"inline" union:"member"`

	Type CheckoutLinkCreateType
}

func CreateCheckoutLinkCreateCheckoutLinkCreateProduct ¶ added in v0.8.5

func CreateCheckoutLinkCreateCheckoutLinkCreateProduct(checkoutLinkCreateProduct CheckoutLinkCreateProduct) CheckoutLinkCreate

func CreateCheckoutLinkCreateCheckoutLinkCreateProductPrice ¶ added in v0.8.5

func CreateCheckoutLinkCreateCheckoutLinkCreateProductPrice(checkoutLinkCreateProductPrice CheckoutLinkCreateProductPrice) CheckoutLinkCreate

func CreateCheckoutLinkCreateCheckoutLinkCreateProducts ¶ added in v0.8.5

func CreateCheckoutLinkCreateCheckoutLinkCreateProducts(checkoutLinkCreateProducts CheckoutLinkCreateProducts) CheckoutLinkCreate

func (CheckoutLinkCreate) MarshalJSON ¶

func (u CheckoutLinkCreate) MarshalJSON() ([]byte, error)

func (*CheckoutLinkCreate) UnmarshalJSON ¶

func (u *CheckoutLinkCreate) UnmarshalJSON(data []byte) error

type CheckoutLinkCreateProduct ¶ added in v0.3.0

type CheckoutLinkCreateProduct struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CheckoutLinkCreateProductMetadata `json:"metadata,omitempty"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval,omitempty"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count,omitempty"`

	// Optional label to distinguish links internally
	Label *string `json:"label,omitempty"`
	// Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.
	AllowDiscountCodes *bool `default:"true" json:"allow_discount_codes"`
	// Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.
	RequireBillingAddress *bool `default:"false" json:"require_billing_address"`
	// ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.
	DiscountID *string `json:"discount_id,omitempty"`
	// URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.
	SuccessURL *string `json:"success_url,omitempty"`
	// When set, a back button will be shown in the checkout to return to this URL.
	ReturnURL *string `json:"return_url,omitempty"`
	ProductID string  `json:"product_id"`
	// contains filtered or unexported fields
}

CheckoutLinkCreateProduct - Schema to create a new checkout link from a a single product.

**Deprecated**: Use `CheckoutLinkCreateProducts` instead.

func (*CheckoutLinkCreateProduct) GetAllowDiscountCodes ¶ added in v0.3.0

func (c *CheckoutLinkCreateProduct) GetAllowDiscountCodes() *bool

func (*CheckoutLinkCreateProduct) GetDiscountID ¶ added in v0.3.0

func (c *CheckoutLinkCreateProduct) GetDiscountID() *string

func (*CheckoutLinkCreateProduct) GetLabel ¶ added in v0.3.0

func (c *CheckoutLinkCreateProduct) GetLabel() *string

func (*CheckoutLinkCreateProduct) GetMetadata ¶ added in v0.3.0

func (*CheckoutLinkCreateProduct) GetPaymentProcessor ¶ added in v0.3.0

func (c *CheckoutLinkCreateProduct) GetPaymentProcessor() string

func (*CheckoutLinkCreateProduct) GetProductID ¶ added in v0.3.0

func (c *CheckoutLinkCreateProduct) GetProductID() string

func (*CheckoutLinkCreateProduct) GetRequireBillingAddress ¶ added in v0.4.14

func (c *CheckoutLinkCreateProduct) GetRequireBillingAddress() *bool

func (*CheckoutLinkCreateProduct) GetReturnURL ¶ added in v0.13.0

func (c *CheckoutLinkCreateProduct) GetReturnURL() *string

func (*CheckoutLinkCreateProduct) GetSuccessURL ¶ added in v0.3.0

func (c *CheckoutLinkCreateProduct) GetSuccessURL() *string

func (*CheckoutLinkCreateProduct) GetTrialInterval ¶ added in v0.9.1

func (c *CheckoutLinkCreateProduct) GetTrialInterval() *TrialInterval

func (*CheckoutLinkCreateProduct) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CheckoutLinkCreateProduct) GetTrialIntervalCount() *int64

func (CheckoutLinkCreateProduct) MarshalJSON ¶ added in v0.3.0

func (c CheckoutLinkCreateProduct) MarshalJSON() ([]byte, error)

func (*CheckoutLinkCreateProduct) UnmarshalJSON ¶ added in v0.3.0

func (c *CheckoutLinkCreateProduct) UnmarshalJSON(data []byte) error

type CheckoutLinkCreateProductMetadata ¶ added in v0.3.0

type CheckoutLinkCreateProductMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CheckoutLinkCreateProductMetadataType
}

func CreateCheckoutLinkCreateProductMetadataBoolean ¶ added in v0.3.0

func CreateCheckoutLinkCreateProductMetadataBoolean(boolean bool) CheckoutLinkCreateProductMetadata

func CreateCheckoutLinkCreateProductMetadataInteger ¶ added in v0.3.0

func CreateCheckoutLinkCreateProductMetadataInteger(integer int64) CheckoutLinkCreateProductMetadata

func CreateCheckoutLinkCreateProductMetadataNumber ¶ added in v0.4.12

func CreateCheckoutLinkCreateProductMetadataNumber(number float64) CheckoutLinkCreateProductMetadata

func CreateCheckoutLinkCreateProductMetadataStr ¶ added in v0.3.0

func CreateCheckoutLinkCreateProductMetadataStr(str string) CheckoutLinkCreateProductMetadata

func (CheckoutLinkCreateProductMetadata) MarshalJSON ¶ added in v0.3.0

func (u CheckoutLinkCreateProductMetadata) MarshalJSON() ([]byte, error)

func (*CheckoutLinkCreateProductMetadata) UnmarshalJSON ¶ added in v0.3.0

func (u *CheckoutLinkCreateProductMetadata) UnmarshalJSON(data []byte) error

type CheckoutLinkCreateProductMetadataType ¶ added in v0.3.0

type CheckoutLinkCreateProductMetadataType string
const (
	CheckoutLinkCreateProductMetadataTypeStr     CheckoutLinkCreateProductMetadataType = "str"
	CheckoutLinkCreateProductMetadataTypeInteger CheckoutLinkCreateProductMetadataType = "integer"
	CheckoutLinkCreateProductMetadataTypeNumber  CheckoutLinkCreateProductMetadataType = "number"
	CheckoutLinkCreateProductMetadataTypeBoolean CheckoutLinkCreateProductMetadataType = "boolean"
)

type CheckoutLinkCreateProductPrice ¶ added in v0.3.0

type CheckoutLinkCreateProductPrice struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CheckoutLinkCreateProductPriceMetadata `json:"metadata,omitempty"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval,omitempty"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count,omitempty"`

	// Optional label to distinguish links internally
	Label *string `json:"label,omitempty"`
	// Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.
	AllowDiscountCodes *bool `default:"true" json:"allow_discount_codes"`
	// Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.
	RequireBillingAddress *bool `default:"false" json:"require_billing_address"`
	// ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.
	DiscountID *string `json:"discount_id,omitempty"`
	// URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.
	SuccessURL *string `json:"success_url,omitempty"`
	// When set, a back button will be shown in the checkout to return to this URL.
	ReturnURL      *string `json:"return_url,omitempty"`
	ProductPriceID string  `json:"product_price_id"`
	// contains filtered or unexported fields
}

CheckoutLinkCreateProductPrice - Schema to create a new checkout link from a a single product price.

**Deprecated**: Use `CheckoutLinkCreateProducts` instead.

func (*CheckoutLinkCreateProductPrice) GetAllowDiscountCodes ¶ added in v0.3.0

func (c *CheckoutLinkCreateProductPrice) GetAllowDiscountCodes() *bool

func (*CheckoutLinkCreateProductPrice) GetDiscountID ¶ added in v0.3.0

func (c *CheckoutLinkCreateProductPrice) GetDiscountID() *string

func (*CheckoutLinkCreateProductPrice) GetLabel ¶ added in v0.3.0

func (c *CheckoutLinkCreateProductPrice) GetLabel() *string

func (*CheckoutLinkCreateProductPrice) GetMetadata ¶ added in v0.3.0

func (*CheckoutLinkCreateProductPrice) GetPaymentProcessor ¶ added in v0.3.0

func (c *CheckoutLinkCreateProductPrice) GetPaymentProcessor() string

func (*CheckoutLinkCreateProductPrice) GetProductPriceID ¶ added in v0.3.0

func (c *CheckoutLinkCreateProductPrice) GetProductPriceID() string

func (*CheckoutLinkCreateProductPrice) GetRequireBillingAddress ¶ added in v0.4.14

func (c *CheckoutLinkCreateProductPrice) GetRequireBillingAddress() *bool

func (*CheckoutLinkCreateProductPrice) GetReturnURL ¶ added in v0.13.0

func (c *CheckoutLinkCreateProductPrice) GetReturnURL() *string

func (*CheckoutLinkCreateProductPrice) GetSuccessURL ¶ added in v0.3.0

func (c *CheckoutLinkCreateProductPrice) GetSuccessURL() *string

func (*CheckoutLinkCreateProductPrice) GetTrialInterval ¶ added in v0.9.1

func (c *CheckoutLinkCreateProductPrice) GetTrialInterval() *TrialInterval

func (*CheckoutLinkCreateProductPrice) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CheckoutLinkCreateProductPrice) GetTrialIntervalCount() *int64

func (CheckoutLinkCreateProductPrice) MarshalJSON ¶ added in v0.3.0

func (c CheckoutLinkCreateProductPrice) MarshalJSON() ([]byte, error)

func (*CheckoutLinkCreateProductPrice) UnmarshalJSON ¶ added in v0.3.0

func (c *CheckoutLinkCreateProductPrice) UnmarshalJSON(data []byte) error

type CheckoutLinkCreateProductPriceMetadata ¶ added in v0.3.0

type CheckoutLinkCreateProductPriceMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CheckoutLinkCreateProductPriceMetadataType
}

func CreateCheckoutLinkCreateProductPriceMetadataBoolean ¶ added in v0.3.0

func CreateCheckoutLinkCreateProductPriceMetadataBoolean(boolean bool) CheckoutLinkCreateProductPriceMetadata

func CreateCheckoutLinkCreateProductPriceMetadataInteger ¶ added in v0.3.0

func CreateCheckoutLinkCreateProductPriceMetadataInteger(integer int64) CheckoutLinkCreateProductPriceMetadata

func CreateCheckoutLinkCreateProductPriceMetadataNumber ¶ added in v0.4.12

func CreateCheckoutLinkCreateProductPriceMetadataNumber(number float64) CheckoutLinkCreateProductPriceMetadata

func CreateCheckoutLinkCreateProductPriceMetadataStr ¶ added in v0.3.0

func CreateCheckoutLinkCreateProductPriceMetadataStr(str string) CheckoutLinkCreateProductPriceMetadata

func (CheckoutLinkCreateProductPriceMetadata) MarshalJSON ¶ added in v0.3.0

func (u CheckoutLinkCreateProductPriceMetadata) MarshalJSON() ([]byte, error)

func (*CheckoutLinkCreateProductPriceMetadata) UnmarshalJSON ¶ added in v0.3.0

func (u *CheckoutLinkCreateProductPriceMetadata) UnmarshalJSON(data []byte) error

type CheckoutLinkCreateProductPriceMetadataType ¶ added in v0.3.0

type CheckoutLinkCreateProductPriceMetadataType string
const (
	CheckoutLinkCreateProductPriceMetadataTypeStr     CheckoutLinkCreateProductPriceMetadataType = "str"
	CheckoutLinkCreateProductPriceMetadataTypeInteger CheckoutLinkCreateProductPriceMetadataType = "integer"
	CheckoutLinkCreateProductPriceMetadataTypeNumber  CheckoutLinkCreateProductPriceMetadataType = "number"
	CheckoutLinkCreateProductPriceMetadataTypeBoolean CheckoutLinkCreateProductPriceMetadataType = "boolean"
)

type CheckoutLinkCreateProducts ¶ added in v0.3.0

type CheckoutLinkCreateProducts struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CheckoutLinkCreateProductsMetadata `json:"metadata,omitempty"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval,omitempty"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count,omitempty"`

	// Optional label to distinguish links internally
	Label *string `json:"label,omitempty"`
	// Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.
	AllowDiscountCodes *bool `default:"true" json:"allow_discount_codes"`
	// Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.
	RequireBillingAddress *bool `default:"false" json:"require_billing_address"`
	// ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.
	DiscountID *string `json:"discount_id,omitempty"`
	// URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.
	SuccessURL *string `json:"success_url,omitempty"`
	// When set, a back button will be shown in the checkout to return to this URL.
	ReturnURL *string `json:"return_url,omitempty"`
	// List of products that will be available to select at checkout.
	Products []string `json:"products"`
	// contains filtered or unexported fields
}

CheckoutLinkCreateProducts - Schema to create a new checkout link.

func (*CheckoutLinkCreateProducts) GetAllowDiscountCodes ¶ added in v0.3.0

func (c *CheckoutLinkCreateProducts) GetAllowDiscountCodes() *bool

func (*CheckoutLinkCreateProducts) GetDiscountID ¶ added in v0.3.0

func (c *CheckoutLinkCreateProducts) GetDiscountID() *string

func (*CheckoutLinkCreateProducts) GetLabel ¶ added in v0.3.0

func (c *CheckoutLinkCreateProducts) GetLabel() *string

func (*CheckoutLinkCreateProducts) GetMetadata ¶ added in v0.3.0

func (*CheckoutLinkCreateProducts) GetPaymentProcessor ¶ added in v0.3.0

func (c *CheckoutLinkCreateProducts) GetPaymentProcessor() string

func (*CheckoutLinkCreateProducts) GetProducts ¶ added in v0.3.0

func (c *CheckoutLinkCreateProducts) GetProducts() []string

func (*CheckoutLinkCreateProducts) GetRequireBillingAddress ¶ added in v0.4.14

func (c *CheckoutLinkCreateProducts) GetRequireBillingAddress() *bool

func (*CheckoutLinkCreateProducts) GetReturnURL ¶ added in v0.13.0

func (c *CheckoutLinkCreateProducts) GetReturnURL() *string

func (*CheckoutLinkCreateProducts) GetSuccessURL ¶ added in v0.3.0

func (c *CheckoutLinkCreateProducts) GetSuccessURL() *string

func (*CheckoutLinkCreateProducts) GetTrialInterval ¶ added in v0.9.1

func (c *CheckoutLinkCreateProducts) GetTrialInterval() *TrialInterval

func (*CheckoutLinkCreateProducts) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CheckoutLinkCreateProducts) GetTrialIntervalCount() *int64

func (CheckoutLinkCreateProducts) MarshalJSON ¶ added in v0.3.0

func (c CheckoutLinkCreateProducts) MarshalJSON() ([]byte, error)

func (*CheckoutLinkCreateProducts) UnmarshalJSON ¶ added in v0.3.0

func (c *CheckoutLinkCreateProducts) UnmarshalJSON(data []byte) error

type CheckoutLinkCreateProductsMetadata ¶ added in v0.3.0

type CheckoutLinkCreateProductsMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CheckoutLinkCreateProductsMetadataType
}

func CreateCheckoutLinkCreateProductsMetadataBoolean ¶ added in v0.3.0

func CreateCheckoutLinkCreateProductsMetadataBoolean(boolean bool) CheckoutLinkCreateProductsMetadata

func CreateCheckoutLinkCreateProductsMetadataInteger ¶ added in v0.3.0

func CreateCheckoutLinkCreateProductsMetadataInteger(integer int64) CheckoutLinkCreateProductsMetadata

func CreateCheckoutLinkCreateProductsMetadataNumber ¶ added in v0.4.12

func CreateCheckoutLinkCreateProductsMetadataNumber(number float64) CheckoutLinkCreateProductsMetadata

func CreateCheckoutLinkCreateProductsMetadataStr ¶ added in v0.3.0

func CreateCheckoutLinkCreateProductsMetadataStr(str string) CheckoutLinkCreateProductsMetadata

func (CheckoutLinkCreateProductsMetadata) MarshalJSON ¶ added in v0.3.0

func (u CheckoutLinkCreateProductsMetadata) MarshalJSON() ([]byte, error)

func (*CheckoutLinkCreateProductsMetadata) UnmarshalJSON ¶ added in v0.3.0

func (u *CheckoutLinkCreateProductsMetadata) UnmarshalJSON(data []byte) error

type CheckoutLinkCreateProductsMetadataType ¶ added in v0.3.0

type CheckoutLinkCreateProductsMetadataType string
const (
	CheckoutLinkCreateProductsMetadataTypeStr     CheckoutLinkCreateProductsMetadataType = "str"
	CheckoutLinkCreateProductsMetadataTypeInteger CheckoutLinkCreateProductsMetadataType = "integer"
	CheckoutLinkCreateProductsMetadataTypeNumber  CheckoutLinkCreateProductsMetadataType = "number"
	CheckoutLinkCreateProductsMetadataTypeBoolean CheckoutLinkCreateProductsMetadataType = "boolean"
)

type CheckoutLinkCreateType ¶

type CheckoutLinkCreateType string
const (
	CheckoutLinkCreateTypeCheckoutLinkCreateProductPrice CheckoutLinkCreateType = "CheckoutLinkCreateProductPrice"
	CheckoutLinkCreateTypeCheckoutLinkCreateProduct      CheckoutLinkCreateType = "CheckoutLinkCreateProduct"
	CheckoutLinkCreateTypeCheckoutLinkCreateProducts     CheckoutLinkCreateType = "CheckoutLinkCreateProducts"
)

type CheckoutLinkDiscount ¶

type CheckoutLinkDiscount struct {
	DiscountFixedOnceForeverDurationBase      *DiscountFixedOnceForeverDurationBase      `queryParam:"inline" union:"member"`
	DiscountFixedRepeatDurationBase           *DiscountFixedRepeatDurationBase           `queryParam:"inline" union:"member"`
	DiscountPercentageOnceForeverDurationBase *DiscountPercentageOnceForeverDurationBase `queryParam:"inline" union:"member"`
	DiscountPercentageRepeatDurationBase      *DiscountPercentageRepeatDurationBase      `queryParam:"inline" union:"member"`

	Type CheckoutLinkDiscountType
}

func CreateCheckoutLinkDiscountDiscountFixedOnceForeverDurationBase ¶

func CreateCheckoutLinkDiscountDiscountFixedOnceForeverDurationBase(discountFixedOnceForeverDurationBase DiscountFixedOnceForeverDurationBase) CheckoutLinkDiscount

func CreateCheckoutLinkDiscountDiscountFixedRepeatDurationBase ¶

func CreateCheckoutLinkDiscountDiscountFixedRepeatDurationBase(discountFixedRepeatDurationBase DiscountFixedRepeatDurationBase) CheckoutLinkDiscount

func CreateCheckoutLinkDiscountDiscountPercentageOnceForeverDurationBase ¶

func CreateCheckoutLinkDiscountDiscountPercentageOnceForeverDurationBase(discountPercentageOnceForeverDurationBase DiscountPercentageOnceForeverDurationBase) CheckoutLinkDiscount

func CreateCheckoutLinkDiscountDiscountPercentageRepeatDurationBase ¶

func CreateCheckoutLinkDiscountDiscountPercentageRepeatDurationBase(discountPercentageRepeatDurationBase DiscountPercentageRepeatDurationBase) CheckoutLinkDiscount

func (CheckoutLinkDiscount) MarshalJSON ¶

func (u CheckoutLinkDiscount) MarshalJSON() ([]byte, error)

func (*CheckoutLinkDiscount) UnmarshalJSON ¶

func (u *CheckoutLinkDiscount) UnmarshalJSON(data []byte) error

type CheckoutLinkDiscountType ¶

type CheckoutLinkDiscountType string
const (
	CheckoutLinkDiscountTypeDiscountFixedOnceForeverDurationBase      CheckoutLinkDiscountType = "DiscountFixedOnceForeverDurationBase"
	CheckoutLinkDiscountTypeDiscountFixedRepeatDurationBase           CheckoutLinkDiscountType = "DiscountFixedRepeatDurationBase"
	CheckoutLinkDiscountTypeDiscountPercentageOnceForeverDurationBase CheckoutLinkDiscountType = "DiscountPercentageOnceForeverDurationBase"
	CheckoutLinkDiscountTypeDiscountPercentageRepeatDurationBase      CheckoutLinkDiscountType = "DiscountPercentageRepeatDurationBase"
)

type CheckoutLinkProduct ¶

type CheckoutLinkProduct struct {
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count"`
	// The name of the product.
	Name string `json:"name"`
	// The description of the product.
	Description *string           `json:"description"`
	Visibility  ProductVisibility `json:"visibility"`
	// The recurring interval of the product. If `None`, the product is a one-time purchase.
	RecurringInterval *SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
	RecurringIntervalCount *int64 `json:"recurring_interval_count"`
	// Whether the product is a subscription.
	IsRecurring bool `json:"is_recurring"`
	// Whether the product is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the organization owning the product.
	OrganizationID string `json:"organization_id"`
	// List of prices for this product.
	Prices []CheckoutLinkProductPrices `json:"prices"`
	// List of benefits granted by the product.
	Benefits []BenefitPublic `json:"benefits"`
	// List of medias associated to the product.
	Medias []ProductMediaFileRead `json:"medias"`
}

CheckoutLinkProduct - Product data for a checkout link.

func (*CheckoutLinkProduct) GetBenefits ¶

func (c *CheckoutLinkProduct) GetBenefits() []BenefitPublic

func (*CheckoutLinkProduct) GetCreatedAt ¶

func (c *CheckoutLinkProduct) GetCreatedAt() time.Time

func (*CheckoutLinkProduct) GetDescription ¶

func (c *CheckoutLinkProduct) GetDescription() *string

func (*CheckoutLinkProduct) GetID ¶

func (c *CheckoutLinkProduct) GetID() string

func (*CheckoutLinkProduct) GetIsArchived ¶

func (c *CheckoutLinkProduct) GetIsArchived() bool

func (*CheckoutLinkProduct) GetIsRecurring ¶

func (c *CheckoutLinkProduct) GetIsRecurring() bool

func (*CheckoutLinkProduct) GetMedias ¶

func (c *CheckoutLinkProduct) GetMedias() []ProductMediaFileRead

func (*CheckoutLinkProduct) GetMetadata ¶ added in v0.4.13

func (c *CheckoutLinkProduct) GetMetadata() map[string]MetadataOutputType

func (*CheckoutLinkProduct) GetModifiedAt ¶

func (c *CheckoutLinkProduct) GetModifiedAt() *time.Time

func (*CheckoutLinkProduct) GetName ¶

func (c *CheckoutLinkProduct) GetName() string

func (*CheckoutLinkProduct) GetOrganizationID ¶

func (c *CheckoutLinkProduct) GetOrganizationID() string

func (*CheckoutLinkProduct) GetPrices ¶

func (*CheckoutLinkProduct) GetRecurringInterval ¶ added in v0.3.0

func (c *CheckoutLinkProduct) GetRecurringInterval() *SubscriptionRecurringInterval

func (*CheckoutLinkProduct) GetRecurringIntervalCount ¶ added in v0.12.0

func (c *CheckoutLinkProduct) GetRecurringIntervalCount() *int64

func (*CheckoutLinkProduct) GetTrialInterval ¶ added in v0.9.1

func (c *CheckoutLinkProduct) GetTrialInterval() *TrialInterval

func (*CheckoutLinkProduct) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CheckoutLinkProduct) GetTrialIntervalCount() *int64

func (*CheckoutLinkProduct) GetVisibility ¶ added in v0.13.0

func (c *CheckoutLinkProduct) GetVisibility() ProductVisibility

func (CheckoutLinkProduct) MarshalJSON ¶

func (c CheckoutLinkProduct) MarshalJSON() ([]byte, error)

func (*CheckoutLinkProduct) UnmarshalJSON ¶

func (c *CheckoutLinkProduct) UnmarshalJSON(data []byte) error

type CheckoutLinkProductPrices ¶ added in v0.3.0

type CheckoutLinkProductPrices struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CheckoutLinkProductPricesType
}

func CreateCheckoutLinkProductPricesLegacyRecurringProductPrice ¶ added in v0.3.0

func CreateCheckoutLinkProductPricesLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CheckoutLinkProductPrices

func CreateCheckoutLinkProductPricesProductPrice ¶ added in v0.3.0

func CreateCheckoutLinkProductPricesProductPrice(productPrice ProductPrice) CheckoutLinkProductPrices

func (CheckoutLinkProductPrices) MarshalJSON ¶ added in v0.3.0

func (u CheckoutLinkProductPrices) MarshalJSON() ([]byte, error)

func (*CheckoutLinkProductPrices) UnmarshalJSON ¶ added in v0.3.0

func (u *CheckoutLinkProductPrices) UnmarshalJSON(data []byte) error

type CheckoutLinkProductPricesType ¶ added in v0.3.0

type CheckoutLinkProductPricesType string
const (
	CheckoutLinkProductPricesTypeLegacyRecurringProductPrice CheckoutLinkProductPricesType = "LegacyRecurringProductPrice"
	CheckoutLinkProductPricesTypeProductPrice                CheckoutLinkProductPricesType = "ProductPrice"
)

type CheckoutLinkSortProperty ¶

type CheckoutLinkSortProperty string
const (
	CheckoutLinkSortPropertyCreatedAt               CheckoutLinkSortProperty = "created_at"
	CheckoutLinkSortPropertyMinusCreatedAt          CheckoutLinkSortProperty = "-created_at"
	CheckoutLinkSortPropertyLabel                   CheckoutLinkSortProperty = "label"
	CheckoutLinkSortPropertyMinusLabel              CheckoutLinkSortProperty = "-label"
	CheckoutLinkSortPropertySuccessURL              CheckoutLinkSortProperty = "success_url"
	CheckoutLinkSortPropertyMinusSuccessURL         CheckoutLinkSortProperty = "-success_url"
	CheckoutLinkSortPropertyAllowDiscountCodes      CheckoutLinkSortProperty = "allow_discount_codes"
	CheckoutLinkSortPropertyMinusAllowDiscountCodes CheckoutLinkSortProperty = "-allow_discount_codes"
)

func (CheckoutLinkSortProperty) ToPointer ¶

func (*CheckoutLinkSortProperty) UnmarshalJSON ¶

func (e *CheckoutLinkSortProperty) UnmarshalJSON(data []byte) error

type CheckoutLinkUpdate ¶

type CheckoutLinkUpdate struct {
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval,omitempty"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count,omitempty"`
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CheckoutLinkUpdateMetadata `json:"metadata,omitempty"`
	// List of products that will be available to select at checkout.
	Products []string `json:"products,omitempty"`
	Label    *string  `json:"label,omitempty"`
	// Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.
	AllowDiscountCodes *bool `json:"allow_discount_codes,omitempty"`
	// Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.
	RequireBillingAddress *bool `json:"require_billing_address,omitempty"`
	// ID of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.
	DiscountID *string `json:"discount_id,omitempty"`
	// URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.
	SuccessURL *string `json:"success_url,omitempty"`
	// When set, a back button will be shown in the checkout to return to this URL.
	ReturnURL *string `json:"return_url,omitempty"`
}

CheckoutLinkUpdate - Schema to update an existing checkout link.

func (*CheckoutLinkUpdate) GetAllowDiscountCodes ¶

func (c *CheckoutLinkUpdate) GetAllowDiscountCodes() *bool

func (*CheckoutLinkUpdate) GetDiscountID ¶

func (c *CheckoutLinkUpdate) GetDiscountID() *string

func (*CheckoutLinkUpdate) GetLabel ¶

func (c *CheckoutLinkUpdate) GetLabel() *string

func (*CheckoutLinkUpdate) GetMetadata ¶

func (*CheckoutLinkUpdate) GetProducts ¶ added in v0.3.0

func (c *CheckoutLinkUpdate) GetProducts() []string

func (*CheckoutLinkUpdate) GetRequireBillingAddress ¶ added in v0.4.14

func (c *CheckoutLinkUpdate) GetRequireBillingAddress() *bool

func (*CheckoutLinkUpdate) GetReturnURL ¶ added in v0.13.0

func (c *CheckoutLinkUpdate) GetReturnURL() *string

func (*CheckoutLinkUpdate) GetSuccessURL ¶

func (c *CheckoutLinkUpdate) GetSuccessURL() *string

func (*CheckoutLinkUpdate) GetTrialInterval ¶ added in v0.9.1

func (c *CheckoutLinkUpdate) GetTrialInterval() *TrialInterval

func (*CheckoutLinkUpdate) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CheckoutLinkUpdate) GetTrialIntervalCount() *int64

type CheckoutLinkUpdateMetadata ¶

type CheckoutLinkUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CheckoutLinkUpdateMetadataType
}

func CreateCheckoutLinkUpdateMetadataBoolean ¶

func CreateCheckoutLinkUpdateMetadataBoolean(boolean bool) CheckoutLinkUpdateMetadata

func CreateCheckoutLinkUpdateMetadataInteger ¶

func CreateCheckoutLinkUpdateMetadataInteger(integer int64) CheckoutLinkUpdateMetadata

func CreateCheckoutLinkUpdateMetadataNumber ¶ added in v0.4.12

func CreateCheckoutLinkUpdateMetadataNumber(number float64) CheckoutLinkUpdateMetadata

func CreateCheckoutLinkUpdateMetadataStr ¶

func CreateCheckoutLinkUpdateMetadataStr(str string) CheckoutLinkUpdateMetadata

func (CheckoutLinkUpdateMetadata) MarshalJSON ¶

func (u CheckoutLinkUpdateMetadata) MarshalJSON() ([]byte, error)

func (*CheckoutLinkUpdateMetadata) UnmarshalJSON ¶

func (u *CheckoutLinkUpdateMetadata) UnmarshalJSON(data []byte) error

type CheckoutLinkUpdateMetadataType ¶

type CheckoutLinkUpdateMetadataType string
const (
	CheckoutLinkUpdateMetadataTypeStr     CheckoutLinkUpdateMetadataType = "str"
	CheckoutLinkUpdateMetadataTypeInteger CheckoutLinkUpdateMetadataType = "integer"
	CheckoutLinkUpdateMetadataTypeNumber  CheckoutLinkUpdateMetadataType = "number"
	CheckoutLinkUpdateMetadataTypeBoolean CheckoutLinkUpdateMetadataType = "boolean"
)

type CheckoutOrganization ¶ added in v0.13.0

type CheckoutOrganization struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// Organization name shown in checkout, customer portal, emails etc.
	Name string `json:"name"`
	// Unique organization slug in checkout, customer portal and credit card statements.
	Slug string `json:"slug"`
	// Avatar URL shown in checkout, customer portal, emails etc.
	AvatarURL         *string                       `json:"avatar_url"`
	ProrationBehavior SubscriptionProrationBehavior `json:"proration_behavior"`
	// Whether customers can update their subscriptions from the customer portal.
	AllowCustomerUpdates bool `json:"allow_customer_updates"`
}

func (*CheckoutOrganization) GetAllowCustomerUpdates ¶ added in v0.13.0

func (c *CheckoutOrganization) GetAllowCustomerUpdates() bool

func (*CheckoutOrganization) GetAvatarURL ¶ added in v0.13.0

func (c *CheckoutOrganization) GetAvatarURL() *string

func (*CheckoutOrganization) GetCreatedAt ¶ added in v0.13.0

func (c *CheckoutOrganization) GetCreatedAt() time.Time

func (*CheckoutOrganization) GetID ¶ added in v0.13.0

func (c *CheckoutOrganization) GetID() string

func (*CheckoutOrganization) GetModifiedAt ¶ added in v0.13.0

func (c *CheckoutOrganization) GetModifiedAt() *time.Time

func (*CheckoutOrganization) GetName ¶ added in v0.13.0

func (c *CheckoutOrganization) GetName() string

func (*CheckoutOrganization) GetProrationBehavior ¶ added in v0.13.0

func (c *CheckoutOrganization) GetProrationBehavior() SubscriptionProrationBehavior

func (*CheckoutOrganization) GetSlug ¶ added in v0.13.0

func (c *CheckoutOrganization) GetSlug() string

func (CheckoutOrganization) MarshalJSON ¶ added in v0.13.0

func (c CheckoutOrganization) MarshalJSON() ([]byte, error)

func (*CheckoutOrganization) UnmarshalJSON ¶ added in v0.13.0

func (c *CheckoutOrganization) UnmarshalJSON(data []byte) error

type CheckoutPrices ¶ added in v0.13.0

type CheckoutPrices struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CheckoutPricesType
}

func CreateCheckoutPricesLegacyRecurringProductPrice ¶ added in v0.13.0

func CreateCheckoutPricesLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CheckoutPrices

func CreateCheckoutPricesProductPrice ¶ added in v0.13.0

func CreateCheckoutPricesProductPrice(productPrice ProductPrice) CheckoutPrices

func (CheckoutPrices) MarshalJSON ¶ added in v0.13.0

func (u CheckoutPrices) MarshalJSON() ([]byte, error)

func (*CheckoutPrices) UnmarshalJSON ¶ added in v0.13.0

func (u *CheckoutPrices) UnmarshalJSON(data []byte) error

type CheckoutPricesType ¶ added in v0.13.0

type CheckoutPricesType string
const (
	CheckoutPricesTypeLegacyRecurringProductPrice CheckoutPricesType = "LegacyRecurringProductPrice"
	CheckoutPricesTypeProductPrice                CheckoutPricesType = "ProductPrice"
)

type CheckoutProduct ¶

type CheckoutProduct struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count"`
	// The name of the product.
	Name string `json:"name"`
	// The description of the product.
	Description *string           `json:"description"`
	Visibility  ProductVisibility `json:"visibility"`
	// The recurring interval of the product. If `None`, the product is a one-time purchase.
	RecurringInterval *SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
	RecurringIntervalCount *int64 `json:"recurring_interval_count"`
	// Whether the product is a subscription.
	IsRecurring bool `json:"is_recurring"`
	// Whether the product is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the organization owning the product.
	OrganizationID string `json:"organization_id"`
	// List of prices for this product.
	Prices []CheckoutProductPrices `json:"prices"`
	// List of benefits granted by the product.
	Benefits []BenefitPublic `json:"benefits"`
	// List of medias associated to the product.
	Medias []ProductMediaFileRead `json:"medias"`
}

CheckoutProduct - Product data for a checkout session.

func (*CheckoutProduct) GetBenefits ¶

func (c *CheckoutProduct) GetBenefits() []BenefitPublic

func (*CheckoutProduct) GetCreatedAt ¶

func (c *CheckoutProduct) GetCreatedAt() time.Time

func (*CheckoutProduct) GetDescription ¶

func (c *CheckoutProduct) GetDescription() *string

func (*CheckoutProduct) GetID ¶

func (c *CheckoutProduct) GetID() string

func (*CheckoutProduct) GetIsArchived ¶

func (c *CheckoutProduct) GetIsArchived() bool

func (*CheckoutProduct) GetIsRecurring ¶

func (c *CheckoutProduct) GetIsRecurring() bool

func (*CheckoutProduct) GetMedias ¶

func (c *CheckoutProduct) GetMedias() []ProductMediaFileRead

func (*CheckoutProduct) GetModifiedAt ¶

func (c *CheckoutProduct) GetModifiedAt() *time.Time

func (*CheckoutProduct) GetName ¶

func (c *CheckoutProduct) GetName() string

func (*CheckoutProduct) GetOrganizationID ¶

func (c *CheckoutProduct) GetOrganizationID() string

func (*CheckoutProduct) GetPrices ¶

func (c *CheckoutProduct) GetPrices() []CheckoutProductPrices

func (*CheckoutProduct) GetRecurringInterval ¶ added in v0.3.0

func (c *CheckoutProduct) GetRecurringInterval() *SubscriptionRecurringInterval

func (*CheckoutProduct) GetRecurringIntervalCount ¶ added in v0.12.0

func (c *CheckoutProduct) GetRecurringIntervalCount() *int64

func (*CheckoutProduct) GetTrialInterval ¶ added in v0.9.1

func (c *CheckoutProduct) GetTrialInterval() *TrialInterval

func (*CheckoutProduct) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CheckoutProduct) GetTrialIntervalCount() *int64

func (*CheckoutProduct) GetVisibility ¶ added in v0.13.0

func (c *CheckoutProduct) GetVisibility() ProductVisibility

func (CheckoutProduct) MarshalJSON ¶

func (c CheckoutProduct) MarshalJSON() ([]byte, error)

func (*CheckoutProduct) UnmarshalJSON ¶

func (c *CheckoutProduct) UnmarshalJSON(data []byte) error

type CheckoutProductPrice ¶ added in v0.3.0

type CheckoutProductPrice struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CheckoutProductPriceType
}

func CreateCheckoutProductPriceLegacyRecurringProductPrice ¶ added in v0.3.0

func CreateCheckoutProductPriceLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CheckoutProductPrice

func CreateCheckoutProductPriceProductPrice ¶ added in v0.3.0

func CreateCheckoutProductPriceProductPrice(productPrice ProductPrice) CheckoutProductPrice

func (CheckoutProductPrice) MarshalJSON ¶ added in v0.3.0

func (u CheckoutProductPrice) MarshalJSON() ([]byte, error)

func (*CheckoutProductPrice) UnmarshalJSON ¶ added in v0.3.0

func (u *CheckoutProductPrice) UnmarshalJSON(data []byte) error

type CheckoutProductPriceType ¶ added in v0.3.0

type CheckoutProductPriceType string
const (
	CheckoutProductPriceTypeLegacyRecurringProductPrice CheckoutProductPriceType = "LegacyRecurringProductPrice"
	CheckoutProductPriceTypeProductPrice                CheckoutProductPriceType = "ProductPrice"
)

type CheckoutProductPrices ¶ added in v0.3.0

type CheckoutProductPrices struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CheckoutProductPricesType
}

func CreateCheckoutProductPricesLegacyRecurringProductPrice ¶ added in v0.3.0

func CreateCheckoutProductPricesLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CheckoutProductPrices

func CreateCheckoutProductPricesProductPrice ¶ added in v0.3.0

func CreateCheckoutProductPricesProductPrice(productPrice ProductPrice) CheckoutProductPrices

func (CheckoutProductPrices) MarshalJSON ¶ added in v0.3.0

func (u CheckoutProductPrices) MarshalJSON() ([]byte, error)

func (*CheckoutProductPrices) UnmarshalJSON ¶ added in v0.3.0

func (u *CheckoutProductPrices) UnmarshalJSON(data []byte) error

type CheckoutProductPricesType ¶ added in v0.3.0

type CheckoutProductPricesType string
const (
	CheckoutProductPricesTypeLegacyRecurringProductPrice CheckoutProductPricesType = "LegacyRecurringProductPrice"
	CheckoutProductPricesTypeProductPrice                CheckoutProductPricesType = "ProductPrice"
)

type CheckoutPublic ¶

type CheckoutPublic struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// Key-value object storing custom field values.
	CustomFieldData  map[string]*CheckoutPublicCustomFieldData `json:"custom_field_data,omitempty"`
	PaymentProcessor PaymentProcessor                          `json:"payment_processor"`
	Status           CheckoutStatus                            `json:"status"`
	// Client secret used to update and complete the checkout session from the client.
	ClientSecret string `json:"client_secret"`
	// URL where the customer can access the checkout session.
	URL string `json:"url"`
	// Expiration date and time of the checkout session.
	ExpiresAt time.Time `json:"expires_at"`
	// URL where the customer will be redirected after a successful payment.
	SuccessURL string `json:"success_url"`
	// When set, a back button will be shown in the checkout to return to this URL.
	ReturnURL *string `json:"return_url"`
	// When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page.
	EmbedOrigin *string `json:"embed_origin"`
	// Amount in cents, before discounts and taxes.
	Amount int64 `json:"amount"`
	// Predefined number of seats (works with seat-based pricing only)
	Seats *int64 `json:"seats,omitempty"`
	// Minimum number of seats (works with seat-based pricing only)
	MinSeats *int64 `json:"min_seats,omitempty"`
	// Maximum number of seats (works with seat-based pricing only)
	MaxSeats *int64 `json:"max_seats,omitempty"`
	// Discount amount in cents.
	DiscountAmount int64 `json:"discount_amount"`
	// Amount in cents, after discounts but before taxes.
	NetAmount int64 `json:"net_amount"`
	// Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it.
	TaxAmount *int64 `json:"tax_amount"`
	// Amount in cents, after discounts and taxes.
	TotalAmount int64 `json:"total_amount"`
	// Currency code of the checkout session.
	Currency string `json:"currency"`
	// Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.
	AllowTrial *bool `json:"allow_trial"`
	// Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product.
	ActiveTrialInterval *TrialInterval `json:"active_trial_interval"`
	// Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product.
	ActiveTrialIntervalCount *int64 `json:"active_trial_interval_count"`
	// End date and time of the trial period, if any.
	TrialEnd *time.Time `json:"trial_end"`
	// ID of the organization owning the checkout session.
	OrganizationID string `json:"organization_id"`
	// ID of the product to checkout.
	ProductID *string `json:"product_id"`
	// ID of the product price to checkout.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	ProductPriceID *string `json:"product_price_id"`
	// ID of the discount applied to the checkout.
	DiscountID *string `json:"discount_id"`
	// Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.
	AllowDiscountCodes bool `json:"allow_discount_codes"`
	// Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.
	RequireBillingAddress bool `json:"require_billing_address"`
	// Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.
	IsDiscountApplicable bool `json:"is_discount_applicable"`
	// Whether the product price is free, regardless of discounts.
	IsFreeProductPrice bool `json:"is_free_product_price"`
	// Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.
	IsPaymentRequired bool `json:"is_payment_required"`
	// Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.
	IsPaymentSetupRequired bool `json:"is_payment_setup_required"`
	// Whether the checkout requires a payment form, whether because of a payment or payment method setup.
	IsPaymentFormRequired bool    `json:"is_payment_form_required"`
	CustomerID            *string `json:"customer_id"`
	// Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.
	IsBusinessCustomer bool `json:"is_business_customer"`
	// Name of the customer.
	CustomerName *string `json:"customer_name"`
	// Email address of the customer.
	CustomerEmail            *string                      `json:"customer_email"`
	CustomerIPAddress        *string                      `json:"customer_ip_address"`
	CustomerBillingName      *string                      `json:"customer_billing_name"`
	CustomerBillingAddress   *Address                     `json:"customer_billing_address"`
	CustomerTaxID            *string                      `json:"customer_tax_id"`
	Locale                   *string                      `json:"locale,omitempty"`
	PaymentProcessorMetadata map[string]string            `json:"payment_processor_metadata"`
	BillingAddressFields     CheckoutBillingAddressFields `json:"billing_address_fields"`
	// List of products available to select.
	Products []CheckoutProduct `json:"products"`
	// Product selected to checkout.
	Product *CheckoutProduct `json:"product"`
	// Price of the selected product.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	ProductPrice *CheckoutPublicProductPrice `json:"product_price"`
	// Mapping of product IDs to their list of prices.
	Prices               map[string][]CheckoutPublicPrices `json:"prices"`
	Discount             *CheckoutPublicDiscount           `json:"discount"`
	Organization         CheckoutOrganization              `json:"organization"`
	AttachedCustomFields []AttachedCustomField             `json:"attached_custom_fields"`
}

CheckoutPublic - Checkout session data retrieved using the client secret.

func (*CheckoutPublic) GetActiveTrialInterval ¶ added in v0.9.1

func (c *CheckoutPublic) GetActiveTrialInterval() *TrialInterval

func (*CheckoutPublic) GetActiveTrialIntervalCount ¶ added in v0.9.1

func (c *CheckoutPublic) GetActiveTrialIntervalCount() *int64

func (*CheckoutPublic) GetAllowDiscountCodes ¶

func (c *CheckoutPublic) GetAllowDiscountCodes() bool

func (*CheckoutPublic) GetAllowTrial ¶ added in v0.13.0

func (c *CheckoutPublic) GetAllowTrial() *bool

func (*CheckoutPublic) GetAmount ¶

func (c *CheckoutPublic) GetAmount() int64

func (*CheckoutPublic) GetAttachedCustomFields ¶

func (c *CheckoutPublic) GetAttachedCustomFields() []AttachedCustomField

func (*CheckoutPublic) GetBillingAddressFields ¶ added in v0.7.2

func (c *CheckoutPublic) GetBillingAddressFields() CheckoutBillingAddressFields

func (*CheckoutPublic) GetClientSecret ¶

func (c *CheckoutPublic) GetClientSecret() string

func (*CheckoutPublic) GetCreatedAt ¶

func (c *CheckoutPublic) GetCreatedAt() time.Time

func (*CheckoutPublic) GetCurrency ¶

func (c *CheckoutPublic) GetCurrency() string

func (*CheckoutPublic) GetCustomFieldData ¶

func (c *CheckoutPublic) GetCustomFieldData() map[string]*CheckoutPublicCustomFieldData

func (*CheckoutPublic) GetCustomerBillingAddress ¶

func (c *CheckoutPublic) GetCustomerBillingAddress() *Address

func (*CheckoutPublic) GetCustomerBillingName ¶ added in v0.4.20

func (c *CheckoutPublic) GetCustomerBillingName() *string

func (*CheckoutPublic) GetCustomerEmail ¶

func (c *CheckoutPublic) GetCustomerEmail() *string

func (*CheckoutPublic) GetCustomerID ¶

func (c *CheckoutPublic) GetCustomerID() *string

func (*CheckoutPublic) GetCustomerIPAddress ¶

func (c *CheckoutPublic) GetCustomerIPAddress() *string

func (*CheckoutPublic) GetCustomerName ¶

func (c *CheckoutPublic) GetCustomerName() *string

func (*CheckoutPublic) GetCustomerTaxID ¶

func (c *CheckoutPublic) GetCustomerTaxID() *string

func (*CheckoutPublic) GetDiscount ¶

func (c *CheckoutPublic) GetDiscount() *CheckoutPublicDiscount

func (*CheckoutPublic) GetDiscountAmount ¶ added in v0.4.8

func (c *CheckoutPublic) GetDiscountAmount() int64

func (*CheckoutPublic) GetDiscountID ¶

func (c *CheckoutPublic) GetDiscountID() *string

func (*CheckoutPublic) GetEmbedOrigin ¶

func (c *CheckoutPublic) GetEmbedOrigin() *string

func (*CheckoutPublic) GetExpiresAt ¶

func (c *CheckoutPublic) GetExpiresAt() time.Time

func (*CheckoutPublic) GetID ¶

func (c *CheckoutPublic) GetID() string

func (*CheckoutPublic) GetIsBusinessCustomer ¶ added in v0.4.20

func (c *CheckoutPublic) GetIsBusinessCustomer() bool

func (*CheckoutPublic) GetIsDiscountApplicable ¶

func (c *CheckoutPublic) GetIsDiscountApplicable() bool

func (*CheckoutPublic) GetIsFreeProductPrice ¶

func (c *CheckoutPublic) GetIsFreeProductPrice() bool

func (*CheckoutPublic) GetIsPaymentFormRequired ¶

func (c *CheckoutPublic) GetIsPaymentFormRequired() bool

func (*CheckoutPublic) GetIsPaymentRequired ¶

func (c *CheckoutPublic) GetIsPaymentRequired() bool

func (*CheckoutPublic) GetIsPaymentSetupRequired ¶

func (c *CheckoutPublic) GetIsPaymentSetupRequired() bool

func (*CheckoutPublic) GetLocale ¶ added in v0.13.0

func (c *CheckoutPublic) GetLocale() *string

func (*CheckoutPublic) GetMaxSeats ¶ added in v0.15.0

func (c *CheckoutPublic) GetMaxSeats() *int64

func (*CheckoutPublic) GetMinSeats ¶ added in v0.15.0

func (c *CheckoutPublic) GetMinSeats() *int64

func (*CheckoutPublic) GetModifiedAt ¶

func (c *CheckoutPublic) GetModifiedAt() *time.Time

func (*CheckoutPublic) GetNetAmount ¶ added in v0.4.8

func (c *CheckoutPublic) GetNetAmount() int64

func (*CheckoutPublic) GetOrganization ¶

func (c *CheckoutPublic) GetOrganization() CheckoutOrganization

func (*CheckoutPublic) GetOrganizationID ¶ added in v0.12.0

func (c *CheckoutPublic) GetOrganizationID() string

func (*CheckoutPublic) GetPaymentProcessor ¶

func (c *CheckoutPublic) GetPaymentProcessor() PaymentProcessor

func (*CheckoutPublic) GetPaymentProcessorMetadata ¶

func (c *CheckoutPublic) GetPaymentProcessorMetadata() map[string]string

func (*CheckoutPublic) GetPrices ¶ added in v0.13.0

func (c *CheckoutPublic) GetPrices() map[string][]CheckoutPublicPrices

func (*CheckoutPublic) GetProduct ¶

func (c *CheckoutPublic) GetProduct() *CheckoutProduct

func (*CheckoutPublic) GetProductID ¶

func (c *CheckoutPublic) GetProductID() *string

func (*CheckoutPublic) GetProductPrice ¶

func (c *CheckoutPublic) GetProductPrice() *CheckoutPublicProductPrice

func (*CheckoutPublic) GetProductPriceID ¶

func (c *CheckoutPublic) GetProductPriceID() *string

func (*CheckoutPublic) GetProducts ¶ added in v0.3.0

func (c *CheckoutPublic) GetProducts() []CheckoutProduct

func (*CheckoutPublic) GetRequireBillingAddress ¶ added in v0.4.14

func (c *CheckoutPublic) GetRequireBillingAddress() bool

func (*CheckoutPublic) GetReturnURL ¶ added in v0.10.1

func (c *CheckoutPublic) GetReturnURL() *string

func (*CheckoutPublic) GetSeats ¶ added in v0.10.0

func (c *CheckoutPublic) GetSeats() *int64

func (*CheckoutPublic) GetStatus ¶

func (c *CheckoutPublic) GetStatus() CheckoutStatus

func (*CheckoutPublic) GetSuccessURL ¶

func (c *CheckoutPublic) GetSuccessURL() string

func (*CheckoutPublic) GetTaxAmount ¶

func (c *CheckoutPublic) GetTaxAmount() *int64

func (*CheckoutPublic) GetTotalAmount ¶

func (c *CheckoutPublic) GetTotalAmount() int64

func (*CheckoutPublic) GetTrialEnd ¶ added in v0.9.1

func (c *CheckoutPublic) GetTrialEnd() *time.Time

func (*CheckoutPublic) GetURL ¶

func (c *CheckoutPublic) GetURL() string

func (CheckoutPublic) MarshalJSON ¶

func (c CheckoutPublic) MarshalJSON() ([]byte, error)

func (*CheckoutPublic) UnmarshalJSON ¶

func (c *CheckoutPublic) UnmarshalJSON(data []byte) error

type CheckoutPublicConfirmed ¶

type CheckoutPublicConfirmed struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// Key-value object storing custom field values.
	CustomFieldData  map[string]*CheckoutPublicConfirmedCustomFieldData `json:"custom_field_data,omitempty"`
	PaymentProcessor PaymentProcessor                                   `json:"payment_processor"`

	// Client secret used to update and complete the checkout session from the client.
	ClientSecret string `json:"client_secret"`
	// URL where the customer can access the checkout session.
	URL string `json:"url"`
	// Expiration date and time of the checkout session.
	ExpiresAt time.Time `json:"expires_at"`
	// URL where the customer will be redirected after a successful payment.
	SuccessURL string `json:"success_url"`
	// When set, a back button will be shown in the checkout to return to this URL.
	ReturnURL *string `json:"return_url"`
	// When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page.
	EmbedOrigin *string `json:"embed_origin"`
	// Amount in cents, before discounts and taxes.
	Amount int64 `json:"amount"`
	// Predefined number of seats (works with seat-based pricing only)
	Seats *int64 `json:"seats,omitempty"`
	// Minimum number of seats (works with seat-based pricing only)
	MinSeats *int64 `json:"min_seats,omitempty"`
	// Maximum number of seats (works with seat-based pricing only)
	MaxSeats *int64 `json:"max_seats,omitempty"`
	// Discount amount in cents.
	DiscountAmount int64 `json:"discount_amount"`
	// Amount in cents, after discounts but before taxes.
	NetAmount int64 `json:"net_amount"`
	// Sales tax amount in cents. If `null`, it means there is no enough information yet to calculate it.
	TaxAmount *int64 `json:"tax_amount"`
	// Amount in cents, after discounts and taxes.
	TotalAmount int64 `json:"total_amount"`
	// Currency code of the checkout session.
	Currency string `json:"currency"`
	// Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.
	AllowTrial *bool `json:"allow_trial"`
	// Interval unit of the trial period, if any. This value is either set from the checkout, if `trial_interval` is set, or from the selected product.
	ActiveTrialInterval *TrialInterval `json:"active_trial_interval"`
	// Number of interval units of the trial period, if any. This value is either set from the checkout, if `trial_interval_count` is set, or from the selected product.
	ActiveTrialIntervalCount *int64 `json:"active_trial_interval_count"`
	// End date and time of the trial period, if any.
	TrialEnd *time.Time `json:"trial_end"`
	// ID of the organization owning the checkout session.
	OrganizationID string `json:"organization_id"`
	// ID of the product to checkout.
	ProductID *string `json:"product_id"`
	// ID of the product price to checkout.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	ProductPriceID *string `json:"product_price_id"`
	// ID of the discount applied to the checkout.
	DiscountID *string `json:"discount_id"`
	// Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.
	AllowDiscountCodes bool `json:"allow_discount_codes"`
	// Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.
	RequireBillingAddress bool `json:"require_billing_address"`
	// Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.
	IsDiscountApplicable bool `json:"is_discount_applicable"`
	// Whether the product price is free, regardless of discounts.
	IsFreeProductPrice bool `json:"is_free_product_price"`
	// Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.
	IsPaymentRequired bool `json:"is_payment_required"`
	// Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.
	IsPaymentSetupRequired bool `json:"is_payment_setup_required"`
	// Whether the checkout requires a payment form, whether because of a payment or payment method setup.
	IsPaymentFormRequired bool    `json:"is_payment_form_required"`
	CustomerID            *string `json:"customer_id"`
	// Whether the customer is a business or an individual. If `true`, the customer will be required to fill their full billing address and billing name.
	IsBusinessCustomer bool `json:"is_business_customer"`
	// Name of the customer.
	CustomerName *string `json:"customer_name"`
	// Email address of the customer.
	CustomerEmail            *string                      `json:"customer_email"`
	CustomerIPAddress        *string                      `json:"customer_ip_address"`
	CustomerBillingName      *string                      `json:"customer_billing_name"`
	CustomerBillingAddress   *Address                     `json:"customer_billing_address"`
	CustomerTaxID            *string                      `json:"customer_tax_id"`
	Locale                   *string                      `json:"locale,omitempty"`
	PaymentProcessorMetadata map[string]string            `json:"payment_processor_metadata"`
	BillingAddressFields     CheckoutBillingAddressFields `json:"billing_address_fields"`
	// List of products available to select.
	Products []CheckoutProduct `json:"products"`
	// Product selected to checkout.
	Product *CheckoutProduct `json:"product"`
	// Price of the selected product.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	ProductPrice *CheckoutPublicConfirmedProductPrice `json:"product_price"`
	// Mapping of product IDs to their list of prices.
	Prices               map[string][]CheckoutPublicConfirmedPrices `json:"prices"`
	Discount             *CheckoutPublicConfirmedDiscount           `json:"discount"`
	Organization         CheckoutOrganization                       `json:"organization"`
	AttachedCustomFields []AttachedCustomField                      `json:"attached_custom_fields"`
	CustomerSessionToken *string                                    `json:"customer_session_token"`
	// contains filtered or unexported fields
}

CheckoutPublicConfirmed - Checkout session data retrieved using the client secret after confirmation.

It contains a customer session token to retrieve order information right after the checkout.

func (*CheckoutPublicConfirmed) GetActiveTrialInterval ¶ added in v0.9.1

func (c *CheckoutPublicConfirmed) GetActiveTrialInterval() *TrialInterval

func (*CheckoutPublicConfirmed) GetActiveTrialIntervalCount ¶ added in v0.9.1

func (c *CheckoutPublicConfirmed) GetActiveTrialIntervalCount() *int64

func (*CheckoutPublicConfirmed) GetAllowDiscountCodes ¶

func (c *CheckoutPublicConfirmed) GetAllowDiscountCodes() bool

func (*CheckoutPublicConfirmed) GetAllowTrial ¶ added in v0.13.0

func (c *CheckoutPublicConfirmed) GetAllowTrial() *bool

func (*CheckoutPublicConfirmed) GetAmount ¶

func (c *CheckoutPublicConfirmed) GetAmount() int64

func (*CheckoutPublicConfirmed) GetAttachedCustomFields ¶

func (c *CheckoutPublicConfirmed) GetAttachedCustomFields() []AttachedCustomField

func (*CheckoutPublicConfirmed) GetBillingAddressFields ¶ added in v0.7.2

func (c *CheckoutPublicConfirmed) GetBillingAddressFields() CheckoutBillingAddressFields

func (*CheckoutPublicConfirmed) GetClientSecret ¶

func (c *CheckoutPublicConfirmed) GetClientSecret() string

func (*CheckoutPublicConfirmed) GetCreatedAt ¶

func (c *CheckoutPublicConfirmed) GetCreatedAt() time.Time

func (*CheckoutPublicConfirmed) GetCurrency ¶

func (c *CheckoutPublicConfirmed) GetCurrency() string

func (*CheckoutPublicConfirmed) GetCustomFieldData ¶

func (*CheckoutPublicConfirmed) GetCustomerBillingAddress ¶

func (c *CheckoutPublicConfirmed) GetCustomerBillingAddress() *Address

func (*CheckoutPublicConfirmed) GetCustomerBillingName ¶ added in v0.4.20

func (c *CheckoutPublicConfirmed) GetCustomerBillingName() *string

func (*CheckoutPublicConfirmed) GetCustomerEmail ¶

func (c *CheckoutPublicConfirmed) GetCustomerEmail() *string

func (*CheckoutPublicConfirmed) GetCustomerID ¶

func (c *CheckoutPublicConfirmed) GetCustomerID() *string

func (*CheckoutPublicConfirmed) GetCustomerIPAddress ¶

func (c *CheckoutPublicConfirmed) GetCustomerIPAddress() *string

func (*CheckoutPublicConfirmed) GetCustomerName ¶

func (c *CheckoutPublicConfirmed) GetCustomerName() *string

func (*CheckoutPublicConfirmed) GetCustomerSessionToken ¶

func (c *CheckoutPublicConfirmed) GetCustomerSessionToken() *string

func (*CheckoutPublicConfirmed) GetCustomerTaxID ¶

func (c *CheckoutPublicConfirmed) GetCustomerTaxID() *string

func (*CheckoutPublicConfirmed) GetDiscount ¶

func (*CheckoutPublicConfirmed) GetDiscountAmount ¶ added in v0.4.8

func (c *CheckoutPublicConfirmed) GetDiscountAmount() int64

func (*CheckoutPublicConfirmed) GetDiscountID ¶

func (c *CheckoutPublicConfirmed) GetDiscountID() *string

func (*CheckoutPublicConfirmed) GetEmbedOrigin ¶

func (c *CheckoutPublicConfirmed) GetEmbedOrigin() *string

func (*CheckoutPublicConfirmed) GetExpiresAt ¶

func (c *CheckoutPublicConfirmed) GetExpiresAt() time.Time

func (*CheckoutPublicConfirmed) GetID ¶

func (c *CheckoutPublicConfirmed) GetID() string

func (*CheckoutPublicConfirmed) GetIsBusinessCustomer ¶ added in v0.4.20

func (c *CheckoutPublicConfirmed) GetIsBusinessCustomer() bool

func (*CheckoutPublicConfirmed) GetIsDiscountApplicable ¶

func (c *CheckoutPublicConfirmed) GetIsDiscountApplicable() bool

func (*CheckoutPublicConfirmed) GetIsFreeProductPrice ¶

func (c *CheckoutPublicConfirmed) GetIsFreeProductPrice() bool

func (*CheckoutPublicConfirmed) GetIsPaymentFormRequired ¶

func (c *CheckoutPublicConfirmed) GetIsPaymentFormRequired() bool

func (*CheckoutPublicConfirmed) GetIsPaymentRequired ¶

func (c *CheckoutPublicConfirmed) GetIsPaymentRequired() bool

func (*CheckoutPublicConfirmed) GetIsPaymentSetupRequired ¶

func (c *CheckoutPublicConfirmed) GetIsPaymentSetupRequired() bool

func (*CheckoutPublicConfirmed) GetLocale ¶ added in v0.13.0

func (c *CheckoutPublicConfirmed) GetLocale() *string

func (*CheckoutPublicConfirmed) GetMaxSeats ¶ added in v0.15.0

func (c *CheckoutPublicConfirmed) GetMaxSeats() *int64

func (*CheckoutPublicConfirmed) GetMinSeats ¶ added in v0.15.0

func (c *CheckoutPublicConfirmed) GetMinSeats() *int64

func (*CheckoutPublicConfirmed) GetModifiedAt ¶

func (c *CheckoutPublicConfirmed) GetModifiedAt() *time.Time

func (*CheckoutPublicConfirmed) GetNetAmount ¶ added in v0.4.8

func (c *CheckoutPublicConfirmed) GetNetAmount() int64

func (*CheckoutPublicConfirmed) GetOrganization ¶

func (c *CheckoutPublicConfirmed) GetOrganization() CheckoutOrganization

func (*CheckoutPublicConfirmed) GetOrganizationID ¶ added in v0.12.0

func (c *CheckoutPublicConfirmed) GetOrganizationID() string

func (*CheckoutPublicConfirmed) GetPaymentProcessor ¶

func (c *CheckoutPublicConfirmed) GetPaymentProcessor() PaymentProcessor

func (*CheckoutPublicConfirmed) GetPaymentProcessorMetadata ¶

func (c *CheckoutPublicConfirmed) GetPaymentProcessorMetadata() map[string]string

func (*CheckoutPublicConfirmed) GetPrices ¶ added in v0.13.0

func (*CheckoutPublicConfirmed) GetProduct ¶

func (c *CheckoutPublicConfirmed) GetProduct() *CheckoutProduct

func (*CheckoutPublicConfirmed) GetProductID ¶

func (c *CheckoutPublicConfirmed) GetProductID() *string

func (*CheckoutPublicConfirmed) GetProductPrice ¶

func (*CheckoutPublicConfirmed) GetProductPriceID ¶

func (c *CheckoutPublicConfirmed) GetProductPriceID() *string

func (*CheckoutPublicConfirmed) GetProducts ¶ added in v0.3.0

func (c *CheckoutPublicConfirmed) GetProducts() []CheckoutProduct

func (*CheckoutPublicConfirmed) GetRequireBillingAddress ¶ added in v0.4.14

func (c *CheckoutPublicConfirmed) GetRequireBillingAddress() bool

func (*CheckoutPublicConfirmed) GetReturnURL ¶ added in v0.10.1

func (c *CheckoutPublicConfirmed) GetReturnURL() *string

func (*CheckoutPublicConfirmed) GetSeats ¶ added in v0.10.0

func (c *CheckoutPublicConfirmed) GetSeats() *int64

func (*CheckoutPublicConfirmed) GetStatus ¶

func (c *CheckoutPublicConfirmed) GetStatus() string

func (*CheckoutPublicConfirmed) GetSuccessURL ¶

func (c *CheckoutPublicConfirmed) GetSuccessURL() string

func (*CheckoutPublicConfirmed) GetTaxAmount ¶

func (c *CheckoutPublicConfirmed) GetTaxAmount() *int64

func (*CheckoutPublicConfirmed) GetTotalAmount ¶

func (c *CheckoutPublicConfirmed) GetTotalAmount() int64

func (*CheckoutPublicConfirmed) GetTrialEnd ¶ added in v0.9.1

func (c *CheckoutPublicConfirmed) GetTrialEnd() *time.Time

func (*CheckoutPublicConfirmed) GetURL ¶

func (c *CheckoutPublicConfirmed) GetURL() string

func (CheckoutPublicConfirmed) MarshalJSON ¶

func (c CheckoutPublicConfirmed) MarshalJSON() ([]byte, error)

func (*CheckoutPublicConfirmed) UnmarshalJSON ¶

func (c *CheckoutPublicConfirmed) UnmarshalJSON(data []byte) error

type CheckoutPublicConfirmedCustomFieldData ¶

type CheckoutPublicConfirmedCustomFieldData struct {
	Str      *string    `queryParam:"inline" union:"member"`
	Integer  *int64     `queryParam:"inline" union:"member"`
	Boolean  *bool      `queryParam:"inline" union:"member"`
	DateTime *time.Time `queryParam:"inline" union:"member"`

	Type CheckoutPublicConfirmedCustomFieldDataType
}

func CreateCheckoutPublicConfirmedCustomFieldDataBoolean ¶ added in v0.1.5

func CreateCheckoutPublicConfirmedCustomFieldDataBoolean(boolean bool) CheckoutPublicConfirmedCustomFieldData

func CreateCheckoutPublicConfirmedCustomFieldDataDateTime ¶ added in v0.1.5

func CreateCheckoutPublicConfirmedCustomFieldDataDateTime(dateTime time.Time) CheckoutPublicConfirmedCustomFieldData

func CreateCheckoutPublicConfirmedCustomFieldDataInteger ¶ added in v0.1.5

func CreateCheckoutPublicConfirmedCustomFieldDataInteger(integer int64) CheckoutPublicConfirmedCustomFieldData

func CreateCheckoutPublicConfirmedCustomFieldDataStr ¶ added in v0.1.5

func CreateCheckoutPublicConfirmedCustomFieldDataStr(str string) CheckoutPublicConfirmedCustomFieldData

func (CheckoutPublicConfirmedCustomFieldData) MarshalJSON ¶ added in v0.1.5

func (u CheckoutPublicConfirmedCustomFieldData) MarshalJSON() ([]byte, error)

func (*CheckoutPublicConfirmedCustomFieldData) UnmarshalJSON ¶ added in v0.1.5

func (u *CheckoutPublicConfirmedCustomFieldData) UnmarshalJSON(data []byte) error

type CheckoutPublicConfirmedCustomFieldDataType ¶ added in v0.1.5

type CheckoutPublicConfirmedCustomFieldDataType string
const (
	CheckoutPublicConfirmedCustomFieldDataTypeStr      CheckoutPublicConfirmedCustomFieldDataType = "str"
	CheckoutPublicConfirmedCustomFieldDataTypeInteger  CheckoutPublicConfirmedCustomFieldDataType = "integer"
	CheckoutPublicConfirmedCustomFieldDataTypeBoolean  CheckoutPublicConfirmedCustomFieldDataType = "boolean"
	CheckoutPublicConfirmedCustomFieldDataTypeDateTime CheckoutPublicConfirmedCustomFieldDataType = "date-time"
)

type CheckoutPublicConfirmedDiscount ¶

type CheckoutPublicConfirmedDiscount struct {
	CheckoutDiscountFixedOnceForeverDuration      *CheckoutDiscountFixedOnceForeverDuration      `queryParam:"inline" union:"member"`
	CheckoutDiscountFixedRepeatDuration           *CheckoutDiscountFixedRepeatDuration           `queryParam:"inline" union:"member"`
	CheckoutDiscountPercentageOnceForeverDuration *CheckoutDiscountPercentageOnceForeverDuration `queryParam:"inline" union:"member"`
	CheckoutDiscountPercentageRepeatDuration      *CheckoutDiscountPercentageRepeatDuration      `queryParam:"inline" union:"member"`

	Type CheckoutPublicConfirmedDiscountType
}

func CreateCheckoutPublicConfirmedDiscountCheckoutDiscountFixedOnceForeverDuration ¶

func CreateCheckoutPublicConfirmedDiscountCheckoutDiscountFixedOnceForeverDuration(checkoutDiscountFixedOnceForeverDuration CheckoutDiscountFixedOnceForeverDuration) CheckoutPublicConfirmedDiscount

func CreateCheckoutPublicConfirmedDiscountCheckoutDiscountFixedRepeatDuration ¶

func CreateCheckoutPublicConfirmedDiscountCheckoutDiscountFixedRepeatDuration(checkoutDiscountFixedRepeatDuration CheckoutDiscountFixedRepeatDuration) CheckoutPublicConfirmedDiscount

func CreateCheckoutPublicConfirmedDiscountCheckoutDiscountPercentageOnceForeverDuration ¶

func CreateCheckoutPublicConfirmedDiscountCheckoutDiscountPercentageOnceForeverDuration(checkoutDiscountPercentageOnceForeverDuration CheckoutDiscountPercentageOnceForeverDuration) CheckoutPublicConfirmedDiscount

func CreateCheckoutPublicConfirmedDiscountCheckoutDiscountPercentageRepeatDuration ¶

func CreateCheckoutPublicConfirmedDiscountCheckoutDiscountPercentageRepeatDuration(checkoutDiscountPercentageRepeatDuration CheckoutDiscountPercentageRepeatDuration) CheckoutPublicConfirmedDiscount

func (CheckoutPublicConfirmedDiscount) MarshalJSON ¶

func (u CheckoutPublicConfirmedDiscount) MarshalJSON() ([]byte, error)

func (*CheckoutPublicConfirmedDiscount) UnmarshalJSON ¶

func (u *CheckoutPublicConfirmedDiscount) UnmarshalJSON(data []byte) error

type CheckoutPublicConfirmedDiscountType ¶

type CheckoutPublicConfirmedDiscountType string
const (
	CheckoutPublicConfirmedDiscountTypeCheckoutDiscountFixedOnceForeverDuration      CheckoutPublicConfirmedDiscountType = "CheckoutDiscountFixedOnceForeverDuration"
	CheckoutPublicConfirmedDiscountTypeCheckoutDiscountFixedRepeatDuration           CheckoutPublicConfirmedDiscountType = "CheckoutDiscountFixedRepeatDuration"
	CheckoutPublicConfirmedDiscountTypeCheckoutDiscountPercentageOnceForeverDuration CheckoutPublicConfirmedDiscountType = "CheckoutDiscountPercentageOnceForeverDuration"
	CheckoutPublicConfirmedDiscountTypeCheckoutDiscountPercentageRepeatDuration      CheckoutPublicConfirmedDiscountType = "CheckoutDiscountPercentageRepeatDuration"
)

type CheckoutPublicConfirmedPrices ¶ added in v0.13.0

type CheckoutPublicConfirmedPrices struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CheckoutPublicConfirmedPricesType
}

func CreateCheckoutPublicConfirmedPricesLegacyRecurringProductPrice ¶ added in v0.13.0

func CreateCheckoutPublicConfirmedPricesLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CheckoutPublicConfirmedPrices

func CreateCheckoutPublicConfirmedPricesProductPrice ¶ added in v0.13.0

func CreateCheckoutPublicConfirmedPricesProductPrice(productPrice ProductPrice) CheckoutPublicConfirmedPrices

func (CheckoutPublicConfirmedPrices) MarshalJSON ¶ added in v0.13.0

func (u CheckoutPublicConfirmedPrices) MarshalJSON() ([]byte, error)

func (*CheckoutPublicConfirmedPrices) UnmarshalJSON ¶ added in v0.13.0

func (u *CheckoutPublicConfirmedPrices) UnmarshalJSON(data []byte) error

type CheckoutPublicConfirmedPricesType ¶ added in v0.13.0

type CheckoutPublicConfirmedPricesType string
const (
	CheckoutPublicConfirmedPricesTypeLegacyRecurringProductPrice CheckoutPublicConfirmedPricesType = "LegacyRecurringProductPrice"
	CheckoutPublicConfirmedPricesTypeProductPrice                CheckoutPublicConfirmedPricesType = "ProductPrice"
)

type CheckoutPublicConfirmedProductPrice ¶ added in v0.3.0

type CheckoutPublicConfirmedProductPrice struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CheckoutPublicConfirmedProductPriceType
}

func CreateCheckoutPublicConfirmedProductPriceLegacyRecurringProductPrice ¶ added in v0.3.0

func CreateCheckoutPublicConfirmedProductPriceLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CheckoutPublicConfirmedProductPrice

func CreateCheckoutPublicConfirmedProductPriceProductPrice ¶ added in v0.3.0

func CreateCheckoutPublicConfirmedProductPriceProductPrice(productPrice ProductPrice) CheckoutPublicConfirmedProductPrice

func (CheckoutPublicConfirmedProductPrice) MarshalJSON ¶ added in v0.3.0

func (u CheckoutPublicConfirmedProductPrice) MarshalJSON() ([]byte, error)

func (*CheckoutPublicConfirmedProductPrice) UnmarshalJSON ¶ added in v0.3.0

func (u *CheckoutPublicConfirmedProductPrice) UnmarshalJSON(data []byte) error

type CheckoutPublicConfirmedProductPriceType ¶ added in v0.3.0

type CheckoutPublicConfirmedProductPriceType string
const (
	CheckoutPublicConfirmedProductPriceTypeLegacyRecurringProductPrice CheckoutPublicConfirmedProductPriceType = "LegacyRecurringProductPrice"
	CheckoutPublicConfirmedProductPriceTypeProductPrice                CheckoutPublicConfirmedProductPriceType = "ProductPrice"
)

type CheckoutPublicCustomFieldData ¶

type CheckoutPublicCustomFieldData struct {
	Str      *string    `queryParam:"inline" union:"member"`
	Integer  *int64     `queryParam:"inline" union:"member"`
	Boolean  *bool      `queryParam:"inline" union:"member"`
	DateTime *time.Time `queryParam:"inline" union:"member"`

	Type CheckoutPublicCustomFieldDataType
}

func CreateCheckoutPublicCustomFieldDataBoolean ¶ added in v0.1.5

func CreateCheckoutPublicCustomFieldDataBoolean(boolean bool) CheckoutPublicCustomFieldData

func CreateCheckoutPublicCustomFieldDataDateTime ¶ added in v0.1.5

func CreateCheckoutPublicCustomFieldDataDateTime(dateTime time.Time) CheckoutPublicCustomFieldData

func CreateCheckoutPublicCustomFieldDataInteger ¶ added in v0.1.5

func CreateCheckoutPublicCustomFieldDataInteger(integer int64) CheckoutPublicCustomFieldData

func CreateCheckoutPublicCustomFieldDataStr ¶ added in v0.1.5

func CreateCheckoutPublicCustomFieldDataStr(str string) CheckoutPublicCustomFieldData

func (CheckoutPublicCustomFieldData) MarshalJSON ¶ added in v0.1.5

func (u CheckoutPublicCustomFieldData) MarshalJSON() ([]byte, error)

func (*CheckoutPublicCustomFieldData) UnmarshalJSON ¶ added in v0.1.5

func (u *CheckoutPublicCustomFieldData) UnmarshalJSON(data []byte) error

type CheckoutPublicCustomFieldDataType ¶ added in v0.1.5

type CheckoutPublicCustomFieldDataType string
const (
	CheckoutPublicCustomFieldDataTypeStr      CheckoutPublicCustomFieldDataType = "str"
	CheckoutPublicCustomFieldDataTypeInteger  CheckoutPublicCustomFieldDataType = "integer"
	CheckoutPublicCustomFieldDataTypeBoolean  CheckoutPublicCustomFieldDataType = "boolean"
	CheckoutPublicCustomFieldDataTypeDateTime CheckoutPublicCustomFieldDataType = "date-time"
)

type CheckoutPublicDiscount ¶

type CheckoutPublicDiscount struct {
	CheckoutDiscountFixedOnceForeverDuration      *CheckoutDiscountFixedOnceForeverDuration      `queryParam:"inline" union:"member"`
	CheckoutDiscountFixedRepeatDuration           *CheckoutDiscountFixedRepeatDuration           `queryParam:"inline" union:"member"`
	CheckoutDiscountPercentageOnceForeverDuration *CheckoutDiscountPercentageOnceForeverDuration `queryParam:"inline" union:"member"`
	CheckoutDiscountPercentageRepeatDuration      *CheckoutDiscountPercentageRepeatDuration      `queryParam:"inline" union:"member"`

	Type CheckoutPublicDiscountType
}

func CreateCheckoutPublicDiscountCheckoutDiscountFixedOnceForeverDuration ¶

func CreateCheckoutPublicDiscountCheckoutDiscountFixedOnceForeverDuration(checkoutDiscountFixedOnceForeverDuration CheckoutDiscountFixedOnceForeverDuration) CheckoutPublicDiscount

func CreateCheckoutPublicDiscountCheckoutDiscountFixedRepeatDuration ¶

func CreateCheckoutPublicDiscountCheckoutDiscountFixedRepeatDuration(checkoutDiscountFixedRepeatDuration CheckoutDiscountFixedRepeatDuration) CheckoutPublicDiscount

func CreateCheckoutPublicDiscountCheckoutDiscountPercentageOnceForeverDuration ¶

func CreateCheckoutPublicDiscountCheckoutDiscountPercentageOnceForeverDuration(checkoutDiscountPercentageOnceForeverDuration CheckoutDiscountPercentageOnceForeverDuration) CheckoutPublicDiscount

func CreateCheckoutPublicDiscountCheckoutDiscountPercentageRepeatDuration ¶

func CreateCheckoutPublicDiscountCheckoutDiscountPercentageRepeatDuration(checkoutDiscountPercentageRepeatDuration CheckoutDiscountPercentageRepeatDuration) CheckoutPublicDiscount

func (CheckoutPublicDiscount) MarshalJSON ¶

func (u CheckoutPublicDiscount) MarshalJSON() ([]byte, error)

func (*CheckoutPublicDiscount) UnmarshalJSON ¶

func (u *CheckoutPublicDiscount) UnmarshalJSON(data []byte) error

type CheckoutPublicDiscountType ¶

type CheckoutPublicDiscountType string
const (
	CheckoutPublicDiscountTypeCheckoutDiscountFixedOnceForeverDuration      CheckoutPublicDiscountType = "CheckoutDiscountFixedOnceForeverDuration"
	CheckoutPublicDiscountTypeCheckoutDiscountFixedRepeatDuration           CheckoutPublicDiscountType = "CheckoutDiscountFixedRepeatDuration"
	CheckoutPublicDiscountTypeCheckoutDiscountPercentageOnceForeverDuration CheckoutPublicDiscountType = "CheckoutDiscountPercentageOnceForeverDuration"
	CheckoutPublicDiscountTypeCheckoutDiscountPercentageRepeatDuration      CheckoutPublicDiscountType = "CheckoutDiscountPercentageRepeatDuration"
)

type CheckoutPublicPrices ¶ added in v0.13.0

type CheckoutPublicPrices struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CheckoutPublicPricesType
}

func CreateCheckoutPublicPricesLegacyRecurringProductPrice ¶ added in v0.13.0

func CreateCheckoutPublicPricesLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CheckoutPublicPrices

func CreateCheckoutPublicPricesProductPrice ¶ added in v0.13.0

func CreateCheckoutPublicPricesProductPrice(productPrice ProductPrice) CheckoutPublicPrices

func (CheckoutPublicPrices) MarshalJSON ¶ added in v0.13.0

func (u CheckoutPublicPrices) MarshalJSON() ([]byte, error)

func (*CheckoutPublicPrices) UnmarshalJSON ¶ added in v0.13.0

func (u *CheckoutPublicPrices) UnmarshalJSON(data []byte) error

type CheckoutPublicPricesType ¶ added in v0.13.0

type CheckoutPublicPricesType string
const (
	CheckoutPublicPricesTypeLegacyRecurringProductPrice CheckoutPublicPricesType = "LegacyRecurringProductPrice"
	CheckoutPublicPricesTypeProductPrice                CheckoutPublicPricesType = "ProductPrice"
)

type CheckoutPublicProductPrice ¶ added in v0.3.0

type CheckoutPublicProductPrice struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CheckoutPublicProductPriceType
}

func CreateCheckoutPublicProductPriceLegacyRecurringProductPrice ¶ added in v0.3.0

func CreateCheckoutPublicProductPriceLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CheckoutPublicProductPrice

func CreateCheckoutPublicProductPriceProductPrice ¶ added in v0.3.0

func CreateCheckoutPublicProductPriceProductPrice(productPrice ProductPrice) CheckoutPublicProductPrice

func (CheckoutPublicProductPrice) MarshalJSON ¶ added in v0.3.0

func (u CheckoutPublicProductPrice) MarshalJSON() ([]byte, error)

func (*CheckoutPublicProductPrice) UnmarshalJSON ¶ added in v0.3.0

func (u *CheckoutPublicProductPrice) UnmarshalJSON(data []byte) error

type CheckoutPublicProductPriceType ¶ added in v0.3.0

type CheckoutPublicProductPriceType string
const (
	CheckoutPublicProductPriceTypeLegacyRecurringProductPrice CheckoutPublicProductPriceType = "LegacyRecurringProductPrice"
	CheckoutPublicProductPriceTypeProductPrice                CheckoutPublicProductPriceType = "ProductPrice"
)

type CheckoutSortProperty ¶

type CheckoutSortProperty string
const (
	CheckoutSortPropertyCreatedAt      CheckoutSortProperty = "created_at"
	CheckoutSortPropertyMinusCreatedAt CheckoutSortProperty = "-created_at"
	CheckoutSortPropertyExpiresAt      CheckoutSortProperty = "expires_at"
	CheckoutSortPropertyMinusExpiresAt CheckoutSortProperty = "-expires_at"
	CheckoutSortPropertyStatus         CheckoutSortProperty = "status"
	CheckoutSortPropertyMinusStatus    CheckoutSortProperty = "-status"
)

func (CheckoutSortProperty) ToPointer ¶

func (*CheckoutSortProperty) UnmarshalJSON ¶

func (e *CheckoutSortProperty) UnmarshalJSON(data []byte) error

type CheckoutStatus ¶

type CheckoutStatus string
const (
	CheckoutStatusOpen      CheckoutStatus = "open"
	CheckoutStatusExpired   CheckoutStatus = "expired"
	CheckoutStatusConfirmed CheckoutStatus = "confirmed"
	CheckoutStatusSucceeded CheckoutStatus = "succeeded"
	CheckoutStatusFailed    CheckoutStatus = "failed"
)

func (CheckoutStatus) ToPointer ¶

func (e CheckoutStatus) ToPointer() *CheckoutStatus

func (*CheckoutStatus) UnmarshalJSON ¶

func (e *CheckoutStatus) UnmarshalJSON(data []byte) error

type CheckoutUpdate ¶

type CheckoutUpdate struct {
	// Key-value object storing custom field values.
	CustomFieldData map[string]*CheckoutUpdateCustomFieldData `json:"custom_field_data,omitempty"`
	// ID of the product to checkout. Must be present in the checkout's product list.
	ProductID *string `json:"product_id,omitempty"`
	// ID of the product price to checkout. Must correspond to a price present in the checkout's product list.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	ProductPriceID *string `json:"product_price_id,omitempty"`
	Amount         *int64  `json:"amount,omitempty"`
	// Number of seats for seat-based pricing.
	Seats                  *int64        `json:"seats,omitempty"`
	IsBusinessCustomer     *bool         `json:"is_business_customer,omitempty"`
	CustomerName           *string       `json:"customer_name,omitempty"`
	CustomerEmail          *string       `json:"customer_email,omitempty"`
	CustomerBillingName    *string       `json:"customer_billing_name,omitempty"`
	CustomerBillingAddress *AddressInput `json:"customer_billing_address,omitempty"`
	CustomerTaxID          *string       `json:"customer_tax_id,omitempty"`
	Locale                 *string       `json:"locale,omitempty"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval,omitempty"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count,omitempty"`
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CheckoutUpdateMetadata `json:"metadata,omitempty"`
	Currency *PresentmentCurrency              `json:"currency,omitempty"`
	// ID of the discount to apply to the checkout.
	DiscountID *string `json:"discount_id,omitempty"`
	// Whether to allow the customer to apply discount codes. If you apply a discount through `discount_id`, it'll still be applied, but the customer won't be able to change it.
	AllowDiscountCodes *bool `json:"allow_discount_codes,omitempty"`
	// Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to `true`.
	RequireBillingAddress *bool `json:"require_billing_address,omitempty"`
	// Whether to enable the trial period for the checkout session. If `false`, the trial period will be disabled, even if the selected product has a trial configured.
	AllowTrial        *bool   `json:"allow_trial,omitempty"`
	CustomerIPAddress *string `json:"customer_ip_address,omitempty"`
	// Key-value object allowing you to store additional information that'll be copied to the created customer.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	CustomerMetadata map[string]CheckoutUpdateCustomerMetadata `json:"customer_metadata,omitempty"`
	// URL where the customer will be redirected after a successful payment.You can add the `checkout_id={CHECKOUT_ID}` query parameter to retrieve the checkout session id.
	SuccessURL *string `json:"success_url,omitempty"`
	// When set, a back button will be shown in the checkout to return to this URL.
	ReturnURL *string `json:"return_url,omitempty"`
	// If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page.
	EmbedOrigin *string `json:"embed_origin,omitempty"`
}

CheckoutUpdate - Update an existing checkout session using an access token.

func (*CheckoutUpdate) GetAllowDiscountCodes ¶

func (c *CheckoutUpdate) GetAllowDiscountCodes() *bool

func (*CheckoutUpdate) GetAllowTrial ¶ added in v0.13.0

func (c *CheckoutUpdate) GetAllowTrial() *bool

func (*CheckoutUpdate) GetAmount ¶

func (c *CheckoutUpdate) GetAmount() *int64

func (*CheckoutUpdate) GetCurrency ¶ added in v0.13.0

func (c *CheckoutUpdate) GetCurrency() *PresentmentCurrency

func (*CheckoutUpdate) GetCustomFieldData ¶

func (c *CheckoutUpdate) GetCustomFieldData() map[string]*CheckoutUpdateCustomFieldData

func (*CheckoutUpdate) GetCustomerBillingAddress ¶

func (c *CheckoutUpdate) GetCustomerBillingAddress() *AddressInput

func (*CheckoutUpdate) GetCustomerBillingName ¶ added in v0.4.20

func (c *CheckoutUpdate) GetCustomerBillingName() *string

func (*CheckoutUpdate) GetCustomerEmail ¶

func (c *CheckoutUpdate) GetCustomerEmail() *string

func (*CheckoutUpdate) GetCustomerIPAddress ¶

func (c *CheckoutUpdate) GetCustomerIPAddress() *string

func (*CheckoutUpdate) GetCustomerMetadata ¶

func (c *CheckoutUpdate) GetCustomerMetadata() map[string]CheckoutUpdateCustomerMetadata

func (*CheckoutUpdate) GetCustomerName ¶

func (c *CheckoutUpdate) GetCustomerName() *string

func (*CheckoutUpdate) GetCustomerTaxID ¶

func (c *CheckoutUpdate) GetCustomerTaxID() *string

func (*CheckoutUpdate) GetDiscountID ¶

func (c *CheckoutUpdate) GetDiscountID() *string

func (*CheckoutUpdate) GetEmbedOrigin ¶

func (c *CheckoutUpdate) GetEmbedOrigin() *string

func (*CheckoutUpdate) GetIsBusinessCustomer ¶ added in v0.4.20

func (c *CheckoutUpdate) GetIsBusinessCustomer() *bool

func (*CheckoutUpdate) GetLocale ¶ added in v0.13.0

func (c *CheckoutUpdate) GetLocale() *string

func (*CheckoutUpdate) GetMetadata ¶

func (c *CheckoutUpdate) GetMetadata() map[string]CheckoutUpdateMetadata

func (*CheckoutUpdate) GetProductID ¶ added in v0.3.0

func (c *CheckoutUpdate) GetProductID() *string

func (*CheckoutUpdate) GetProductPriceID ¶

func (c *CheckoutUpdate) GetProductPriceID() *string

func (*CheckoutUpdate) GetRequireBillingAddress ¶ added in v0.4.14

func (c *CheckoutUpdate) GetRequireBillingAddress() *bool

func (*CheckoutUpdate) GetReturnURL ¶ added in v0.10.1

func (c *CheckoutUpdate) GetReturnURL() *string

func (*CheckoutUpdate) GetSeats ¶ added in v0.10.0

func (c *CheckoutUpdate) GetSeats() *int64

func (*CheckoutUpdate) GetSuccessURL ¶

func (c *CheckoutUpdate) GetSuccessURL() *string

func (*CheckoutUpdate) GetTrialInterval ¶ added in v0.9.1

func (c *CheckoutUpdate) GetTrialInterval() *TrialInterval

func (*CheckoutUpdate) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CheckoutUpdate) GetTrialIntervalCount() *int64

type CheckoutUpdateCustomFieldData ¶ added in v0.1.5

type CheckoutUpdateCustomFieldData struct {
	Str      *string    `queryParam:"inline" union:"member"`
	Integer  *int64     `queryParam:"inline" union:"member"`
	Boolean  *bool      `queryParam:"inline" union:"member"`
	DateTime *time.Time `queryParam:"inline" union:"member"`

	Type CheckoutUpdateCustomFieldDataType
}

func CreateCheckoutUpdateCustomFieldDataBoolean ¶ added in v0.1.5

func CreateCheckoutUpdateCustomFieldDataBoolean(boolean bool) CheckoutUpdateCustomFieldData

func CreateCheckoutUpdateCustomFieldDataDateTime ¶ added in v0.1.5

func CreateCheckoutUpdateCustomFieldDataDateTime(dateTime time.Time) CheckoutUpdateCustomFieldData

func CreateCheckoutUpdateCustomFieldDataInteger ¶ added in v0.1.5

func CreateCheckoutUpdateCustomFieldDataInteger(integer int64) CheckoutUpdateCustomFieldData

func CreateCheckoutUpdateCustomFieldDataStr ¶ added in v0.1.5

func CreateCheckoutUpdateCustomFieldDataStr(str string) CheckoutUpdateCustomFieldData

func (CheckoutUpdateCustomFieldData) MarshalJSON ¶ added in v0.1.5

func (u CheckoutUpdateCustomFieldData) MarshalJSON() ([]byte, error)

func (*CheckoutUpdateCustomFieldData) UnmarshalJSON ¶ added in v0.1.5

func (u *CheckoutUpdateCustomFieldData) UnmarshalJSON(data []byte) error

type CheckoutUpdateCustomFieldDataType ¶ added in v0.1.5

type CheckoutUpdateCustomFieldDataType string
const (
	CheckoutUpdateCustomFieldDataTypeStr      CheckoutUpdateCustomFieldDataType = "str"
	CheckoutUpdateCustomFieldDataTypeInteger  CheckoutUpdateCustomFieldDataType = "integer"
	CheckoutUpdateCustomFieldDataTypeBoolean  CheckoutUpdateCustomFieldDataType = "boolean"
	CheckoutUpdateCustomFieldDataTypeDateTime CheckoutUpdateCustomFieldDataType = "date-time"
)

type CheckoutUpdateCustomerMetadata ¶

type CheckoutUpdateCustomerMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CheckoutUpdateCustomerMetadataType
}

func CreateCheckoutUpdateCustomerMetadataBoolean ¶

func CreateCheckoutUpdateCustomerMetadataBoolean(boolean bool) CheckoutUpdateCustomerMetadata

func CreateCheckoutUpdateCustomerMetadataInteger ¶

func CreateCheckoutUpdateCustomerMetadataInteger(integer int64) CheckoutUpdateCustomerMetadata

func CreateCheckoutUpdateCustomerMetadataNumber ¶ added in v0.4.12

func CreateCheckoutUpdateCustomerMetadataNumber(number float64) CheckoutUpdateCustomerMetadata

func CreateCheckoutUpdateCustomerMetadataStr ¶

func CreateCheckoutUpdateCustomerMetadataStr(str string) CheckoutUpdateCustomerMetadata

func (CheckoutUpdateCustomerMetadata) MarshalJSON ¶

func (u CheckoutUpdateCustomerMetadata) MarshalJSON() ([]byte, error)

func (*CheckoutUpdateCustomerMetadata) UnmarshalJSON ¶

func (u *CheckoutUpdateCustomerMetadata) UnmarshalJSON(data []byte) error

type CheckoutUpdateCustomerMetadataType ¶

type CheckoutUpdateCustomerMetadataType string
const (
	CheckoutUpdateCustomerMetadataTypeStr     CheckoutUpdateCustomerMetadataType = "str"
	CheckoutUpdateCustomerMetadataTypeInteger CheckoutUpdateCustomerMetadataType = "integer"
	CheckoutUpdateCustomerMetadataTypeNumber  CheckoutUpdateCustomerMetadataType = "number"
	CheckoutUpdateCustomerMetadataTypeBoolean CheckoutUpdateCustomerMetadataType = "boolean"
)

type CheckoutUpdateMetadata ¶

type CheckoutUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CheckoutUpdateMetadataType
}

func CreateCheckoutUpdateMetadataBoolean ¶

func CreateCheckoutUpdateMetadataBoolean(boolean bool) CheckoutUpdateMetadata

func CreateCheckoutUpdateMetadataInteger ¶

func CreateCheckoutUpdateMetadataInteger(integer int64) CheckoutUpdateMetadata

func CreateCheckoutUpdateMetadataNumber ¶ added in v0.4.12

func CreateCheckoutUpdateMetadataNumber(number float64) CheckoutUpdateMetadata

func CreateCheckoutUpdateMetadataStr ¶

func CreateCheckoutUpdateMetadataStr(str string) CheckoutUpdateMetadata

func (CheckoutUpdateMetadata) MarshalJSON ¶

func (u CheckoutUpdateMetadata) MarshalJSON() ([]byte, error)

func (*CheckoutUpdateMetadata) UnmarshalJSON ¶

func (u *CheckoutUpdateMetadata) UnmarshalJSON(data []byte) error

type CheckoutUpdateMetadataType ¶

type CheckoutUpdateMetadataType string
const (
	CheckoutUpdateMetadataTypeStr     CheckoutUpdateMetadataType = "str"
	CheckoutUpdateMetadataTypeInteger CheckoutUpdateMetadataType = "integer"
	CheckoutUpdateMetadataTypeNumber  CheckoutUpdateMetadataType = "number"
	CheckoutUpdateMetadataTypeBoolean CheckoutUpdateMetadataType = "boolean"
)

type CheckoutUpdatePublic ¶

type CheckoutUpdatePublic struct {
	// Key-value object storing custom field values.
	CustomFieldData map[string]*CheckoutUpdatePublicCustomFieldData `json:"custom_field_data,omitempty"`
	// ID of the product to checkout. Must be present in the checkout's product list.
	ProductID *string `json:"product_id,omitempty"`
	// ID of the product price to checkout. Must correspond to a price present in the checkout's product list.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	ProductPriceID *string `json:"product_price_id,omitempty"`
	Amount         *int64  `json:"amount,omitempty"`
	// Number of seats for seat-based pricing.
	Seats                  *int64        `json:"seats,omitempty"`
	IsBusinessCustomer     *bool         `json:"is_business_customer,omitempty"`
	CustomerName           *string       `json:"customer_name,omitempty"`
	CustomerEmail          *string       `json:"customer_email,omitempty"`
	CustomerBillingName    *string       `json:"customer_billing_name,omitempty"`
	CustomerBillingAddress *AddressInput `json:"customer_billing_address,omitempty"`
	CustomerTaxID          *string       `json:"customer_tax_id,omitempty"`
	Locale                 *string       `json:"locale,omitempty"`
	// Discount code to apply to the checkout.
	DiscountCode *string `json:"discount_code,omitempty"`
	// contains filtered or unexported fields
}

CheckoutUpdatePublic - Update an existing checkout session using the client secret.

func (*CheckoutUpdatePublic) GetAllowTrial ¶ added in v0.13.0

func (c *CheckoutUpdatePublic) GetAllowTrial() *bool

func (*CheckoutUpdatePublic) GetAmount ¶

func (c *CheckoutUpdatePublic) GetAmount() *int64

func (*CheckoutUpdatePublic) GetCustomFieldData ¶

func (*CheckoutUpdatePublic) GetCustomerBillingAddress ¶

func (c *CheckoutUpdatePublic) GetCustomerBillingAddress() *AddressInput

func (*CheckoutUpdatePublic) GetCustomerBillingName ¶ added in v0.4.20

func (c *CheckoutUpdatePublic) GetCustomerBillingName() *string

func (*CheckoutUpdatePublic) GetCustomerEmail ¶

func (c *CheckoutUpdatePublic) GetCustomerEmail() *string

func (*CheckoutUpdatePublic) GetCustomerName ¶

func (c *CheckoutUpdatePublic) GetCustomerName() *string

func (*CheckoutUpdatePublic) GetCustomerTaxID ¶

func (c *CheckoutUpdatePublic) GetCustomerTaxID() *string

func (*CheckoutUpdatePublic) GetDiscountCode ¶

func (c *CheckoutUpdatePublic) GetDiscountCode() *string

func (*CheckoutUpdatePublic) GetIsBusinessCustomer ¶ added in v0.4.20

func (c *CheckoutUpdatePublic) GetIsBusinessCustomer() *bool

func (*CheckoutUpdatePublic) GetLocale ¶ added in v0.13.0

func (c *CheckoutUpdatePublic) GetLocale() *string

func (*CheckoutUpdatePublic) GetProductID ¶ added in v0.3.0

func (c *CheckoutUpdatePublic) GetProductID() *string

func (*CheckoutUpdatePublic) GetProductPriceID ¶

func (c *CheckoutUpdatePublic) GetProductPriceID() *string

func (*CheckoutUpdatePublic) GetSeats ¶ added in v0.10.0

func (c *CheckoutUpdatePublic) GetSeats() *int64

func (CheckoutUpdatePublic) MarshalJSON ¶ added in v0.13.0

func (c CheckoutUpdatePublic) MarshalJSON() ([]byte, error)

func (*CheckoutUpdatePublic) UnmarshalJSON ¶ added in v0.13.0

func (c *CheckoutUpdatePublic) UnmarshalJSON(data []byte) error

type CheckoutUpdatePublicCustomFieldData ¶

type CheckoutUpdatePublicCustomFieldData struct {
	Str      *string    `queryParam:"inline" union:"member"`
	Integer  *int64     `queryParam:"inline" union:"member"`
	Boolean  *bool      `queryParam:"inline" union:"member"`
	DateTime *time.Time `queryParam:"inline" union:"member"`

	Type CheckoutUpdatePublicCustomFieldDataType
}

func CreateCheckoutUpdatePublicCustomFieldDataBoolean ¶ added in v0.1.5

func CreateCheckoutUpdatePublicCustomFieldDataBoolean(boolean bool) CheckoutUpdatePublicCustomFieldData

func CreateCheckoutUpdatePublicCustomFieldDataDateTime ¶ added in v0.1.5

func CreateCheckoutUpdatePublicCustomFieldDataDateTime(dateTime time.Time) CheckoutUpdatePublicCustomFieldData

func CreateCheckoutUpdatePublicCustomFieldDataInteger ¶ added in v0.1.5

func CreateCheckoutUpdatePublicCustomFieldDataInteger(integer int64) CheckoutUpdatePublicCustomFieldData

func CreateCheckoutUpdatePublicCustomFieldDataStr ¶ added in v0.1.5

func CreateCheckoutUpdatePublicCustomFieldDataStr(str string) CheckoutUpdatePublicCustomFieldData

func (CheckoutUpdatePublicCustomFieldData) MarshalJSON ¶ added in v0.1.5

func (u CheckoutUpdatePublicCustomFieldData) MarshalJSON() ([]byte, error)

func (*CheckoutUpdatePublicCustomFieldData) UnmarshalJSON ¶ added in v0.1.5

func (u *CheckoutUpdatePublicCustomFieldData) UnmarshalJSON(data []byte) error

type CheckoutUpdatePublicCustomFieldDataType ¶ added in v0.1.5

type CheckoutUpdatePublicCustomFieldDataType string
const (
	CheckoutUpdatePublicCustomFieldDataTypeStr      CheckoutUpdatePublicCustomFieldDataType = "str"
	CheckoutUpdatePublicCustomFieldDataTypeInteger  CheckoutUpdatePublicCustomFieldDataType = "integer"
	CheckoutUpdatePublicCustomFieldDataTypeBoolean  CheckoutUpdatePublicCustomFieldDataType = "boolean"
	CheckoutUpdatePublicCustomFieldDataTypeDateTime CheckoutUpdatePublicCustomFieldDataType = "date-time"
)

type Checkouts ¶ added in v0.4.17

type Checkouts struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CheckoutsType
}

func CreateCheckoutsInteger ¶ added in v0.4.17

func CreateCheckoutsInteger(integer int64) Checkouts

func CreateCheckoutsNumber ¶ added in v0.4.17

func CreateCheckoutsNumber(number float64) Checkouts

func (Checkouts) MarshalJSON ¶ added in v0.4.17

func (u Checkouts) MarshalJSON() ([]byte, error)

func (*Checkouts) UnmarshalJSON ¶ added in v0.4.17

func (u *Checkouts) UnmarshalJSON(data []byte) error

type CheckoutsConversion ¶ added in v0.4.17

type CheckoutsConversion struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CheckoutsConversionType
}

func CreateCheckoutsConversionInteger ¶ added in v0.4.17

func CreateCheckoutsConversionInteger(integer int64) CheckoutsConversion

func CreateCheckoutsConversionNumber ¶ added in v0.4.17

func CreateCheckoutsConversionNumber(number float64) CheckoutsConversion

func (CheckoutsConversion) MarshalJSON ¶ added in v0.4.17

func (u CheckoutsConversion) MarshalJSON() ([]byte, error)

func (*CheckoutsConversion) UnmarshalJSON ¶ added in v0.4.17

func (u *CheckoutsConversion) UnmarshalJSON(data []byte) error

type CheckoutsConversionType ¶ added in v0.4.17

type CheckoutsConversionType string
const (
	CheckoutsConversionTypeInteger CheckoutsConversionType = "integer"
	CheckoutsConversionTypeNumber  CheckoutsConversionType = "number"
)

type CheckoutsType ¶ added in v0.4.17

type CheckoutsType string
const (
	CheckoutsTypeInteger CheckoutsType = "integer"
	CheckoutsTypeNumber  CheckoutsType = "number"
)

type ChurnRate ¶ added in v0.12.0

type ChurnRate struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type ChurnRateType
}

func CreateChurnRateInteger ¶ added in v0.12.0

func CreateChurnRateInteger(integer int64) ChurnRate

func CreateChurnRateNumber ¶ added in v0.12.0

func CreateChurnRateNumber(number float64) ChurnRate

func (ChurnRate) MarshalJSON ¶ added in v0.12.0

func (u ChurnRate) MarshalJSON() ([]byte, error)

func (*ChurnRate) UnmarshalJSON ¶ added in v0.12.0

func (u *ChurnRate) UnmarshalJSON(data []byte) error

type ChurnRateType ¶ added in v0.12.0

type ChurnRateType string
const (
	ChurnRateTypeInteger ChurnRateType = "integer"
	ChurnRateTypeNumber  ChurnRateType = "number"
)

type ChurnedSubscriptions ¶ added in v0.13.0

type ChurnedSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type ChurnedSubscriptionsType
}

func CreateChurnedSubscriptionsInteger ¶ added in v0.13.0

func CreateChurnedSubscriptionsInteger(integer int64) ChurnedSubscriptions

func CreateChurnedSubscriptionsNumber ¶ added in v0.13.0

func CreateChurnedSubscriptionsNumber(number float64) ChurnedSubscriptions

func (ChurnedSubscriptions) MarshalJSON ¶ added in v0.13.0

func (u ChurnedSubscriptions) MarshalJSON() ([]byte, error)

func (*ChurnedSubscriptions) UnmarshalJSON ¶ added in v0.13.0

func (u *ChurnedSubscriptions) UnmarshalJSON(data []byte) error

type ChurnedSubscriptionsType ¶ added in v0.13.0

type ChurnedSubscriptionsType string
const (
	ChurnedSubscriptionsTypeInteger ChurnedSubscriptionsType = "integer"
	ChurnedSubscriptionsTypeNumber  ChurnedSubscriptionsType = "number"
)

type Clauses ¶ added in v0.1.8

type Clauses struct {
	FilterClause *FilterClause `queryParam:"inline" union:"member"`
	Filter       *Filter       `queryParam:"inline" union:"member"`

	Type ClausesType
}

func CreateClausesFilter ¶ added in v0.1.8

func CreateClausesFilter(filter Filter) Clauses

func CreateClausesFilterClause ¶ added in v0.1.8

func CreateClausesFilterClause(filterClause FilterClause) Clauses

func (Clauses) MarshalJSON ¶ added in v0.1.8

func (u Clauses) MarshalJSON() ([]byte, error)

func (*Clauses) UnmarshalJSON ¶ added in v0.1.8

func (u *Clauses) UnmarshalJSON(data []byte) error

type ClausesType ¶ added in v0.1.8

type ClausesType string
const (
	ClausesTypeFilterClause ClausesType = "FilterClause"
	ClausesTypeFilter       ClausesType = "Filter"
)

type CommittedMonthlyRecurringRevenue ¶ added in v0.8.0

type CommittedMonthlyRecurringRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CommittedMonthlyRecurringRevenueType
}

func CreateCommittedMonthlyRecurringRevenueInteger ¶ added in v0.8.0

func CreateCommittedMonthlyRecurringRevenueInteger(integer int64) CommittedMonthlyRecurringRevenue

func CreateCommittedMonthlyRecurringRevenueNumber ¶ added in v0.8.0

func CreateCommittedMonthlyRecurringRevenueNumber(number float64) CommittedMonthlyRecurringRevenue

func (CommittedMonthlyRecurringRevenue) MarshalJSON ¶ added in v0.8.0

func (u CommittedMonthlyRecurringRevenue) MarshalJSON() ([]byte, error)

func (*CommittedMonthlyRecurringRevenue) UnmarshalJSON ¶ added in v0.8.0

func (u *CommittedMonthlyRecurringRevenue) UnmarshalJSON(data []byte) error

type CommittedMonthlyRecurringRevenueType ¶ added in v0.8.0

type CommittedMonthlyRecurringRevenueType string
const (
	CommittedMonthlyRecurringRevenueTypeInteger CommittedMonthlyRecurringRevenueType = "integer"
	CommittedMonthlyRecurringRevenueTypeNumber  CommittedMonthlyRecurringRevenueType = "number"
)

type CommittedSubscriptions ¶ added in v0.13.0

type CommittedSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CommittedSubscriptionsType
}

func CreateCommittedSubscriptionsInteger ¶ added in v0.13.0

func CreateCommittedSubscriptionsInteger(integer int64) CommittedSubscriptions

func CreateCommittedSubscriptionsNumber ¶ added in v0.13.0

func CreateCommittedSubscriptionsNumber(number float64) CommittedSubscriptions

func (CommittedSubscriptions) MarshalJSON ¶ added in v0.13.0

func (u CommittedSubscriptions) MarshalJSON() ([]byte, error)

func (*CommittedSubscriptions) UnmarshalJSON ¶ added in v0.13.0

func (u *CommittedSubscriptions) UnmarshalJSON(data []byte) error

type CommittedSubscriptionsType ¶ added in v0.13.0

type CommittedSubscriptionsType string
const (
	CommittedSubscriptionsTypeInteger CommittedSubscriptionsType = "integer"
	CommittedSubscriptionsTypeNumber  CommittedSubscriptionsType = "number"
)

type Conditions ¶

type Conditions struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type ConditionsType
}

func CreateConditionsBoolean ¶ added in v0.4.15

func CreateConditionsBoolean(boolean bool) Conditions

func CreateConditionsInteger ¶ added in v0.4.15

func CreateConditionsInteger(integer int64) Conditions

func CreateConditionsNumber ¶ added in v0.4.15

func CreateConditionsNumber(number float64) Conditions

func CreateConditionsStr ¶ added in v0.4.15

func CreateConditionsStr(str string) Conditions

func (Conditions) MarshalJSON ¶ added in v0.4.15

func (u Conditions) MarshalJSON() ([]byte, error)

func (*Conditions) UnmarshalJSON ¶ added in v0.4.15

func (u *Conditions) UnmarshalJSON(data []byte) error

type ConditionsType ¶ added in v0.4.15

type ConditionsType string
const (
	ConditionsTypeStr     ConditionsType = "str"
	ConditionsTypeInteger ConditionsType = "integer"
	ConditionsTypeNumber  ConditionsType = "number"
	ConditionsTypeBoolean ConditionsType = "boolean"
)

type Context ¶ added in v0.13.0

type Context struct {
}

type CostMetadataInput ¶ added in v0.12.0

type CostMetadataInput struct {
	// The amount in cents.
	Amount Amount `json:"amount"`
	// The currency. Currently, only `usd` is supported.
	Currency string `json:"currency"`
}

func (*CostMetadataInput) GetAmount ¶ added in v0.12.0

func (c *CostMetadataInput) GetAmount() Amount

func (*CostMetadataInput) GetCurrency ¶ added in v0.12.0

func (c *CostMetadataInput) GetCurrency() string

func (CostMetadataInput) MarshalJSON ¶ added in v0.12.0

func (c CostMetadataInput) MarshalJSON() ([]byte, error)

func (*CostMetadataInput) UnmarshalJSON ¶ added in v0.12.0

func (c *CostMetadataInput) UnmarshalJSON(data []byte) error

type CostMetadataOutput ¶ added in v0.12.0

type CostMetadataOutput struct {
	// The amount in cents.
	Amount string `json:"amount"`
	// The currency. Currently, only `usd` is supported.
	Currency string `json:"currency"`
}

func (*CostMetadataOutput) GetAmount ¶ added in v0.12.0

func (c *CostMetadataOutput) GetAmount() string

func (*CostMetadataOutput) GetCurrency ¶ added in v0.12.0

func (c *CostMetadataOutput) GetCurrency() string

func (CostMetadataOutput) MarshalJSON ¶ added in v0.12.0

func (c CostMetadataOutput) MarshalJSON() ([]byte, error)

func (*CostMetadataOutput) UnmarshalJSON ¶ added in v0.12.0

func (c *CostMetadataOutput) UnmarshalJSON(data []byte) error

type CostPerUser ¶ added in v0.12.0

type CostPerUser struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CostPerUserType
}

func CreateCostPerUserInteger ¶ added in v0.12.0

func CreateCostPerUserInteger(integer int64) CostPerUser

func CreateCostPerUserNumber ¶ added in v0.12.0

func CreateCostPerUserNumber(number float64) CostPerUser

func (CostPerUser) MarshalJSON ¶ added in v0.12.0

func (u CostPerUser) MarshalJSON() ([]byte, error)

func (*CostPerUser) UnmarshalJSON ¶ added in v0.12.0

func (u *CostPerUser) UnmarshalJSON(data []byte) error

type CostPerUserType ¶ added in v0.12.0

type CostPerUserType string
const (
	CostPerUserTypeInteger CostPerUserType = "integer"
	CostPerUserTypeNumber  CostPerUserType = "number"
)

type Costs ¶ added in v0.12.0

type Costs struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CostsType
}

func CreateCostsInteger ¶ added in v0.12.0

func CreateCostsInteger(integer int64) Costs

func CreateCostsNumber ¶ added in v0.12.0

func CreateCostsNumber(number float64) Costs

func (Costs) MarshalJSON ¶ added in v0.12.0

func (u Costs) MarshalJSON() ([]byte, error)

func (*Costs) UnmarshalJSON ¶ added in v0.12.0

func (u *Costs) UnmarshalJSON(data []byte) error

type CostsType ¶ added in v0.12.0

type CostsType string
const (
	CostsTypeInteger CostsType = "integer"
	CostsTypeNumber  CostsType = "number"
)

type CountAggregation ¶ added in v0.1.8

type CountAggregation struct {
	// contains filtered or unexported fields
}

func (*CountAggregation) GetFunc ¶ added in v0.1.8

func (c *CountAggregation) GetFunc() *string

func (CountAggregation) MarshalJSON ¶ added in v0.1.8

func (c CountAggregation) MarshalJSON() ([]byte, error)

func (*CountAggregation) UnmarshalJSON ¶ added in v0.1.8

func (c *CountAggregation) UnmarshalJSON(data []byte) error

type CountryAlpha2 ¶ added in v0.9.0

type CountryAlpha2 string
const (
	CountryAlpha2Ad CountryAlpha2 = "AD"
	CountryAlpha2Ae CountryAlpha2 = "AE"
	CountryAlpha2Af CountryAlpha2 = "AF"
	CountryAlpha2Ag CountryAlpha2 = "AG"
	CountryAlpha2Ai CountryAlpha2 = "AI"
	CountryAlpha2Al CountryAlpha2 = "AL"
	CountryAlpha2Am CountryAlpha2 = "AM"
	CountryAlpha2Ao CountryAlpha2 = "AO"
	CountryAlpha2Aq CountryAlpha2 = "AQ"
	CountryAlpha2Ar CountryAlpha2 = "AR"
	CountryAlpha2As CountryAlpha2 = "AS"
	CountryAlpha2At CountryAlpha2 = "AT"
	CountryAlpha2Au CountryAlpha2 = "AU"
	CountryAlpha2Aw CountryAlpha2 = "AW"
	CountryAlpha2Ax CountryAlpha2 = "AX"
	CountryAlpha2Az CountryAlpha2 = "AZ"
	CountryAlpha2Ba CountryAlpha2 = "BA"
	CountryAlpha2Bb CountryAlpha2 = "BB"
	CountryAlpha2Bd CountryAlpha2 = "BD"
	CountryAlpha2Be CountryAlpha2 = "BE"
	CountryAlpha2Bf CountryAlpha2 = "BF"
	CountryAlpha2Bg CountryAlpha2 = "BG"
	CountryAlpha2Bh CountryAlpha2 = "BH"
	CountryAlpha2Bi CountryAlpha2 = "BI"
	CountryAlpha2Bj CountryAlpha2 = "BJ"
	CountryAlpha2Bl CountryAlpha2 = "BL"
	CountryAlpha2Bm CountryAlpha2 = "BM"
	CountryAlpha2Bn CountryAlpha2 = "BN"
	CountryAlpha2Bo CountryAlpha2 = "BO"
	CountryAlpha2Bq CountryAlpha2 = "BQ"
	CountryAlpha2Br CountryAlpha2 = "BR"
	CountryAlpha2Bs CountryAlpha2 = "BS"
	CountryAlpha2Bt CountryAlpha2 = "BT"
	CountryAlpha2Bv CountryAlpha2 = "BV"
	CountryAlpha2Bw CountryAlpha2 = "BW"
	CountryAlpha2By CountryAlpha2 = "BY"
	CountryAlpha2Bz CountryAlpha2 = "BZ"
	CountryAlpha2Ca CountryAlpha2 = "CA"
	CountryAlpha2Cc CountryAlpha2 = "CC"
	CountryAlpha2Cd CountryAlpha2 = "CD"
	CountryAlpha2Cf CountryAlpha2 = "CF"
	CountryAlpha2Cg CountryAlpha2 = "CG"
	CountryAlpha2Ch CountryAlpha2 = "CH"
	CountryAlpha2Ci CountryAlpha2 = "CI"
	CountryAlpha2Ck CountryAlpha2 = "CK"
	CountryAlpha2Cl CountryAlpha2 = "CL"
	CountryAlpha2Cm CountryAlpha2 = "CM"
	CountryAlpha2Cn CountryAlpha2 = "CN"
	CountryAlpha2Co CountryAlpha2 = "CO"
	CountryAlpha2Cr CountryAlpha2 = "CR"
	CountryAlpha2Cu CountryAlpha2 = "CU"
	CountryAlpha2Cv CountryAlpha2 = "CV"
	CountryAlpha2Cw CountryAlpha2 = "CW"
	CountryAlpha2Cx CountryAlpha2 = "CX"
	CountryAlpha2Cy CountryAlpha2 = "CY"
	CountryAlpha2Cz CountryAlpha2 = "CZ"
	CountryAlpha2De CountryAlpha2 = "DE"
	CountryAlpha2Dj CountryAlpha2 = "DJ"
	CountryAlpha2Dk CountryAlpha2 = "DK"
	CountryAlpha2Dm CountryAlpha2 = "DM"
	CountryAlpha2Do CountryAlpha2 = "DO"
	CountryAlpha2Dz CountryAlpha2 = "DZ"
	CountryAlpha2Ec CountryAlpha2 = "EC"
	CountryAlpha2Ee CountryAlpha2 = "EE"
	CountryAlpha2Eg CountryAlpha2 = "EG"
	CountryAlpha2Eh CountryAlpha2 = "EH"
	CountryAlpha2Er CountryAlpha2 = "ER"
	CountryAlpha2Es CountryAlpha2 = "ES"
	CountryAlpha2Et CountryAlpha2 = "ET"
	CountryAlpha2Fi CountryAlpha2 = "FI"
	CountryAlpha2Fj CountryAlpha2 = "FJ"
	CountryAlpha2Fk CountryAlpha2 = "FK"
	CountryAlpha2Fm CountryAlpha2 = "FM"
	CountryAlpha2Fo CountryAlpha2 = "FO"
	CountryAlpha2Fr CountryAlpha2 = "FR"
	CountryAlpha2Ga CountryAlpha2 = "GA"
	CountryAlpha2Gb CountryAlpha2 = "GB"
	CountryAlpha2Gd CountryAlpha2 = "GD"
	CountryAlpha2Ge CountryAlpha2 = "GE"
	CountryAlpha2Gf CountryAlpha2 = "GF"
	CountryAlpha2Gg CountryAlpha2 = "GG"
	CountryAlpha2Gh CountryAlpha2 = "GH"
	CountryAlpha2Gi CountryAlpha2 = "GI"
	CountryAlpha2Gl CountryAlpha2 = "GL"
	CountryAlpha2Gm CountryAlpha2 = "GM"
	CountryAlpha2Gn CountryAlpha2 = "GN"
	CountryAlpha2Gp CountryAlpha2 = "GP"
	CountryAlpha2Gq CountryAlpha2 = "GQ"
	CountryAlpha2Gr CountryAlpha2 = "GR"
	CountryAlpha2Gs CountryAlpha2 = "GS"
	CountryAlpha2Gt CountryAlpha2 = "GT"
	CountryAlpha2Gu CountryAlpha2 = "GU"
	CountryAlpha2Gw CountryAlpha2 = "GW"
	CountryAlpha2Gy CountryAlpha2 = "GY"
	CountryAlpha2Hk CountryAlpha2 = "HK"
	CountryAlpha2Hm CountryAlpha2 = "HM"
	CountryAlpha2Hn CountryAlpha2 = "HN"
	CountryAlpha2Hr CountryAlpha2 = "HR"
	CountryAlpha2Ht CountryAlpha2 = "HT"
	CountryAlpha2Hu CountryAlpha2 = "HU"
	CountryAlpha2Id CountryAlpha2 = "ID"
	CountryAlpha2Ie CountryAlpha2 = "IE"
	CountryAlpha2Il CountryAlpha2 = "IL"
	CountryAlpha2Im CountryAlpha2 = "IM"
	CountryAlpha2In CountryAlpha2 = "IN"
	CountryAlpha2Io CountryAlpha2 = "IO"
	CountryAlpha2Iq CountryAlpha2 = "IQ"
	CountryAlpha2Ir CountryAlpha2 = "IR"
	CountryAlpha2Is CountryAlpha2 = "IS"
	CountryAlpha2It CountryAlpha2 = "IT"
	CountryAlpha2Je CountryAlpha2 = "JE"
	CountryAlpha2Jm CountryAlpha2 = "JM"
	CountryAlpha2Jo CountryAlpha2 = "JO"
	CountryAlpha2Jp CountryAlpha2 = "JP"
	CountryAlpha2Ke CountryAlpha2 = "KE"
	CountryAlpha2Kg CountryAlpha2 = "KG"
	CountryAlpha2Kh CountryAlpha2 = "KH"
	CountryAlpha2Ki CountryAlpha2 = "KI"
	CountryAlpha2Km CountryAlpha2 = "KM"
	CountryAlpha2Kn CountryAlpha2 = "KN"
	CountryAlpha2Kp CountryAlpha2 = "KP"
	CountryAlpha2Kr CountryAlpha2 = "KR"
	CountryAlpha2Kw CountryAlpha2 = "KW"
	CountryAlpha2Ky CountryAlpha2 = "KY"
	CountryAlpha2Kz CountryAlpha2 = "KZ"
	CountryAlpha2La CountryAlpha2 = "LA"
	CountryAlpha2Lb CountryAlpha2 = "LB"
	CountryAlpha2Lc CountryAlpha2 = "LC"
	CountryAlpha2Li CountryAlpha2 = "LI"
	CountryAlpha2Lk CountryAlpha2 = "LK"
	CountryAlpha2Lr CountryAlpha2 = "LR"
	CountryAlpha2Ls CountryAlpha2 = "LS"
	CountryAlpha2Lt CountryAlpha2 = "LT"
	CountryAlpha2Lu CountryAlpha2 = "LU"
	CountryAlpha2Lv CountryAlpha2 = "LV"
	CountryAlpha2Ly CountryAlpha2 = "LY"
	CountryAlpha2Ma CountryAlpha2 = "MA"
	CountryAlpha2Mc CountryAlpha2 = "MC"
	CountryAlpha2Md CountryAlpha2 = "MD"
	CountryAlpha2Me CountryAlpha2 = "ME"
	CountryAlpha2Mf CountryAlpha2 = "MF"
	CountryAlpha2Mg CountryAlpha2 = "MG"
	CountryAlpha2Mh CountryAlpha2 = "MH"
	CountryAlpha2Mk CountryAlpha2 = "MK"
	CountryAlpha2Ml CountryAlpha2 = "ML"
	CountryAlpha2Mm CountryAlpha2 = "MM"
	CountryAlpha2Mn CountryAlpha2 = "MN"
	CountryAlpha2Mo CountryAlpha2 = "MO"
	CountryAlpha2Mp CountryAlpha2 = "MP"
	CountryAlpha2Mq CountryAlpha2 = "MQ"
	CountryAlpha2Mr CountryAlpha2 = "MR"
	CountryAlpha2Ms CountryAlpha2 = "MS"
	CountryAlpha2Mt CountryAlpha2 = "MT"
	CountryAlpha2Mu CountryAlpha2 = "MU"
	CountryAlpha2Mv CountryAlpha2 = "MV"
	CountryAlpha2Mw CountryAlpha2 = "MW"
	CountryAlpha2Mx CountryAlpha2 = "MX"
	CountryAlpha2My CountryAlpha2 = "MY"
	CountryAlpha2Mz CountryAlpha2 = "MZ"
	CountryAlpha2Na CountryAlpha2 = "NA"
	CountryAlpha2Nc CountryAlpha2 = "NC"
	CountryAlpha2Ne CountryAlpha2 = "NE"
	CountryAlpha2Nf CountryAlpha2 = "NF"
	CountryAlpha2Ng CountryAlpha2 = "NG"
	CountryAlpha2Ni CountryAlpha2 = "NI"
	CountryAlpha2Nl CountryAlpha2 = "NL"
	CountryAlpha2No CountryAlpha2 = "NO"
	CountryAlpha2Np CountryAlpha2 = "NP"
	CountryAlpha2Nr CountryAlpha2 = "NR"
	CountryAlpha2Nu CountryAlpha2 = "NU"
	CountryAlpha2Nz CountryAlpha2 = "NZ"
	CountryAlpha2Om CountryAlpha2 = "OM"
	CountryAlpha2Pa CountryAlpha2 = "PA"
	CountryAlpha2Pe CountryAlpha2 = "PE"
	CountryAlpha2Pf CountryAlpha2 = "PF"
	CountryAlpha2Pg CountryAlpha2 = "PG"
	CountryAlpha2Ph CountryAlpha2 = "PH"
	CountryAlpha2Pk CountryAlpha2 = "PK"
	CountryAlpha2Pl CountryAlpha2 = "PL"
	CountryAlpha2Pm CountryAlpha2 = "PM"
	CountryAlpha2Pn CountryAlpha2 = "PN"
	CountryAlpha2Pr CountryAlpha2 = "PR"
	CountryAlpha2Ps CountryAlpha2 = "PS"
	CountryAlpha2Pt CountryAlpha2 = "PT"
	CountryAlpha2Pw CountryAlpha2 = "PW"
	CountryAlpha2Py CountryAlpha2 = "PY"
	CountryAlpha2Qa CountryAlpha2 = "QA"
	CountryAlpha2Re CountryAlpha2 = "RE"
	CountryAlpha2Ro CountryAlpha2 = "RO"
	CountryAlpha2Rs CountryAlpha2 = "RS"
	CountryAlpha2Ru CountryAlpha2 = "RU"
	CountryAlpha2Rw CountryAlpha2 = "RW"
	CountryAlpha2Sa CountryAlpha2 = "SA"
	CountryAlpha2Sb CountryAlpha2 = "SB"
	CountryAlpha2Sc CountryAlpha2 = "SC"
	CountryAlpha2Sd CountryAlpha2 = "SD"
	CountryAlpha2Se CountryAlpha2 = "SE"
	CountryAlpha2Sg CountryAlpha2 = "SG"
	CountryAlpha2Sh CountryAlpha2 = "SH"
	CountryAlpha2Si CountryAlpha2 = "SI"
	CountryAlpha2Sj CountryAlpha2 = "SJ"
	CountryAlpha2Sk CountryAlpha2 = "SK"
	CountryAlpha2Sl CountryAlpha2 = "SL"
	CountryAlpha2Sm CountryAlpha2 = "SM"
	CountryAlpha2Sn CountryAlpha2 = "SN"
	CountryAlpha2So CountryAlpha2 = "SO"
	CountryAlpha2Sr CountryAlpha2 = "SR"
	CountryAlpha2Ss CountryAlpha2 = "SS"
	CountryAlpha2St CountryAlpha2 = "ST"
	CountryAlpha2Sv CountryAlpha2 = "SV"
	CountryAlpha2Sx CountryAlpha2 = "SX"
	CountryAlpha2Sy CountryAlpha2 = "SY"
	CountryAlpha2Sz CountryAlpha2 = "SZ"
	CountryAlpha2Tc CountryAlpha2 = "TC"
	CountryAlpha2Td CountryAlpha2 = "TD"
	CountryAlpha2Tf CountryAlpha2 = "TF"
	CountryAlpha2Tg CountryAlpha2 = "TG"
	CountryAlpha2Th CountryAlpha2 = "TH"
	CountryAlpha2Tj CountryAlpha2 = "TJ"
	CountryAlpha2Tk CountryAlpha2 = "TK"
	CountryAlpha2Tl CountryAlpha2 = "TL"
	CountryAlpha2Tm CountryAlpha2 = "TM"
	CountryAlpha2Tn CountryAlpha2 = "TN"
	CountryAlpha2To CountryAlpha2 = "TO"
	CountryAlpha2Tr CountryAlpha2 = "TR"
	CountryAlpha2Tt CountryAlpha2 = "TT"
	CountryAlpha2Tv CountryAlpha2 = "TV"
	CountryAlpha2Tw CountryAlpha2 = "TW"
	CountryAlpha2Tz CountryAlpha2 = "TZ"
	CountryAlpha2Ua CountryAlpha2 = "UA"
	CountryAlpha2Ug CountryAlpha2 = "UG"
	CountryAlpha2Um CountryAlpha2 = "UM"
	CountryAlpha2Us CountryAlpha2 = "US"
	CountryAlpha2Uy CountryAlpha2 = "UY"
	CountryAlpha2Uz CountryAlpha2 = "UZ"
	CountryAlpha2Va CountryAlpha2 = "VA"
	CountryAlpha2Vc CountryAlpha2 = "VC"
	CountryAlpha2Ve CountryAlpha2 = "VE"
	CountryAlpha2Vg CountryAlpha2 = "VG"
	CountryAlpha2Vi CountryAlpha2 = "VI"
	CountryAlpha2Vn CountryAlpha2 = "VN"
	CountryAlpha2Vu CountryAlpha2 = "VU"
	CountryAlpha2Wf CountryAlpha2 = "WF"
	CountryAlpha2Ws CountryAlpha2 = "WS"
	CountryAlpha2Ye CountryAlpha2 = "YE"
	CountryAlpha2Yt CountryAlpha2 = "YT"
	CountryAlpha2Za CountryAlpha2 = "ZA"
	CountryAlpha2Zm CountryAlpha2 = "ZM"
	CountryAlpha2Zw CountryAlpha2 = "ZW"
)

func (CountryAlpha2) ToPointer ¶ added in v0.9.0

func (e CountryAlpha2) ToPointer() *CountryAlpha2

func (*CountryAlpha2) UnmarshalJSON ¶ added in v0.9.0

func (e *CountryAlpha2) UnmarshalJSON(data []byte) error

type CountryAlpha2Input ¶ added in v0.9.0

type CountryAlpha2Input string
const (
	CountryAlpha2InputAd CountryAlpha2Input = "AD"
	CountryAlpha2InputAe CountryAlpha2Input = "AE"
	CountryAlpha2InputAf CountryAlpha2Input = "AF"
	CountryAlpha2InputAg CountryAlpha2Input = "AG"
	CountryAlpha2InputAi CountryAlpha2Input = "AI"
	CountryAlpha2InputAl CountryAlpha2Input = "AL"
	CountryAlpha2InputAm CountryAlpha2Input = "AM"
	CountryAlpha2InputAo CountryAlpha2Input = "AO"
	CountryAlpha2InputAq CountryAlpha2Input = "AQ"
	CountryAlpha2InputAr CountryAlpha2Input = "AR"
	CountryAlpha2InputAs CountryAlpha2Input = "AS"
	CountryAlpha2InputAt CountryAlpha2Input = "AT"
	CountryAlpha2InputAu CountryAlpha2Input = "AU"
	CountryAlpha2InputAw CountryAlpha2Input = "AW"
	CountryAlpha2InputAx CountryAlpha2Input = "AX"
	CountryAlpha2InputAz CountryAlpha2Input = "AZ"
	CountryAlpha2InputBa CountryAlpha2Input = "BA"
	CountryAlpha2InputBb CountryAlpha2Input = "BB"
	CountryAlpha2InputBd CountryAlpha2Input = "BD"
	CountryAlpha2InputBe CountryAlpha2Input = "BE"
	CountryAlpha2InputBf CountryAlpha2Input = "BF"
	CountryAlpha2InputBg CountryAlpha2Input = "BG"
	CountryAlpha2InputBh CountryAlpha2Input = "BH"
	CountryAlpha2InputBi CountryAlpha2Input = "BI"
	CountryAlpha2InputBj CountryAlpha2Input = "BJ"
	CountryAlpha2InputBl CountryAlpha2Input = "BL"
	CountryAlpha2InputBm CountryAlpha2Input = "BM"
	CountryAlpha2InputBn CountryAlpha2Input = "BN"
	CountryAlpha2InputBo CountryAlpha2Input = "BO"
	CountryAlpha2InputBq CountryAlpha2Input = "BQ"
	CountryAlpha2InputBr CountryAlpha2Input = "BR"
	CountryAlpha2InputBs CountryAlpha2Input = "BS"
	CountryAlpha2InputBt CountryAlpha2Input = "BT"
	CountryAlpha2InputBv CountryAlpha2Input = "BV"
	CountryAlpha2InputBw CountryAlpha2Input = "BW"
	CountryAlpha2InputBy CountryAlpha2Input = "BY"
	CountryAlpha2InputBz CountryAlpha2Input = "BZ"
	CountryAlpha2InputCa CountryAlpha2Input = "CA"
	CountryAlpha2InputCc CountryAlpha2Input = "CC"
	CountryAlpha2InputCd CountryAlpha2Input = "CD"
	CountryAlpha2InputCf CountryAlpha2Input = "CF"
	CountryAlpha2InputCg CountryAlpha2Input = "CG"
	CountryAlpha2InputCh CountryAlpha2Input = "CH"
	CountryAlpha2InputCi CountryAlpha2Input = "CI"
	CountryAlpha2InputCk CountryAlpha2Input = "CK"
	CountryAlpha2InputCl CountryAlpha2Input = "CL"
	CountryAlpha2InputCm CountryAlpha2Input = "CM"
	CountryAlpha2InputCn CountryAlpha2Input = "CN"
	CountryAlpha2InputCo CountryAlpha2Input = "CO"
	CountryAlpha2InputCr CountryAlpha2Input = "CR"
	CountryAlpha2InputCv CountryAlpha2Input = "CV"
	CountryAlpha2InputCw CountryAlpha2Input = "CW"
	CountryAlpha2InputCx CountryAlpha2Input = "CX"
	CountryAlpha2InputCy CountryAlpha2Input = "CY"
	CountryAlpha2InputCz CountryAlpha2Input = "CZ"
	CountryAlpha2InputDe CountryAlpha2Input = "DE"
	CountryAlpha2InputDj CountryAlpha2Input = "DJ"
	CountryAlpha2InputDk CountryAlpha2Input = "DK"
	CountryAlpha2InputDm CountryAlpha2Input = "DM"
	CountryAlpha2InputDo CountryAlpha2Input = "DO"
	CountryAlpha2InputDz CountryAlpha2Input = "DZ"
	CountryAlpha2InputEc CountryAlpha2Input = "EC"
	CountryAlpha2InputEe CountryAlpha2Input = "EE"
	CountryAlpha2InputEg CountryAlpha2Input = "EG"
	CountryAlpha2InputEh CountryAlpha2Input = "EH"
	CountryAlpha2InputEr CountryAlpha2Input = "ER"
	CountryAlpha2InputEs CountryAlpha2Input = "ES"
	CountryAlpha2InputEt CountryAlpha2Input = "ET"
	CountryAlpha2InputFi CountryAlpha2Input = "FI"
	CountryAlpha2InputFj CountryAlpha2Input = "FJ"
	CountryAlpha2InputFk CountryAlpha2Input = "FK"
	CountryAlpha2InputFm CountryAlpha2Input = "FM"
	CountryAlpha2InputFo CountryAlpha2Input = "FO"
	CountryAlpha2InputFr CountryAlpha2Input = "FR"
	CountryAlpha2InputGa CountryAlpha2Input = "GA"
	CountryAlpha2InputGb CountryAlpha2Input = "GB"
	CountryAlpha2InputGd CountryAlpha2Input = "GD"
	CountryAlpha2InputGe CountryAlpha2Input = "GE"
	CountryAlpha2InputGf CountryAlpha2Input = "GF"
	CountryAlpha2InputGg CountryAlpha2Input = "GG"
	CountryAlpha2InputGh CountryAlpha2Input = "GH"
	CountryAlpha2InputGi CountryAlpha2Input = "GI"
	CountryAlpha2InputGl CountryAlpha2Input = "GL"
	CountryAlpha2InputGm CountryAlpha2Input = "GM"
	CountryAlpha2InputGn CountryAlpha2Input = "GN"
	CountryAlpha2InputGp CountryAlpha2Input = "GP"
	CountryAlpha2InputGq CountryAlpha2Input = "GQ"
	CountryAlpha2InputGr CountryAlpha2Input = "GR"
	CountryAlpha2InputGs CountryAlpha2Input = "GS"
	CountryAlpha2InputGt CountryAlpha2Input = "GT"
	CountryAlpha2InputGu CountryAlpha2Input = "GU"
	CountryAlpha2InputGw CountryAlpha2Input = "GW"
	CountryAlpha2InputGy CountryAlpha2Input = "GY"
	CountryAlpha2InputHk CountryAlpha2Input = "HK"
	CountryAlpha2InputHm CountryAlpha2Input = "HM"
	CountryAlpha2InputHn CountryAlpha2Input = "HN"
	CountryAlpha2InputHr CountryAlpha2Input = "HR"
	CountryAlpha2InputHt CountryAlpha2Input = "HT"
	CountryAlpha2InputHu CountryAlpha2Input = "HU"
	CountryAlpha2InputId CountryAlpha2Input = "ID"
	CountryAlpha2InputIe CountryAlpha2Input = "IE"
	CountryAlpha2InputIl CountryAlpha2Input = "IL"
	CountryAlpha2InputIm CountryAlpha2Input = "IM"
	CountryAlpha2InputIn CountryAlpha2Input = "IN"
	CountryAlpha2InputIo CountryAlpha2Input = "IO"
	CountryAlpha2InputIq CountryAlpha2Input = "IQ"
	CountryAlpha2InputIs CountryAlpha2Input = "IS"
	CountryAlpha2InputIt CountryAlpha2Input = "IT"
	CountryAlpha2InputJe CountryAlpha2Input = "JE"
	CountryAlpha2InputJm CountryAlpha2Input = "JM"
	CountryAlpha2InputJo CountryAlpha2Input = "JO"
	CountryAlpha2InputJp CountryAlpha2Input = "JP"
	CountryAlpha2InputKe CountryAlpha2Input = "KE"
	CountryAlpha2InputKg CountryAlpha2Input = "KG"
	CountryAlpha2InputKh CountryAlpha2Input = "KH"
	CountryAlpha2InputKi CountryAlpha2Input = "KI"
	CountryAlpha2InputKm CountryAlpha2Input = "KM"
	CountryAlpha2InputKn CountryAlpha2Input = "KN"
	CountryAlpha2InputKr CountryAlpha2Input = "KR"
	CountryAlpha2InputKw CountryAlpha2Input = "KW"
	CountryAlpha2InputKy CountryAlpha2Input = "KY"
	CountryAlpha2InputKz CountryAlpha2Input = "KZ"
	CountryAlpha2InputLa CountryAlpha2Input = "LA"
	CountryAlpha2InputLb CountryAlpha2Input = "LB"
	CountryAlpha2InputLc CountryAlpha2Input = "LC"
	CountryAlpha2InputLi CountryAlpha2Input = "LI"
	CountryAlpha2InputLk CountryAlpha2Input = "LK"
	CountryAlpha2InputLr CountryAlpha2Input = "LR"
	CountryAlpha2InputLs CountryAlpha2Input = "LS"
	CountryAlpha2InputLt CountryAlpha2Input = "LT"
	CountryAlpha2InputLu CountryAlpha2Input = "LU"
	CountryAlpha2InputLv CountryAlpha2Input = "LV"
	CountryAlpha2InputLy CountryAlpha2Input = "LY"
	CountryAlpha2InputMa CountryAlpha2Input = "MA"
	CountryAlpha2InputMc CountryAlpha2Input = "MC"
	CountryAlpha2InputMd CountryAlpha2Input = "MD"
	CountryAlpha2InputMe CountryAlpha2Input = "ME"
	CountryAlpha2InputMf CountryAlpha2Input = "MF"
	CountryAlpha2InputMg CountryAlpha2Input = "MG"
	CountryAlpha2InputMh CountryAlpha2Input = "MH"
	CountryAlpha2InputMk CountryAlpha2Input = "MK"
	CountryAlpha2InputMl CountryAlpha2Input = "ML"
	CountryAlpha2InputMm CountryAlpha2Input = "MM"
	CountryAlpha2InputMn CountryAlpha2Input = "MN"
	CountryAlpha2InputMo CountryAlpha2Input = "MO"
	CountryAlpha2InputMp CountryAlpha2Input = "MP"
	CountryAlpha2InputMq CountryAlpha2Input = "MQ"
	CountryAlpha2InputMr CountryAlpha2Input = "MR"
	CountryAlpha2InputMs CountryAlpha2Input = "MS"
	CountryAlpha2InputMt CountryAlpha2Input = "MT"
	CountryAlpha2InputMu CountryAlpha2Input = "MU"
	CountryAlpha2InputMv CountryAlpha2Input = "MV"
	CountryAlpha2InputMw CountryAlpha2Input = "MW"
	CountryAlpha2InputMx CountryAlpha2Input = "MX"
	CountryAlpha2InputMy CountryAlpha2Input = "MY"
	CountryAlpha2InputMz CountryAlpha2Input = "MZ"
	CountryAlpha2InputNa CountryAlpha2Input = "NA"
	CountryAlpha2InputNc CountryAlpha2Input = "NC"
	CountryAlpha2InputNe CountryAlpha2Input = "NE"
	CountryAlpha2InputNf CountryAlpha2Input = "NF"
	CountryAlpha2InputNg CountryAlpha2Input = "NG"
	CountryAlpha2InputNi CountryAlpha2Input = "NI"
	CountryAlpha2InputNl CountryAlpha2Input = "NL"
	CountryAlpha2InputNo CountryAlpha2Input = "NO"
	CountryAlpha2InputNp CountryAlpha2Input = "NP"
	CountryAlpha2InputNr CountryAlpha2Input = "NR"
	CountryAlpha2InputNu CountryAlpha2Input = "NU"
	CountryAlpha2InputNz CountryAlpha2Input = "NZ"
	CountryAlpha2InputOm CountryAlpha2Input = "OM"
	CountryAlpha2InputPa CountryAlpha2Input = "PA"
	CountryAlpha2InputPe CountryAlpha2Input = "PE"
	CountryAlpha2InputPf CountryAlpha2Input = "PF"
	CountryAlpha2InputPg CountryAlpha2Input = "PG"
	CountryAlpha2InputPh CountryAlpha2Input = "PH"
	CountryAlpha2InputPk CountryAlpha2Input = "PK"
	CountryAlpha2InputPl CountryAlpha2Input = "PL"
	CountryAlpha2InputPm CountryAlpha2Input = "PM"
	CountryAlpha2InputPn CountryAlpha2Input = "PN"
	CountryAlpha2InputPr CountryAlpha2Input = "PR"
	CountryAlpha2InputPs CountryAlpha2Input = "PS"
	CountryAlpha2InputPt CountryAlpha2Input = "PT"
	CountryAlpha2InputPw CountryAlpha2Input = "PW"
	CountryAlpha2InputPy CountryAlpha2Input = "PY"
	CountryAlpha2InputQa CountryAlpha2Input = "QA"
	CountryAlpha2InputRe CountryAlpha2Input = "RE"
	CountryAlpha2InputRo CountryAlpha2Input = "RO"
	CountryAlpha2InputRs CountryAlpha2Input = "RS"
	CountryAlpha2InputRw CountryAlpha2Input = "RW"
	CountryAlpha2InputSa CountryAlpha2Input = "SA"
	CountryAlpha2InputSb CountryAlpha2Input = "SB"
	CountryAlpha2InputSc CountryAlpha2Input = "SC"
	CountryAlpha2InputSd CountryAlpha2Input = "SD"
	CountryAlpha2InputSe CountryAlpha2Input = "SE"
	CountryAlpha2InputSg CountryAlpha2Input = "SG"
	CountryAlpha2InputSh CountryAlpha2Input = "SH"
	CountryAlpha2InputSi CountryAlpha2Input = "SI"
	CountryAlpha2InputSj CountryAlpha2Input = "SJ"
	CountryAlpha2InputSk CountryAlpha2Input = "SK"
	CountryAlpha2InputSl CountryAlpha2Input = "SL"
	CountryAlpha2InputSm CountryAlpha2Input = "SM"
	CountryAlpha2InputSn CountryAlpha2Input = "SN"
	CountryAlpha2InputSo CountryAlpha2Input = "SO"
	CountryAlpha2InputSr CountryAlpha2Input = "SR"
	CountryAlpha2InputSs CountryAlpha2Input = "SS"
	CountryAlpha2InputSt CountryAlpha2Input = "ST"
	CountryAlpha2InputSv CountryAlpha2Input = "SV"
	CountryAlpha2InputSx CountryAlpha2Input = "SX"
	CountryAlpha2InputSz CountryAlpha2Input = "SZ"
	CountryAlpha2InputTc CountryAlpha2Input = "TC"
	CountryAlpha2InputTd CountryAlpha2Input = "TD"
	CountryAlpha2InputTf CountryAlpha2Input = "TF"
	CountryAlpha2InputTg CountryAlpha2Input = "TG"
	CountryAlpha2InputTh CountryAlpha2Input = "TH"
	CountryAlpha2InputTj CountryAlpha2Input = "TJ"
	CountryAlpha2InputTk CountryAlpha2Input = "TK"
	CountryAlpha2InputTl CountryAlpha2Input = "TL"
	CountryAlpha2InputTm CountryAlpha2Input = "TM"
	CountryAlpha2InputTn CountryAlpha2Input = "TN"
	CountryAlpha2InputTo CountryAlpha2Input = "TO"
	CountryAlpha2InputTr CountryAlpha2Input = "TR"
	CountryAlpha2InputTt CountryAlpha2Input = "TT"
	CountryAlpha2InputTv CountryAlpha2Input = "TV"
	CountryAlpha2InputTw CountryAlpha2Input = "TW"
	CountryAlpha2InputTz CountryAlpha2Input = "TZ"
	CountryAlpha2InputUa CountryAlpha2Input = "UA"
	CountryAlpha2InputUg CountryAlpha2Input = "UG"
	CountryAlpha2InputUm CountryAlpha2Input = "UM"
	CountryAlpha2InputUs CountryAlpha2Input = "US"
	CountryAlpha2InputUy CountryAlpha2Input = "UY"
	CountryAlpha2InputUz CountryAlpha2Input = "UZ"
	CountryAlpha2InputVa CountryAlpha2Input = "VA"
	CountryAlpha2InputVc CountryAlpha2Input = "VC"
	CountryAlpha2InputVe CountryAlpha2Input = "VE"
	CountryAlpha2InputVg CountryAlpha2Input = "VG"
	CountryAlpha2InputVi CountryAlpha2Input = "VI"
	CountryAlpha2InputVn CountryAlpha2Input = "VN"
	CountryAlpha2InputVu CountryAlpha2Input = "VU"
	CountryAlpha2InputWf CountryAlpha2Input = "WF"
	CountryAlpha2InputWs CountryAlpha2Input = "WS"
	CountryAlpha2InputYe CountryAlpha2Input = "YE"
	CountryAlpha2InputYt CountryAlpha2Input = "YT"
	CountryAlpha2InputZa CountryAlpha2Input = "ZA"
	CountryAlpha2InputZm CountryAlpha2Input = "ZM"
	CountryAlpha2InputZw CountryAlpha2Input = "ZW"
)

func (CountryAlpha2Input) ToPointer ¶ added in v0.9.0

func (e CountryAlpha2Input) ToPointer() *CountryAlpha2Input

func (*CountryAlpha2Input) UnmarshalJSON ¶ added in v0.9.0

func (e *CountryAlpha2Input) UnmarshalJSON(data []byte) error

type CountryCountryAlpha2Input ¶ added in v0.15.1

type CountryCountryAlpha2Input string
const (
	CountryCountryAlpha2InputAd CountryCountryAlpha2Input = "AD"
	CountryCountryAlpha2InputAe CountryCountryAlpha2Input = "AE"
	CountryCountryAlpha2InputAf CountryCountryAlpha2Input = "AF"
	CountryCountryAlpha2InputAg CountryCountryAlpha2Input = "AG"
	CountryCountryAlpha2InputAi CountryCountryAlpha2Input = "AI"
	CountryCountryAlpha2InputAl CountryCountryAlpha2Input = "AL"
	CountryCountryAlpha2InputAm CountryCountryAlpha2Input = "AM"
	CountryCountryAlpha2InputAo CountryCountryAlpha2Input = "AO"
	CountryCountryAlpha2InputAq CountryCountryAlpha2Input = "AQ"
	CountryCountryAlpha2InputAr CountryCountryAlpha2Input = "AR"
	CountryCountryAlpha2InputAs CountryCountryAlpha2Input = "AS"
	CountryCountryAlpha2InputAt CountryCountryAlpha2Input = "AT"
	CountryCountryAlpha2InputAu CountryCountryAlpha2Input = "AU"
	CountryCountryAlpha2InputAw CountryCountryAlpha2Input = "AW"
	CountryCountryAlpha2InputAx CountryCountryAlpha2Input = "AX"
	CountryCountryAlpha2InputAz CountryCountryAlpha2Input = "AZ"
	CountryCountryAlpha2InputBa CountryCountryAlpha2Input = "BA"
	CountryCountryAlpha2InputBb CountryCountryAlpha2Input = "BB"
	CountryCountryAlpha2InputBd CountryCountryAlpha2Input = "BD"
	CountryCountryAlpha2InputBe CountryCountryAlpha2Input = "BE"
	CountryCountryAlpha2InputBf CountryCountryAlpha2Input = "BF"
	CountryCountryAlpha2InputBg CountryCountryAlpha2Input = "BG"
	CountryCountryAlpha2InputBh CountryCountryAlpha2Input = "BH"
	CountryCountryAlpha2InputBi CountryCountryAlpha2Input = "BI"
	CountryCountryAlpha2InputBj CountryCountryAlpha2Input = "BJ"
	CountryCountryAlpha2InputBl CountryCountryAlpha2Input = "BL"
	CountryCountryAlpha2InputBm CountryCountryAlpha2Input = "BM"
	CountryCountryAlpha2InputBn CountryCountryAlpha2Input = "BN"
	CountryCountryAlpha2InputBo CountryCountryAlpha2Input = "BO"
	CountryCountryAlpha2InputBq CountryCountryAlpha2Input = "BQ"
	CountryCountryAlpha2InputBr CountryCountryAlpha2Input = "BR"
	CountryCountryAlpha2InputBs CountryCountryAlpha2Input = "BS"
	CountryCountryAlpha2InputBt CountryCountryAlpha2Input = "BT"
	CountryCountryAlpha2InputBv CountryCountryAlpha2Input = "BV"
	CountryCountryAlpha2InputBw CountryCountryAlpha2Input = "BW"
	CountryCountryAlpha2InputBy CountryCountryAlpha2Input = "BY"
	CountryCountryAlpha2InputBz CountryCountryAlpha2Input = "BZ"
	CountryCountryAlpha2InputCa CountryCountryAlpha2Input = "CA"
	CountryCountryAlpha2InputCc CountryCountryAlpha2Input = "CC"
	CountryCountryAlpha2InputCd CountryCountryAlpha2Input = "CD"
	CountryCountryAlpha2InputCf CountryCountryAlpha2Input = "CF"
	CountryCountryAlpha2InputCg CountryCountryAlpha2Input = "CG"
	CountryCountryAlpha2InputCh CountryCountryAlpha2Input = "CH"
	CountryCountryAlpha2InputCi CountryCountryAlpha2Input = "CI"
	CountryCountryAlpha2InputCk CountryCountryAlpha2Input = "CK"
	CountryCountryAlpha2InputCl CountryCountryAlpha2Input = "CL"
	CountryCountryAlpha2InputCm CountryCountryAlpha2Input = "CM"
	CountryCountryAlpha2InputCn CountryCountryAlpha2Input = "CN"
	CountryCountryAlpha2InputCo CountryCountryAlpha2Input = "CO"
	CountryCountryAlpha2InputCr CountryCountryAlpha2Input = "CR"
	CountryCountryAlpha2InputCv CountryCountryAlpha2Input = "CV"
	CountryCountryAlpha2InputCw CountryCountryAlpha2Input = "CW"
	CountryCountryAlpha2InputCx CountryCountryAlpha2Input = "CX"
	CountryCountryAlpha2InputCy CountryCountryAlpha2Input = "CY"
	CountryCountryAlpha2InputCz CountryCountryAlpha2Input = "CZ"
	CountryCountryAlpha2InputDe CountryCountryAlpha2Input = "DE"
	CountryCountryAlpha2InputDj CountryCountryAlpha2Input = "DJ"
	CountryCountryAlpha2InputDk CountryCountryAlpha2Input = "DK"
	CountryCountryAlpha2InputDm CountryCountryAlpha2Input = "DM"
	CountryCountryAlpha2InputDo CountryCountryAlpha2Input = "DO"
	CountryCountryAlpha2InputDz CountryCountryAlpha2Input = "DZ"
	CountryCountryAlpha2InputEc CountryCountryAlpha2Input = "EC"
	CountryCountryAlpha2InputEe CountryCountryAlpha2Input = "EE"
	CountryCountryAlpha2InputEg CountryCountryAlpha2Input = "EG"
	CountryCountryAlpha2InputEh CountryCountryAlpha2Input = "EH"
	CountryCountryAlpha2InputEr CountryCountryAlpha2Input = "ER"
	CountryCountryAlpha2InputEs CountryCountryAlpha2Input = "ES"
	CountryCountryAlpha2InputEt CountryCountryAlpha2Input = "ET"
	CountryCountryAlpha2InputFi CountryCountryAlpha2Input = "FI"
	CountryCountryAlpha2InputFj CountryCountryAlpha2Input = "FJ"
	CountryCountryAlpha2InputFk CountryCountryAlpha2Input = "FK"
	CountryCountryAlpha2InputFm CountryCountryAlpha2Input = "FM"
	CountryCountryAlpha2InputFo CountryCountryAlpha2Input = "FO"
	CountryCountryAlpha2InputFr CountryCountryAlpha2Input = "FR"
	CountryCountryAlpha2InputGa CountryCountryAlpha2Input = "GA"
	CountryCountryAlpha2InputGb CountryCountryAlpha2Input = "GB"
	CountryCountryAlpha2InputGd CountryCountryAlpha2Input = "GD"
	CountryCountryAlpha2InputGe CountryCountryAlpha2Input = "GE"
	CountryCountryAlpha2InputGf CountryCountryAlpha2Input = "GF"
	CountryCountryAlpha2InputGg CountryCountryAlpha2Input = "GG"
	CountryCountryAlpha2InputGh CountryCountryAlpha2Input = "GH"
	CountryCountryAlpha2InputGi CountryCountryAlpha2Input = "GI"
	CountryCountryAlpha2InputGl CountryCountryAlpha2Input = "GL"
	CountryCountryAlpha2InputGm CountryCountryAlpha2Input = "GM"
	CountryCountryAlpha2InputGn CountryCountryAlpha2Input = "GN"
	CountryCountryAlpha2InputGp CountryCountryAlpha2Input = "GP"
	CountryCountryAlpha2InputGq CountryCountryAlpha2Input = "GQ"
	CountryCountryAlpha2InputGr CountryCountryAlpha2Input = "GR"
	CountryCountryAlpha2InputGs CountryCountryAlpha2Input = "GS"
	CountryCountryAlpha2InputGt CountryCountryAlpha2Input = "GT"
	CountryCountryAlpha2InputGu CountryCountryAlpha2Input = "GU"
	CountryCountryAlpha2InputGw CountryCountryAlpha2Input = "GW"
	CountryCountryAlpha2InputGy CountryCountryAlpha2Input = "GY"
	CountryCountryAlpha2InputHk CountryCountryAlpha2Input = "HK"
	CountryCountryAlpha2InputHm CountryCountryAlpha2Input = "HM"
	CountryCountryAlpha2InputHn CountryCountryAlpha2Input = "HN"
	CountryCountryAlpha2InputHr CountryCountryAlpha2Input = "HR"
	CountryCountryAlpha2InputHt CountryCountryAlpha2Input = "HT"
	CountryCountryAlpha2InputHu CountryCountryAlpha2Input = "HU"
	CountryCountryAlpha2InputId CountryCountryAlpha2Input = "ID"
	CountryCountryAlpha2InputIe CountryCountryAlpha2Input = "IE"
	CountryCountryAlpha2InputIl CountryCountryAlpha2Input = "IL"
	CountryCountryAlpha2InputIm CountryCountryAlpha2Input = "IM"
	CountryCountryAlpha2InputIn CountryCountryAlpha2Input = "IN"
	CountryCountryAlpha2InputIo CountryCountryAlpha2Input = "IO"
	CountryCountryAlpha2InputIq CountryCountryAlpha2Input = "IQ"
	CountryCountryAlpha2InputIs CountryCountryAlpha2Input = "IS"
	CountryCountryAlpha2InputIt CountryCountryAlpha2Input = "IT"
	CountryCountryAlpha2InputJe CountryCountryAlpha2Input = "JE"
	CountryCountryAlpha2InputJm CountryCountryAlpha2Input = "JM"
	CountryCountryAlpha2InputJo CountryCountryAlpha2Input = "JO"
	CountryCountryAlpha2InputJp CountryCountryAlpha2Input = "JP"
	CountryCountryAlpha2InputKe CountryCountryAlpha2Input = "KE"
	CountryCountryAlpha2InputKg CountryCountryAlpha2Input = "KG"
	CountryCountryAlpha2InputKh CountryCountryAlpha2Input = "KH"
	CountryCountryAlpha2InputKi CountryCountryAlpha2Input = "KI"
	CountryCountryAlpha2InputKm CountryCountryAlpha2Input = "KM"
	CountryCountryAlpha2InputKn CountryCountryAlpha2Input = "KN"
	CountryCountryAlpha2InputKr CountryCountryAlpha2Input = "KR"
	CountryCountryAlpha2InputKw CountryCountryAlpha2Input = "KW"
	CountryCountryAlpha2InputKy CountryCountryAlpha2Input = "KY"
	CountryCountryAlpha2InputKz CountryCountryAlpha2Input = "KZ"
	CountryCountryAlpha2InputLa CountryCountryAlpha2Input = "LA"
	CountryCountryAlpha2InputLb CountryCountryAlpha2Input = "LB"
	CountryCountryAlpha2InputLc CountryCountryAlpha2Input = "LC"
	CountryCountryAlpha2InputLi CountryCountryAlpha2Input = "LI"
	CountryCountryAlpha2InputLk CountryCountryAlpha2Input = "LK"
	CountryCountryAlpha2InputLr CountryCountryAlpha2Input = "LR"
	CountryCountryAlpha2InputLs CountryCountryAlpha2Input = "LS"
	CountryCountryAlpha2InputLt CountryCountryAlpha2Input = "LT"
	CountryCountryAlpha2InputLu CountryCountryAlpha2Input = "LU"
	CountryCountryAlpha2InputLv CountryCountryAlpha2Input = "LV"
	CountryCountryAlpha2InputLy CountryCountryAlpha2Input = "LY"
	CountryCountryAlpha2InputMa CountryCountryAlpha2Input = "MA"
	CountryCountryAlpha2InputMc CountryCountryAlpha2Input = "MC"
	CountryCountryAlpha2InputMd CountryCountryAlpha2Input = "MD"
	CountryCountryAlpha2InputMe CountryCountryAlpha2Input = "ME"
	CountryCountryAlpha2InputMf CountryCountryAlpha2Input = "MF"
	CountryCountryAlpha2InputMg CountryCountryAlpha2Input = "MG"
	CountryCountryAlpha2InputMh CountryCountryAlpha2Input = "MH"
	CountryCountryAlpha2InputMk CountryCountryAlpha2Input = "MK"
	CountryCountryAlpha2InputMl CountryCountryAlpha2Input = "ML"
	CountryCountryAlpha2InputMm CountryCountryAlpha2Input = "MM"
	CountryCountryAlpha2InputMn CountryCountryAlpha2Input = "MN"
	CountryCountryAlpha2InputMo CountryCountryAlpha2Input = "MO"
	CountryCountryAlpha2InputMp CountryCountryAlpha2Input = "MP"
	CountryCountryAlpha2InputMq CountryCountryAlpha2Input = "MQ"
	CountryCountryAlpha2InputMr CountryCountryAlpha2Input = "MR"
	CountryCountryAlpha2InputMs CountryCountryAlpha2Input = "MS"
	CountryCountryAlpha2InputMt CountryCountryAlpha2Input = "MT"
	CountryCountryAlpha2InputMu CountryCountryAlpha2Input = "MU"
	CountryCountryAlpha2InputMv CountryCountryAlpha2Input = "MV"
	CountryCountryAlpha2InputMw CountryCountryAlpha2Input = "MW"
	CountryCountryAlpha2InputMx CountryCountryAlpha2Input = "MX"
	CountryCountryAlpha2InputMy CountryCountryAlpha2Input = "MY"
	CountryCountryAlpha2InputMz CountryCountryAlpha2Input = "MZ"
	CountryCountryAlpha2InputNa CountryCountryAlpha2Input = "NA"
	CountryCountryAlpha2InputNc CountryCountryAlpha2Input = "NC"
	CountryCountryAlpha2InputNe CountryCountryAlpha2Input = "NE"
	CountryCountryAlpha2InputNf CountryCountryAlpha2Input = "NF"
	CountryCountryAlpha2InputNg CountryCountryAlpha2Input = "NG"
	CountryCountryAlpha2InputNi CountryCountryAlpha2Input = "NI"
	CountryCountryAlpha2InputNl CountryCountryAlpha2Input = "NL"
	CountryCountryAlpha2InputNo CountryCountryAlpha2Input = "NO"
	CountryCountryAlpha2InputNp CountryCountryAlpha2Input = "NP"
	CountryCountryAlpha2InputNr CountryCountryAlpha2Input = "NR"
	CountryCountryAlpha2InputNu CountryCountryAlpha2Input = "NU"
	CountryCountryAlpha2InputNz CountryCountryAlpha2Input = "NZ"
	CountryCountryAlpha2InputOm CountryCountryAlpha2Input = "OM"
	CountryCountryAlpha2InputPa CountryCountryAlpha2Input = "PA"
	CountryCountryAlpha2InputPe CountryCountryAlpha2Input = "PE"
	CountryCountryAlpha2InputPf CountryCountryAlpha2Input = "PF"
	CountryCountryAlpha2InputPg CountryCountryAlpha2Input = "PG"
	CountryCountryAlpha2InputPh CountryCountryAlpha2Input = "PH"
	CountryCountryAlpha2InputPk CountryCountryAlpha2Input = "PK"
	CountryCountryAlpha2InputPl CountryCountryAlpha2Input = "PL"
	CountryCountryAlpha2InputPm CountryCountryAlpha2Input = "PM"
	CountryCountryAlpha2InputPn CountryCountryAlpha2Input = "PN"
	CountryCountryAlpha2InputPr CountryCountryAlpha2Input = "PR"
	CountryCountryAlpha2InputPs CountryCountryAlpha2Input = "PS"
	CountryCountryAlpha2InputPt CountryCountryAlpha2Input = "PT"
	CountryCountryAlpha2InputPw CountryCountryAlpha2Input = "PW"
	CountryCountryAlpha2InputPy CountryCountryAlpha2Input = "PY"
	CountryCountryAlpha2InputQa CountryCountryAlpha2Input = "QA"
	CountryCountryAlpha2InputRe CountryCountryAlpha2Input = "RE"
	CountryCountryAlpha2InputRo CountryCountryAlpha2Input = "RO"
	CountryCountryAlpha2InputRs CountryCountryAlpha2Input = "RS"
	CountryCountryAlpha2InputRw CountryCountryAlpha2Input = "RW"
	CountryCountryAlpha2InputSa CountryCountryAlpha2Input = "SA"
	CountryCountryAlpha2InputSb CountryCountryAlpha2Input = "SB"
	CountryCountryAlpha2InputSc CountryCountryAlpha2Input = "SC"
	CountryCountryAlpha2InputSd CountryCountryAlpha2Input = "SD"
	CountryCountryAlpha2InputSe CountryCountryAlpha2Input = "SE"
	CountryCountryAlpha2InputSg CountryCountryAlpha2Input = "SG"
	CountryCountryAlpha2InputSh CountryCountryAlpha2Input = "SH"
	CountryCountryAlpha2InputSi CountryCountryAlpha2Input = "SI"
	CountryCountryAlpha2InputSj CountryCountryAlpha2Input = "SJ"
	CountryCountryAlpha2InputSk CountryCountryAlpha2Input = "SK"
	CountryCountryAlpha2InputSl CountryCountryAlpha2Input = "SL"
	CountryCountryAlpha2InputSm CountryCountryAlpha2Input = "SM"
	CountryCountryAlpha2InputSn CountryCountryAlpha2Input = "SN"
	CountryCountryAlpha2InputSo CountryCountryAlpha2Input = "SO"
	CountryCountryAlpha2InputSr CountryCountryAlpha2Input = "SR"
	CountryCountryAlpha2InputSs CountryCountryAlpha2Input = "SS"
	CountryCountryAlpha2InputSt CountryCountryAlpha2Input = "ST"
	CountryCountryAlpha2InputSv CountryCountryAlpha2Input = "SV"
	CountryCountryAlpha2InputSx CountryCountryAlpha2Input = "SX"
	CountryCountryAlpha2InputSz CountryCountryAlpha2Input = "SZ"
	CountryCountryAlpha2InputTc CountryCountryAlpha2Input = "TC"
	CountryCountryAlpha2InputTd CountryCountryAlpha2Input = "TD"
	CountryCountryAlpha2InputTf CountryCountryAlpha2Input = "TF"
	CountryCountryAlpha2InputTg CountryCountryAlpha2Input = "TG"
	CountryCountryAlpha2InputTh CountryCountryAlpha2Input = "TH"
	CountryCountryAlpha2InputTj CountryCountryAlpha2Input = "TJ"
	CountryCountryAlpha2InputTk CountryCountryAlpha2Input = "TK"
	CountryCountryAlpha2InputTl CountryCountryAlpha2Input = "TL"
	CountryCountryAlpha2InputTm CountryCountryAlpha2Input = "TM"
	CountryCountryAlpha2InputTn CountryCountryAlpha2Input = "TN"
	CountryCountryAlpha2InputTo CountryCountryAlpha2Input = "TO"
	CountryCountryAlpha2InputTr CountryCountryAlpha2Input = "TR"
	CountryCountryAlpha2InputTt CountryCountryAlpha2Input = "TT"
	CountryCountryAlpha2InputTv CountryCountryAlpha2Input = "TV"
	CountryCountryAlpha2InputTw CountryCountryAlpha2Input = "TW"
	CountryCountryAlpha2InputTz CountryCountryAlpha2Input = "TZ"
	CountryCountryAlpha2InputUa CountryCountryAlpha2Input = "UA"
	CountryCountryAlpha2InputUg CountryCountryAlpha2Input = "UG"
	CountryCountryAlpha2InputUm CountryCountryAlpha2Input = "UM"
	CountryCountryAlpha2InputUs CountryCountryAlpha2Input = "US"
	CountryCountryAlpha2InputUy CountryCountryAlpha2Input = "UY"
	CountryCountryAlpha2InputUz CountryCountryAlpha2Input = "UZ"
	CountryCountryAlpha2InputVa CountryCountryAlpha2Input = "VA"
	CountryCountryAlpha2InputVc CountryCountryAlpha2Input = "VC"
	CountryCountryAlpha2InputVe CountryCountryAlpha2Input = "VE"
	CountryCountryAlpha2InputVg CountryCountryAlpha2Input = "VG"
	CountryCountryAlpha2InputVi CountryCountryAlpha2Input = "VI"
	CountryCountryAlpha2InputVn CountryCountryAlpha2Input = "VN"
	CountryCountryAlpha2InputVu CountryCountryAlpha2Input = "VU"
	CountryCountryAlpha2InputWf CountryCountryAlpha2Input = "WF"
	CountryCountryAlpha2InputWs CountryCountryAlpha2Input = "WS"
	CountryCountryAlpha2InputYe CountryCountryAlpha2Input = "YE"
	CountryCountryAlpha2InputYt CountryCountryAlpha2Input = "YT"
	CountryCountryAlpha2InputZa CountryCountryAlpha2Input = "ZA"
	CountryCountryAlpha2InputZm CountryCountryAlpha2Input = "ZM"
	CountryCountryAlpha2InputZw CountryCountryAlpha2Input = "ZW"
)

func (CountryCountryAlpha2Input) ToPointer ¶ added in v0.15.1

func (*CountryCountryAlpha2Input) UnmarshalJSON ¶ added in v0.15.1

func (e *CountryCountryAlpha2Input) UnmarshalJSON(data []byte) error

type CumulativeCosts ¶ added in v0.12.0

type CumulativeCosts struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CumulativeCostsType
}

func CreateCumulativeCostsInteger ¶ added in v0.12.0

func CreateCumulativeCostsInteger(integer int64) CumulativeCosts

func CreateCumulativeCostsNumber ¶ added in v0.12.0

func CreateCumulativeCostsNumber(number float64) CumulativeCosts

func (CumulativeCosts) MarshalJSON ¶ added in v0.12.0

func (u CumulativeCosts) MarshalJSON() ([]byte, error)

func (*CumulativeCosts) UnmarshalJSON ¶ added in v0.12.0

func (u *CumulativeCosts) UnmarshalJSON(data []byte) error

type CumulativeCostsType ¶ added in v0.12.0

type CumulativeCostsType string
const (
	CumulativeCostsTypeInteger CumulativeCostsType = "integer"
	CumulativeCostsTypeNumber  CumulativeCostsType = "number"
)

type CumulativeRevenue ¶ added in v0.4.17

type CumulativeRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type CumulativeRevenueType
}

func CreateCumulativeRevenueInteger ¶ added in v0.4.17

func CreateCumulativeRevenueInteger(integer int64) CumulativeRevenue

func CreateCumulativeRevenueNumber ¶ added in v0.4.17

func CreateCumulativeRevenueNumber(number float64) CumulativeRevenue

func (CumulativeRevenue) MarshalJSON ¶ added in v0.4.17

func (u CumulativeRevenue) MarshalJSON() ([]byte, error)

func (*CumulativeRevenue) UnmarshalJSON ¶ added in v0.4.17

func (u *CumulativeRevenue) UnmarshalJSON(data []byte) error

type CumulativeRevenueType ¶ added in v0.4.17

type CumulativeRevenueType string
const (
	CumulativeRevenueTypeInteger CumulativeRevenueType = "integer"
	CumulativeRevenueTypeNumber  CumulativeRevenueType = "number"
)

type CursorPagination ¶ added in v0.13.0

type CursorPagination struct {
	HasNextPage bool `json:"has_next_page"`
}

func (*CursorPagination) GetHasNextPage ¶ added in v0.13.0

func (c *CursorPagination) GetHasNextPage() bool

func (CursorPagination) MarshalJSON ¶ added in v0.13.0

func (c CursorPagination) MarshalJSON() ([]byte, error)

func (*CursorPagination) UnmarshalJSON ¶ added in v0.13.0

func (c *CursorPagination) UnmarshalJSON(data []byte) error

type CustomField ¶

type CustomField struct {
	CustomFieldText     *CustomFieldText     `queryParam:"inline" union:"member"`
	CustomFieldNumber   *CustomFieldNumber   `queryParam:"inline" union:"member"`
	CustomFieldDate     *CustomFieldDate     `queryParam:"inline" union:"member"`
	CustomFieldCheckbox *CustomFieldCheckbox `queryParam:"inline" union:"member"`
	CustomFieldSelect   *CustomFieldSelect   `queryParam:"inline" union:"member"`

	Type CustomFieldUnionType
}

func CreateCustomFieldCheckbox ¶

func CreateCustomFieldCheckbox(checkbox CustomFieldCheckbox) CustomField

func CreateCustomFieldDate ¶

func CreateCustomFieldDate(date CustomFieldDate) CustomField

func CreateCustomFieldNumber ¶

func CreateCustomFieldNumber(number CustomFieldNumber) CustomField

func CreateCustomFieldSelect ¶

func CreateCustomFieldSelect(selectT CustomFieldSelect) CustomField

func CreateCustomFieldText ¶

func CreateCustomFieldText(text CustomFieldText) CustomField

func (CustomField) MarshalJSON ¶

func (u CustomField) MarshalJSON() ([]byte, error)

func (*CustomField) UnmarshalJSON ¶

func (u *CustomField) UnmarshalJSON(data []byte) error

type CustomFieldCheckbox ¶

type CustomFieldCheckbox struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`

	// Identifier of the custom field. It'll be used as key when storing the value.
	Slug string `json:"slug"`
	// Name of the custom field.
	Name string `json:"name"`
	// The ID of the organization owning the custom field.
	OrganizationID string                        `json:"organization_id"`
	Properties     CustomFieldCheckboxProperties `json:"properties"`
	// contains filtered or unexported fields
}

CustomFieldCheckbox - Schema for a custom field of type checkbox.

func (*CustomFieldCheckbox) GetCreatedAt ¶

func (c *CustomFieldCheckbox) GetCreatedAt() time.Time

func (*CustomFieldCheckbox) GetID ¶

func (c *CustomFieldCheckbox) GetID() string

func (*CustomFieldCheckbox) GetMetadata ¶

func (c *CustomFieldCheckbox) GetMetadata() map[string]MetadataOutputType

func (*CustomFieldCheckbox) GetModifiedAt ¶

func (c *CustomFieldCheckbox) GetModifiedAt() *time.Time

func (*CustomFieldCheckbox) GetName ¶

func (c *CustomFieldCheckbox) GetName() string

func (*CustomFieldCheckbox) GetOrganizationID ¶

func (c *CustomFieldCheckbox) GetOrganizationID() string

func (*CustomFieldCheckbox) GetProperties ¶

func (*CustomFieldCheckbox) GetSlug ¶

func (c *CustomFieldCheckbox) GetSlug() string

func (*CustomFieldCheckbox) GetType ¶

func (c *CustomFieldCheckbox) GetType() string

func (CustomFieldCheckbox) MarshalJSON ¶

func (c CustomFieldCheckbox) MarshalJSON() ([]byte, error)

func (*CustomFieldCheckbox) UnmarshalJSON ¶

func (c *CustomFieldCheckbox) UnmarshalJSON(data []byte) error

type CustomFieldCheckboxProperties ¶

type CustomFieldCheckboxProperties struct {
	FormLabel       *string `json:"form_label,omitempty"`
	FormHelpText    *string `json:"form_help_text,omitempty"`
	FormPlaceholder *string `json:"form_placeholder,omitempty"`
}

func (*CustomFieldCheckboxProperties) GetFormHelpText ¶

func (c *CustomFieldCheckboxProperties) GetFormHelpText() *string

func (*CustomFieldCheckboxProperties) GetFormLabel ¶

func (c *CustomFieldCheckboxProperties) GetFormLabel() *string

func (*CustomFieldCheckboxProperties) GetFormPlaceholder ¶

func (c *CustomFieldCheckboxProperties) GetFormPlaceholder() *string

func (CustomFieldCheckboxProperties) MarshalJSON ¶ added in v0.8.4

func (c CustomFieldCheckboxProperties) MarshalJSON() ([]byte, error)

func (*CustomFieldCheckboxProperties) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomFieldCheckboxProperties) UnmarshalJSON(data []byte) error

type CustomFieldCreate ¶

type CustomFieldCreate struct {
	CustomFieldCreateText     *CustomFieldCreateText     `queryParam:"inline" union:"member"`
	CustomFieldCreateNumber   *CustomFieldCreateNumber   `queryParam:"inline" union:"member"`
	CustomFieldCreateDate     *CustomFieldCreateDate     `queryParam:"inline" union:"member"`
	CustomFieldCreateCheckbox *CustomFieldCreateCheckbox `queryParam:"inline" union:"member"`
	CustomFieldCreateSelect   *CustomFieldCreateSelect   `queryParam:"inline" union:"member"`

	Type CustomFieldCreateType
}

func CreateCustomFieldCreateCheckbox ¶

func CreateCustomFieldCreateCheckbox(checkbox CustomFieldCreateCheckbox) CustomFieldCreate

func CreateCustomFieldCreateDate ¶

func CreateCustomFieldCreateDate(date CustomFieldCreateDate) CustomFieldCreate

func CreateCustomFieldCreateNumber ¶

func CreateCustomFieldCreateNumber(number CustomFieldCreateNumber) CustomFieldCreate

func CreateCustomFieldCreateSelect ¶

func CreateCustomFieldCreateSelect(selectT CustomFieldCreateSelect) CustomFieldCreate

func CreateCustomFieldCreateText ¶

func CreateCustomFieldCreateText(text CustomFieldCreateText) CustomFieldCreate

func (CustomFieldCreate) MarshalJSON ¶

func (u CustomFieldCreate) MarshalJSON() ([]byte, error)

func (*CustomFieldCreate) UnmarshalJSON ¶

func (u *CustomFieldCreate) UnmarshalJSON(data []byte) error

type CustomFieldCreateCheckbox ¶

type CustomFieldCreateCheckbox struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomFieldCreateCheckboxMetadata `json:"metadata,omitempty"`

	// Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.
	Slug string `json:"slug"`
	// Name of the custom field.
	Name string `json:"name"`
	// The ID of the organization owning the custom field. **Required unless you use an organization token.**
	OrganizationID *string                       `json:"organization_id,omitempty"`
	Properties     CustomFieldCheckboxProperties `json:"properties"`
	// contains filtered or unexported fields
}

CustomFieldCreateCheckbox - Schema to create a custom field of type checkbox.

func (*CustomFieldCreateCheckbox) GetMetadata ¶

func (*CustomFieldCreateCheckbox) GetName ¶

func (c *CustomFieldCreateCheckbox) GetName() string

func (*CustomFieldCreateCheckbox) GetOrganizationID ¶

func (c *CustomFieldCreateCheckbox) GetOrganizationID() *string

func (*CustomFieldCreateCheckbox) GetProperties ¶

func (*CustomFieldCreateCheckbox) GetSlug ¶

func (c *CustomFieldCreateCheckbox) GetSlug() string

func (*CustomFieldCreateCheckbox) GetType ¶

func (c *CustomFieldCreateCheckbox) GetType() string

func (CustomFieldCreateCheckbox) MarshalJSON ¶

func (c CustomFieldCreateCheckbox) MarshalJSON() ([]byte, error)

func (*CustomFieldCreateCheckbox) UnmarshalJSON ¶

func (c *CustomFieldCreateCheckbox) UnmarshalJSON(data []byte) error

type CustomFieldCreateCheckboxMetadata ¶

type CustomFieldCreateCheckboxMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomFieldCreateCheckboxMetadataType
}

func CreateCustomFieldCreateCheckboxMetadataBoolean ¶

func CreateCustomFieldCreateCheckboxMetadataBoolean(boolean bool) CustomFieldCreateCheckboxMetadata

func CreateCustomFieldCreateCheckboxMetadataInteger ¶

func CreateCustomFieldCreateCheckboxMetadataInteger(integer int64) CustomFieldCreateCheckboxMetadata

func CreateCustomFieldCreateCheckboxMetadataNumber ¶ added in v0.4.12

func CreateCustomFieldCreateCheckboxMetadataNumber(number float64) CustomFieldCreateCheckboxMetadata

func CreateCustomFieldCreateCheckboxMetadataStr ¶

func CreateCustomFieldCreateCheckboxMetadataStr(str string) CustomFieldCreateCheckboxMetadata

func (CustomFieldCreateCheckboxMetadata) MarshalJSON ¶

func (u CustomFieldCreateCheckboxMetadata) MarshalJSON() ([]byte, error)

func (*CustomFieldCreateCheckboxMetadata) UnmarshalJSON ¶

func (u *CustomFieldCreateCheckboxMetadata) UnmarshalJSON(data []byte) error

type CustomFieldCreateCheckboxMetadataType ¶

type CustomFieldCreateCheckboxMetadataType string
const (
	CustomFieldCreateCheckboxMetadataTypeStr     CustomFieldCreateCheckboxMetadataType = "str"
	CustomFieldCreateCheckboxMetadataTypeInteger CustomFieldCreateCheckboxMetadataType = "integer"
	CustomFieldCreateCheckboxMetadataTypeNumber  CustomFieldCreateCheckboxMetadataType = "number"
	CustomFieldCreateCheckboxMetadataTypeBoolean CustomFieldCreateCheckboxMetadataType = "boolean"
)

type CustomFieldCreateDate ¶

type CustomFieldCreateDate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomFieldCreateDateMetadata `json:"metadata,omitempty"`

	// Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.
	Slug string `json:"slug"`
	// Name of the custom field.
	Name string `json:"name"`
	// The ID of the organization owning the custom field. **Required unless you use an organization token.**
	OrganizationID *string                   `json:"organization_id,omitempty"`
	Properties     CustomFieldDateProperties `json:"properties"`
	// contains filtered or unexported fields
}

CustomFieldCreateDate - Schema to create a custom field of type date.

func (*CustomFieldCreateDate) GetMetadata ¶

func (*CustomFieldCreateDate) GetName ¶

func (c *CustomFieldCreateDate) GetName() string

func (*CustomFieldCreateDate) GetOrganizationID ¶

func (c *CustomFieldCreateDate) GetOrganizationID() *string

func (*CustomFieldCreateDate) GetProperties ¶

func (*CustomFieldCreateDate) GetSlug ¶

func (c *CustomFieldCreateDate) GetSlug() string

func (*CustomFieldCreateDate) GetType ¶

func (c *CustomFieldCreateDate) GetType() string

func (CustomFieldCreateDate) MarshalJSON ¶

func (c CustomFieldCreateDate) MarshalJSON() ([]byte, error)

func (*CustomFieldCreateDate) UnmarshalJSON ¶

func (c *CustomFieldCreateDate) UnmarshalJSON(data []byte) error

type CustomFieldCreateDateMetadata ¶

type CustomFieldCreateDateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomFieldCreateDateMetadataType
}

func CreateCustomFieldCreateDateMetadataBoolean ¶

func CreateCustomFieldCreateDateMetadataBoolean(boolean bool) CustomFieldCreateDateMetadata

func CreateCustomFieldCreateDateMetadataInteger ¶

func CreateCustomFieldCreateDateMetadataInteger(integer int64) CustomFieldCreateDateMetadata

func CreateCustomFieldCreateDateMetadataNumber ¶ added in v0.4.12

func CreateCustomFieldCreateDateMetadataNumber(number float64) CustomFieldCreateDateMetadata

func CreateCustomFieldCreateDateMetadataStr ¶

func CreateCustomFieldCreateDateMetadataStr(str string) CustomFieldCreateDateMetadata

func (CustomFieldCreateDateMetadata) MarshalJSON ¶

func (u CustomFieldCreateDateMetadata) MarshalJSON() ([]byte, error)

func (*CustomFieldCreateDateMetadata) UnmarshalJSON ¶

func (u *CustomFieldCreateDateMetadata) UnmarshalJSON(data []byte) error

type CustomFieldCreateDateMetadataType ¶

type CustomFieldCreateDateMetadataType string
const (
	CustomFieldCreateDateMetadataTypeStr     CustomFieldCreateDateMetadataType = "str"
	CustomFieldCreateDateMetadataTypeInteger CustomFieldCreateDateMetadataType = "integer"
	CustomFieldCreateDateMetadataTypeNumber  CustomFieldCreateDateMetadataType = "number"
	CustomFieldCreateDateMetadataTypeBoolean CustomFieldCreateDateMetadataType = "boolean"
)

type CustomFieldCreateNumber ¶

type CustomFieldCreateNumber struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomFieldCreateNumberMetadata `json:"metadata,omitempty"`

	// Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.
	Slug string `json:"slug"`
	// Name of the custom field.
	Name string `json:"name"`
	// The ID of the organization owning the custom field. **Required unless you use an organization token.**
	OrganizationID *string                     `json:"organization_id,omitempty"`
	Properties     CustomFieldNumberProperties `json:"properties"`
	// contains filtered or unexported fields
}

CustomFieldCreateNumber - Schema to create a custom field of type number.

func (*CustomFieldCreateNumber) GetMetadata ¶

func (*CustomFieldCreateNumber) GetName ¶

func (c *CustomFieldCreateNumber) GetName() string

func (*CustomFieldCreateNumber) GetOrganizationID ¶

func (c *CustomFieldCreateNumber) GetOrganizationID() *string

func (*CustomFieldCreateNumber) GetProperties ¶

func (*CustomFieldCreateNumber) GetSlug ¶

func (c *CustomFieldCreateNumber) GetSlug() string

func (*CustomFieldCreateNumber) GetType ¶

func (c *CustomFieldCreateNumber) GetType() string

func (CustomFieldCreateNumber) MarshalJSON ¶

func (c CustomFieldCreateNumber) MarshalJSON() ([]byte, error)

func (*CustomFieldCreateNumber) UnmarshalJSON ¶

func (c *CustomFieldCreateNumber) UnmarshalJSON(data []byte) error

type CustomFieldCreateNumberMetadata ¶

type CustomFieldCreateNumberMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomFieldCreateNumberMetadataType
}

func CreateCustomFieldCreateNumberMetadataBoolean ¶

func CreateCustomFieldCreateNumberMetadataBoolean(boolean bool) CustomFieldCreateNumberMetadata

func CreateCustomFieldCreateNumberMetadataInteger ¶

func CreateCustomFieldCreateNumberMetadataInteger(integer int64) CustomFieldCreateNumberMetadata

func CreateCustomFieldCreateNumberMetadataNumber ¶ added in v0.4.12

func CreateCustomFieldCreateNumberMetadataNumber(number float64) CustomFieldCreateNumberMetadata

func CreateCustomFieldCreateNumberMetadataStr ¶

func CreateCustomFieldCreateNumberMetadataStr(str string) CustomFieldCreateNumberMetadata

func (CustomFieldCreateNumberMetadata) MarshalJSON ¶

func (u CustomFieldCreateNumberMetadata) MarshalJSON() ([]byte, error)

func (*CustomFieldCreateNumberMetadata) UnmarshalJSON ¶

func (u *CustomFieldCreateNumberMetadata) UnmarshalJSON(data []byte) error

type CustomFieldCreateNumberMetadataType ¶

type CustomFieldCreateNumberMetadataType string
const (
	CustomFieldCreateNumberMetadataTypeStr     CustomFieldCreateNumberMetadataType = "str"
	CustomFieldCreateNumberMetadataTypeInteger CustomFieldCreateNumberMetadataType = "integer"
	CustomFieldCreateNumberMetadataTypeNumber  CustomFieldCreateNumberMetadataType = "number"
	CustomFieldCreateNumberMetadataTypeBoolean CustomFieldCreateNumberMetadataType = "boolean"
)

type CustomFieldCreateSelect ¶

type CustomFieldCreateSelect struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomFieldCreateSelectMetadata `json:"metadata,omitempty"`

	// Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.
	Slug string `json:"slug"`
	// Name of the custom field.
	Name string `json:"name"`
	// The ID of the organization owning the custom field. **Required unless you use an organization token.**
	OrganizationID *string                     `json:"organization_id,omitempty"`
	Properties     CustomFieldSelectProperties `json:"properties"`
	// contains filtered or unexported fields
}

CustomFieldCreateSelect - Schema to create a custom field of type select.

func (*CustomFieldCreateSelect) GetMetadata ¶

func (*CustomFieldCreateSelect) GetName ¶

func (c *CustomFieldCreateSelect) GetName() string

func (*CustomFieldCreateSelect) GetOrganizationID ¶

func (c *CustomFieldCreateSelect) GetOrganizationID() *string

func (*CustomFieldCreateSelect) GetProperties ¶

func (*CustomFieldCreateSelect) GetSlug ¶

func (c *CustomFieldCreateSelect) GetSlug() string

func (*CustomFieldCreateSelect) GetType ¶

func (c *CustomFieldCreateSelect) GetType() string

func (CustomFieldCreateSelect) MarshalJSON ¶

func (c CustomFieldCreateSelect) MarshalJSON() ([]byte, error)

func (*CustomFieldCreateSelect) UnmarshalJSON ¶

func (c *CustomFieldCreateSelect) UnmarshalJSON(data []byte) error

type CustomFieldCreateSelectMetadata ¶

type CustomFieldCreateSelectMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomFieldCreateSelectMetadataType
}

func CreateCustomFieldCreateSelectMetadataBoolean ¶

func CreateCustomFieldCreateSelectMetadataBoolean(boolean bool) CustomFieldCreateSelectMetadata

func CreateCustomFieldCreateSelectMetadataInteger ¶

func CreateCustomFieldCreateSelectMetadataInteger(integer int64) CustomFieldCreateSelectMetadata

func CreateCustomFieldCreateSelectMetadataNumber ¶ added in v0.4.12

func CreateCustomFieldCreateSelectMetadataNumber(number float64) CustomFieldCreateSelectMetadata

func CreateCustomFieldCreateSelectMetadataStr ¶

func CreateCustomFieldCreateSelectMetadataStr(str string) CustomFieldCreateSelectMetadata

func (CustomFieldCreateSelectMetadata) MarshalJSON ¶

func (u CustomFieldCreateSelectMetadata) MarshalJSON() ([]byte, error)

func (*CustomFieldCreateSelectMetadata) UnmarshalJSON ¶

func (u *CustomFieldCreateSelectMetadata) UnmarshalJSON(data []byte) error

type CustomFieldCreateSelectMetadataType ¶

type CustomFieldCreateSelectMetadataType string
const (
	CustomFieldCreateSelectMetadataTypeStr     CustomFieldCreateSelectMetadataType = "str"
	CustomFieldCreateSelectMetadataTypeInteger CustomFieldCreateSelectMetadataType = "integer"
	CustomFieldCreateSelectMetadataTypeNumber  CustomFieldCreateSelectMetadataType = "number"
	CustomFieldCreateSelectMetadataTypeBoolean CustomFieldCreateSelectMetadataType = "boolean"
)

type CustomFieldCreateText ¶

type CustomFieldCreateText struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomFieldCreateTextMetadata `json:"metadata,omitempty"`

	// Identifier of the custom field. It'll be used as key when storing the value. Must be unique across the organization.It can only contain ASCII letters, numbers and hyphens.
	Slug string `json:"slug"`
	// Name of the custom field.
	Name string `json:"name"`
	// The ID of the organization owning the custom field. **Required unless you use an organization token.**
	OrganizationID *string                   `json:"organization_id,omitempty"`
	Properties     CustomFieldTextProperties `json:"properties"`
	// contains filtered or unexported fields
}

CustomFieldCreateText - Schema to create a custom field of type text.

func (*CustomFieldCreateText) GetMetadata ¶

func (*CustomFieldCreateText) GetName ¶

func (c *CustomFieldCreateText) GetName() string

func (*CustomFieldCreateText) GetOrganizationID ¶

func (c *CustomFieldCreateText) GetOrganizationID() *string

func (*CustomFieldCreateText) GetProperties ¶

func (*CustomFieldCreateText) GetSlug ¶

func (c *CustomFieldCreateText) GetSlug() string

func (*CustomFieldCreateText) GetType ¶

func (c *CustomFieldCreateText) GetType() string

func (CustomFieldCreateText) MarshalJSON ¶

func (c CustomFieldCreateText) MarshalJSON() ([]byte, error)

func (*CustomFieldCreateText) UnmarshalJSON ¶

func (c *CustomFieldCreateText) UnmarshalJSON(data []byte) error

type CustomFieldCreateTextMetadata ¶

type CustomFieldCreateTextMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomFieldCreateTextMetadataType
}

func CreateCustomFieldCreateTextMetadataBoolean ¶

func CreateCustomFieldCreateTextMetadataBoolean(boolean bool) CustomFieldCreateTextMetadata

func CreateCustomFieldCreateTextMetadataInteger ¶

func CreateCustomFieldCreateTextMetadataInteger(integer int64) CustomFieldCreateTextMetadata

func CreateCustomFieldCreateTextMetadataNumber ¶ added in v0.4.12

func CreateCustomFieldCreateTextMetadataNumber(number float64) CustomFieldCreateTextMetadata

func CreateCustomFieldCreateTextMetadataStr ¶

func CreateCustomFieldCreateTextMetadataStr(str string) CustomFieldCreateTextMetadata

func (CustomFieldCreateTextMetadata) MarshalJSON ¶

func (u CustomFieldCreateTextMetadata) MarshalJSON() ([]byte, error)

func (*CustomFieldCreateTextMetadata) UnmarshalJSON ¶

func (u *CustomFieldCreateTextMetadata) UnmarshalJSON(data []byte) error

type CustomFieldCreateTextMetadataType ¶

type CustomFieldCreateTextMetadataType string
const (
	CustomFieldCreateTextMetadataTypeStr     CustomFieldCreateTextMetadataType = "str"
	CustomFieldCreateTextMetadataTypeInteger CustomFieldCreateTextMetadataType = "integer"
	CustomFieldCreateTextMetadataTypeNumber  CustomFieldCreateTextMetadataType = "number"
	CustomFieldCreateTextMetadataTypeBoolean CustomFieldCreateTextMetadataType = "boolean"
)

type CustomFieldCreateType ¶

type CustomFieldCreateType string
const (
	CustomFieldCreateTypeCheckbox CustomFieldCreateType = "checkbox"
	CustomFieldCreateTypeDate     CustomFieldCreateType = "date"
	CustomFieldCreateTypeNumber   CustomFieldCreateType = "number"
	CustomFieldCreateTypeSelect   CustomFieldCreateType = "select"
	CustomFieldCreateTypeText     CustomFieldCreateType = "text"
)

type CustomFieldData ¶

type CustomFieldData struct {
	Str      *string    `queryParam:"inline" union:"member"`
	Integer  *int64     `queryParam:"inline" union:"member"`
	Boolean  *bool      `queryParam:"inline" union:"member"`
	DateTime *time.Time `queryParam:"inline" union:"member"`

	Type CustomFieldDataType
}

func CreateCustomFieldDataBoolean ¶ added in v0.1.5

func CreateCustomFieldDataBoolean(boolean bool) CustomFieldData

func CreateCustomFieldDataDateTime ¶ added in v0.1.5

func CreateCustomFieldDataDateTime(dateTime time.Time) CustomFieldData

func CreateCustomFieldDataInteger ¶ added in v0.1.5

func CreateCustomFieldDataInteger(integer int64) CustomFieldData

func CreateCustomFieldDataStr ¶ added in v0.1.5

func CreateCustomFieldDataStr(str string) CustomFieldData

func (CustomFieldData) MarshalJSON ¶ added in v0.1.5

func (u CustomFieldData) MarshalJSON() ([]byte, error)

func (*CustomFieldData) UnmarshalJSON ¶ added in v0.1.5

func (u *CustomFieldData) UnmarshalJSON(data []byte) error

type CustomFieldDataType ¶ added in v0.1.5

type CustomFieldDataType string
const (
	CustomFieldDataTypeStr      CustomFieldDataType = "str"
	CustomFieldDataTypeInteger  CustomFieldDataType = "integer"
	CustomFieldDataTypeBoolean  CustomFieldDataType = "boolean"
	CustomFieldDataTypeDateTime CustomFieldDataType = "date-time"
)

type CustomFieldDate ¶

type CustomFieldDate struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`

	// Identifier of the custom field. It'll be used as key when storing the value.
	Slug string `json:"slug"`
	// Name of the custom field.
	Name string `json:"name"`
	// The ID of the organization owning the custom field.
	OrganizationID string                    `json:"organization_id"`
	Properties     CustomFieldDateProperties `json:"properties"`
	// contains filtered or unexported fields
}

CustomFieldDate - Schema for a custom field of type date.

func (*CustomFieldDate) GetCreatedAt ¶

func (c *CustomFieldDate) GetCreatedAt() time.Time

func (*CustomFieldDate) GetID ¶

func (c *CustomFieldDate) GetID() string

func (*CustomFieldDate) GetMetadata ¶

func (c *CustomFieldDate) GetMetadata() map[string]MetadataOutputType

func (*CustomFieldDate) GetModifiedAt ¶

func (c *CustomFieldDate) GetModifiedAt() *time.Time

func (*CustomFieldDate) GetName ¶

func (c *CustomFieldDate) GetName() string

func (*CustomFieldDate) GetOrganizationID ¶

func (c *CustomFieldDate) GetOrganizationID() string

func (*CustomFieldDate) GetProperties ¶

func (c *CustomFieldDate) GetProperties() CustomFieldDateProperties

func (*CustomFieldDate) GetSlug ¶

func (c *CustomFieldDate) GetSlug() string

func (*CustomFieldDate) GetType ¶

func (c *CustomFieldDate) GetType() string

func (CustomFieldDate) MarshalJSON ¶

func (c CustomFieldDate) MarshalJSON() ([]byte, error)

func (*CustomFieldDate) UnmarshalJSON ¶

func (c *CustomFieldDate) UnmarshalJSON(data []byte) error

type CustomFieldDateProperties ¶

type CustomFieldDateProperties struct {
	FormLabel       *string `json:"form_label,omitempty"`
	FormHelpText    *string `json:"form_help_text,omitempty"`
	FormPlaceholder *string `json:"form_placeholder,omitempty"`
	Ge              *int64  `json:"ge,omitempty"`
	Le              *int64  `json:"le,omitempty"`
}

func (*CustomFieldDateProperties) GetFormHelpText ¶

func (c *CustomFieldDateProperties) GetFormHelpText() *string

func (*CustomFieldDateProperties) GetFormLabel ¶

func (c *CustomFieldDateProperties) GetFormLabel() *string

func (*CustomFieldDateProperties) GetFormPlaceholder ¶

func (c *CustomFieldDateProperties) GetFormPlaceholder() *string

func (*CustomFieldDateProperties) GetGe ¶

func (c *CustomFieldDateProperties) GetGe() *int64

func (*CustomFieldDateProperties) GetLe ¶

func (c *CustomFieldDateProperties) GetLe() *int64

func (CustomFieldDateProperties) MarshalJSON ¶ added in v0.8.4

func (c CustomFieldDateProperties) MarshalJSON() ([]byte, error)

func (*CustomFieldDateProperties) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomFieldDateProperties) UnmarshalJSON(data []byte) error

type CustomFieldNumber ¶

type CustomFieldNumber struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`

	// Identifier of the custom field. It'll be used as key when storing the value.
	Slug string `json:"slug"`
	// Name of the custom field.
	Name string `json:"name"`
	// The ID of the organization owning the custom field.
	OrganizationID string                      `json:"organization_id"`
	Properties     CustomFieldNumberProperties `json:"properties"`
	// contains filtered or unexported fields
}

CustomFieldNumber - Schema for a custom field of type number.

func (*CustomFieldNumber) GetCreatedAt ¶

func (c *CustomFieldNumber) GetCreatedAt() time.Time

func (*CustomFieldNumber) GetID ¶

func (c *CustomFieldNumber) GetID() string

func (*CustomFieldNumber) GetMetadata ¶

func (c *CustomFieldNumber) GetMetadata() map[string]MetadataOutputType

func (*CustomFieldNumber) GetModifiedAt ¶

func (c *CustomFieldNumber) GetModifiedAt() *time.Time

func (*CustomFieldNumber) GetName ¶

func (c *CustomFieldNumber) GetName() string

func (*CustomFieldNumber) GetOrganizationID ¶

func (c *CustomFieldNumber) GetOrganizationID() string

func (*CustomFieldNumber) GetProperties ¶

func (*CustomFieldNumber) GetSlug ¶

func (c *CustomFieldNumber) GetSlug() string

func (*CustomFieldNumber) GetType ¶

func (c *CustomFieldNumber) GetType() string

func (CustomFieldNumber) MarshalJSON ¶

func (c CustomFieldNumber) MarshalJSON() ([]byte, error)

func (*CustomFieldNumber) UnmarshalJSON ¶

func (c *CustomFieldNumber) UnmarshalJSON(data []byte) error

type CustomFieldNumberProperties ¶

type CustomFieldNumberProperties struct {
	FormLabel       *string `json:"form_label,omitempty"`
	FormHelpText    *string `json:"form_help_text,omitempty"`
	FormPlaceholder *string `json:"form_placeholder,omitempty"`
	Ge              *int64  `json:"ge,omitempty"`
	Le              *int64  `json:"le,omitempty"`
}

func (*CustomFieldNumberProperties) GetFormHelpText ¶

func (c *CustomFieldNumberProperties) GetFormHelpText() *string

func (*CustomFieldNumberProperties) GetFormLabel ¶

func (c *CustomFieldNumberProperties) GetFormLabel() *string

func (*CustomFieldNumberProperties) GetFormPlaceholder ¶

func (c *CustomFieldNumberProperties) GetFormPlaceholder() *string

func (*CustomFieldNumberProperties) GetGe ¶

func (c *CustomFieldNumberProperties) GetGe() *int64

func (*CustomFieldNumberProperties) GetLe ¶

func (c *CustomFieldNumberProperties) GetLe() *int64

func (CustomFieldNumberProperties) MarshalJSON ¶ added in v0.8.4

func (c CustomFieldNumberProperties) MarshalJSON() ([]byte, error)

func (*CustomFieldNumberProperties) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomFieldNumberProperties) UnmarshalJSON(data []byte) error

type CustomFieldSelect ¶

type CustomFieldSelect struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`

	// Identifier of the custom field. It'll be used as key when storing the value.
	Slug string `json:"slug"`
	// Name of the custom field.
	Name string `json:"name"`
	// The ID of the organization owning the custom field.
	OrganizationID string                      `json:"organization_id"`
	Properties     CustomFieldSelectProperties `json:"properties"`
	// contains filtered or unexported fields
}

CustomFieldSelect - Schema for a custom field of type select.

func (*CustomFieldSelect) GetCreatedAt ¶

func (c *CustomFieldSelect) GetCreatedAt() time.Time

func (*CustomFieldSelect) GetID ¶

func (c *CustomFieldSelect) GetID() string

func (*CustomFieldSelect) GetMetadata ¶

func (c *CustomFieldSelect) GetMetadata() map[string]MetadataOutputType

func (*CustomFieldSelect) GetModifiedAt ¶

func (c *CustomFieldSelect) GetModifiedAt() *time.Time

func (*CustomFieldSelect) GetName ¶

func (c *CustomFieldSelect) GetName() string

func (*CustomFieldSelect) GetOrganizationID ¶

func (c *CustomFieldSelect) GetOrganizationID() string

func (*CustomFieldSelect) GetProperties ¶

func (*CustomFieldSelect) GetSlug ¶

func (c *CustomFieldSelect) GetSlug() string

func (*CustomFieldSelect) GetType ¶

func (c *CustomFieldSelect) GetType() string

func (CustomFieldSelect) MarshalJSON ¶

func (c CustomFieldSelect) MarshalJSON() ([]byte, error)

func (*CustomFieldSelect) UnmarshalJSON ¶

func (c *CustomFieldSelect) UnmarshalJSON(data []byte) error

type CustomFieldSelectOption ¶

type CustomFieldSelectOption struct {
	Value string `json:"value"`
	Label string `json:"label"`
}

func (*CustomFieldSelectOption) GetLabel ¶

func (c *CustomFieldSelectOption) GetLabel() string

func (*CustomFieldSelectOption) GetValue ¶

func (c *CustomFieldSelectOption) GetValue() string

func (CustomFieldSelectOption) MarshalJSON ¶ added in v0.8.4

func (c CustomFieldSelectOption) MarshalJSON() ([]byte, error)

func (*CustomFieldSelectOption) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomFieldSelectOption) UnmarshalJSON(data []byte) error

type CustomFieldSelectProperties ¶

type CustomFieldSelectProperties struct {
	FormLabel       *string                   `json:"form_label,omitempty"`
	FormHelpText    *string                   `json:"form_help_text,omitempty"`
	FormPlaceholder *string                   `json:"form_placeholder,omitempty"`
	Options         []CustomFieldSelectOption `json:"options"`
}

func (*CustomFieldSelectProperties) GetFormHelpText ¶

func (c *CustomFieldSelectProperties) GetFormHelpText() *string

func (*CustomFieldSelectProperties) GetFormLabel ¶

func (c *CustomFieldSelectProperties) GetFormLabel() *string

func (*CustomFieldSelectProperties) GetFormPlaceholder ¶

func (c *CustomFieldSelectProperties) GetFormPlaceholder() *string

func (*CustomFieldSelectProperties) GetOptions ¶

func (CustomFieldSelectProperties) MarshalJSON ¶ added in v0.8.4

func (c CustomFieldSelectProperties) MarshalJSON() ([]byte, error)

func (*CustomFieldSelectProperties) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomFieldSelectProperties) UnmarshalJSON(data []byte) error

type CustomFieldSortProperty ¶

type CustomFieldSortProperty string
const (
	CustomFieldSortPropertyCreatedAt      CustomFieldSortProperty = "created_at"
	CustomFieldSortPropertyMinusCreatedAt CustomFieldSortProperty = "-created_at"
	CustomFieldSortPropertySlug           CustomFieldSortProperty = "slug"
	CustomFieldSortPropertyMinusSlug      CustomFieldSortProperty = "-slug"
	CustomFieldSortPropertyName           CustomFieldSortProperty = "name"
	CustomFieldSortPropertyMinusName      CustomFieldSortProperty = "-name"
	CustomFieldSortPropertyType           CustomFieldSortProperty = "type"
	CustomFieldSortPropertyMinusType      CustomFieldSortProperty = "-type"
)

func (CustomFieldSortProperty) ToPointer ¶

func (*CustomFieldSortProperty) UnmarshalJSON ¶

func (e *CustomFieldSortProperty) UnmarshalJSON(data []byte) error

type CustomFieldText ¶

type CustomFieldText struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`

	// Identifier of the custom field. It'll be used as key when storing the value.
	Slug string `json:"slug"`
	// Name of the custom field.
	Name string `json:"name"`
	// The ID of the organization owning the custom field.
	OrganizationID string                    `json:"organization_id"`
	Properties     CustomFieldTextProperties `json:"properties"`
	// contains filtered or unexported fields
}

CustomFieldText - Schema for a custom field of type text.

func (*CustomFieldText) GetCreatedAt ¶

func (c *CustomFieldText) GetCreatedAt() time.Time

func (*CustomFieldText) GetID ¶

func (c *CustomFieldText) GetID() string

func (*CustomFieldText) GetMetadata ¶

func (c *CustomFieldText) GetMetadata() map[string]MetadataOutputType

func (*CustomFieldText) GetModifiedAt ¶

func (c *CustomFieldText) GetModifiedAt() *time.Time

func (*CustomFieldText) GetName ¶

func (c *CustomFieldText) GetName() string

func (*CustomFieldText) GetOrganizationID ¶

func (c *CustomFieldText) GetOrganizationID() string

func (*CustomFieldText) GetProperties ¶

func (c *CustomFieldText) GetProperties() CustomFieldTextProperties

func (*CustomFieldText) GetSlug ¶

func (c *CustomFieldText) GetSlug() string

func (*CustomFieldText) GetType ¶

func (c *CustomFieldText) GetType() string

func (CustomFieldText) MarshalJSON ¶

func (c CustomFieldText) MarshalJSON() ([]byte, error)

func (*CustomFieldText) UnmarshalJSON ¶

func (c *CustomFieldText) UnmarshalJSON(data []byte) error

type CustomFieldTextProperties ¶

type CustomFieldTextProperties struct {
	FormLabel       *string `json:"form_label,omitempty"`
	FormHelpText    *string `json:"form_help_text,omitempty"`
	FormPlaceholder *string `json:"form_placeholder,omitempty"`
	Textarea        *bool   `json:"textarea,omitempty"`
	MinLength       *int64  `json:"min_length,omitempty"`
	MaxLength       *int64  `json:"max_length,omitempty"`
}

func (*CustomFieldTextProperties) GetFormHelpText ¶

func (c *CustomFieldTextProperties) GetFormHelpText() *string

func (*CustomFieldTextProperties) GetFormLabel ¶

func (c *CustomFieldTextProperties) GetFormLabel() *string

func (*CustomFieldTextProperties) GetFormPlaceholder ¶

func (c *CustomFieldTextProperties) GetFormPlaceholder() *string

func (*CustomFieldTextProperties) GetMaxLength ¶

func (c *CustomFieldTextProperties) GetMaxLength() *int64

func (*CustomFieldTextProperties) GetMinLength ¶

func (c *CustomFieldTextProperties) GetMinLength() *int64

func (*CustomFieldTextProperties) GetTextarea ¶

func (c *CustomFieldTextProperties) GetTextarea() *bool

func (CustomFieldTextProperties) MarshalJSON ¶ added in v0.8.4

func (c CustomFieldTextProperties) MarshalJSON() ([]byte, error)

func (*CustomFieldTextProperties) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomFieldTextProperties) UnmarshalJSON(data []byte) error

type CustomFieldType ¶

type CustomFieldType string
const (
	CustomFieldTypeText     CustomFieldType = "text"
	CustomFieldTypeNumber   CustomFieldType = "number"
	CustomFieldTypeDate     CustomFieldType = "date"
	CustomFieldTypeCheckbox CustomFieldType = "checkbox"
	CustomFieldTypeSelect   CustomFieldType = "select"
)

func (CustomFieldType) ToPointer ¶

func (e CustomFieldType) ToPointer() *CustomFieldType

func (*CustomFieldType) UnmarshalJSON ¶

func (e *CustomFieldType) UnmarshalJSON(data []byte) error

type CustomFieldUnionType ¶

type CustomFieldUnionType string
const (
	CustomFieldUnionTypeCheckbox CustomFieldUnionType = "checkbox"
	CustomFieldUnionTypeDate     CustomFieldUnionType = "date"
	CustomFieldUnionTypeNumber   CustomFieldUnionType = "number"
	CustomFieldUnionTypeSelect   CustomFieldUnionType = "select"
	CustomFieldUnionTypeText     CustomFieldUnionType = "text"
)

type CustomFieldUpdate ¶

type CustomFieldUpdate struct {
	CustomFieldUpdateText     *CustomFieldUpdateText     `queryParam:"inline" union:"member"`
	CustomFieldUpdateNumber   *CustomFieldUpdateNumber   `queryParam:"inline" union:"member"`
	CustomFieldUpdateDate     *CustomFieldUpdateDate     `queryParam:"inline" union:"member"`
	CustomFieldUpdateCheckbox *CustomFieldUpdateCheckbox `queryParam:"inline" union:"member"`
	CustomFieldUpdateSelect   *CustomFieldUpdateSelect   `queryParam:"inline" union:"member"`

	Type CustomFieldUpdateType
}

func CreateCustomFieldUpdateCheckbox ¶

func CreateCustomFieldUpdateCheckbox(checkbox CustomFieldUpdateCheckbox) CustomFieldUpdate

func CreateCustomFieldUpdateDate ¶

func CreateCustomFieldUpdateDate(date CustomFieldUpdateDate) CustomFieldUpdate

func CreateCustomFieldUpdateNumber ¶

func CreateCustomFieldUpdateNumber(number CustomFieldUpdateNumber) CustomFieldUpdate

func CreateCustomFieldUpdateSelect ¶

func CreateCustomFieldUpdateSelect(selectT CustomFieldUpdateSelect) CustomFieldUpdate

func CreateCustomFieldUpdateText ¶

func CreateCustomFieldUpdateText(text CustomFieldUpdateText) CustomFieldUpdate

func (CustomFieldUpdate) MarshalJSON ¶

func (u CustomFieldUpdate) MarshalJSON() ([]byte, error)

func (*CustomFieldUpdate) UnmarshalJSON ¶

func (u *CustomFieldUpdate) UnmarshalJSON(data []byte) error

type CustomFieldUpdateCheckbox ¶

type CustomFieldUpdateCheckbox struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomFieldUpdateCheckboxMetadata `json:"metadata,omitempty"`
	Name     *string                                      `json:"name,omitempty"`
	Slug     *string                                      `json:"slug,omitempty"`

	Properties *CustomFieldCheckboxProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

CustomFieldUpdateCheckbox - Schema to update a custom field of type checkbox.

func (*CustomFieldUpdateCheckbox) GetMetadata ¶

func (*CustomFieldUpdateCheckbox) GetName ¶

func (c *CustomFieldUpdateCheckbox) GetName() *string

func (*CustomFieldUpdateCheckbox) GetProperties ¶

func (*CustomFieldUpdateCheckbox) GetSlug ¶

func (c *CustomFieldUpdateCheckbox) GetSlug() *string

func (*CustomFieldUpdateCheckbox) GetType ¶

func (c *CustomFieldUpdateCheckbox) GetType() string

func (CustomFieldUpdateCheckbox) MarshalJSON ¶

func (c CustomFieldUpdateCheckbox) MarshalJSON() ([]byte, error)

func (*CustomFieldUpdateCheckbox) UnmarshalJSON ¶

func (c *CustomFieldUpdateCheckbox) UnmarshalJSON(data []byte) error

type CustomFieldUpdateCheckboxMetadata ¶

type CustomFieldUpdateCheckboxMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomFieldUpdateCheckboxMetadataType
}

func CreateCustomFieldUpdateCheckboxMetadataBoolean ¶

func CreateCustomFieldUpdateCheckboxMetadataBoolean(boolean bool) CustomFieldUpdateCheckboxMetadata

func CreateCustomFieldUpdateCheckboxMetadataInteger ¶

func CreateCustomFieldUpdateCheckboxMetadataInteger(integer int64) CustomFieldUpdateCheckboxMetadata

func CreateCustomFieldUpdateCheckboxMetadataNumber ¶ added in v0.4.12

func CreateCustomFieldUpdateCheckboxMetadataNumber(number float64) CustomFieldUpdateCheckboxMetadata

func CreateCustomFieldUpdateCheckboxMetadataStr ¶

func CreateCustomFieldUpdateCheckboxMetadataStr(str string) CustomFieldUpdateCheckboxMetadata

func (CustomFieldUpdateCheckboxMetadata) MarshalJSON ¶

func (u CustomFieldUpdateCheckboxMetadata) MarshalJSON() ([]byte, error)

func (*CustomFieldUpdateCheckboxMetadata) UnmarshalJSON ¶

func (u *CustomFieldUpdateCheckboxMetadata) UnmarshalJSON(data []byte) error

type CustomFieldUpdateCheckboxMetadataType ¶

type CustomFieldUpdateCheckboxMetadataType string
const (
	CustomFieldUpdateCheckboxMetadataTypeStr     CustomFieldUpdateCheckboxMetadataType = "str"
	CustomFieldUpdateCheckboxMetadataTypeInteger CustomFieldUpdateCheckboxMetadataType = "integer"
	CustomFieldUpdateCheckboxMetadataTypeNumber  CustomFieldUpdateCheckboxMetadataType = "number"
	CustomFieldUpdateCheckboxMetadataTypeBoolean CustomFieldUpdateCheckboxMetadataType = "boolean"
)

type CustomFieldUpdateDate ¶

type CustomFieldUpdateDate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomFieldUpdateDateMetadata `json:"metadata,omitempty"`
	Name     *string                                  `json:"name,omitempty"`
	Slug     *string                                  `json:"slug,omitempty"`

	Properties *CustomFieldDateProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

CustomFieldUpdateDate - Schema to update a custom field of type date.

func (*CustomFieldUpdateDate) GetMetadata ¶

func (*CustomFieldUpdateDate) GetName ¶

func (c *CustomFieldUpdateDate) GetName() *string

func (*CustomFieldUpdateDate) GetProperties ¶

func (*CustomFieldUpdateDate) GetSlug ¶

func (c *CustomFieldUpdateDate) GetSlug() *string

func (*CustomFieldUpdateDate) GetType ¶

func (c *CustomFieldUpdateDate) GetType() string

func (CustomFieldUpdateDate) MarshalJSON ¶

func (c CustomFieldUpdateDate) MarshalJSON() ([]byte, error)

func (*CustomFieldUpdateDate) UnmarshalJSON ¶

func (c *CustomFieldUpdateDate) UnmarshalJSON(data []byte) error

type CustomFieldUpdateDateMetadata ¶

type CustomFieldUpdateDateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomFieldUpdateDateMetadataType
}

func CreateCustomFieldUpdateDateMetadataBoolean ¶

func CreateCustomFieldUpdateDateMetadataBoolean(boolean bool) CustomFieldUpdateDateMetadata

func CreateCustomFieldUpdateDateMetadataInteger ¶

func CreateCustomFieldUpdateDateMetadataInteger(integer int64) CustomFieldUpdateDateMetadata

func CreateCustomFieldUpdateDateMetadataNumber ¶ added in v0.4.12

func CreateCustomFieldUpdateDateMetadataNumber(number float64) CustomFieldUpdateDateMetadata

func CreateCustomFieldUpdateDateMetadataStr ¶

func CreateCustomFieldUpdateDateMetadataStr(str string) CustomFieldUpdateDateMetadata

func (CustomFieldUpdateDateMetadata) MarshalJSON ¶

func (u CustomFieldUpdateDateMetadata) MarshalJSON() ([]byte, error)

func (*CustomFieldUpdateDateMetadata) UnmarshalJSON ¶

func (u *CustomFieldUpdateDateMetadata) UnmarshalJSON(data []byte) error

type CustomFieldUpdateDateMetadataType ¶

type CustomFieldUpdateDateMetadataType string
const (
	CustomFieldUpdateDateMetadataTypeStr     CustomFieldUpdateDateMetadataType = "str"
	CustomFieldUpdateDateMetadataTypeInteger CustomFieldUpdateDateMetadataType = "integer"
	CustomFieldUpdateDateMetadataTypeNumber  CustomFieldUpdateDateMetadataType = "number"
	CustomFieldUpdateDateMetadataTypeBoolean CustomFieldUpdateDateMetadataType = "boolean"
)

type CustomFieldUpdateNumber ¶

type CustomFieldUpdateNumber struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomFieldUpdateNumberMetadata `json:"metadata,omitempty"`
	Name     *string                                    `json:"name,omitempty"`
	Slug     *string                                    `json:"slug,omitempty"`

	Properties *CustomFieldNumberProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

CustomFieldUpdateNumber - Schema to update a custom field of type number.

func (*CustomFieldUpdateNumber) GetMetadata ¶

func (*CustomFieldUpdateNumber) GetName ¶

func (c *CustomFieldUpdateNumber) GetName() *string

func (*CustomFieldUpdateNumber) GetProperties ¶

func (*CustomFieldUpdateNumber) GetSlug ¶

func (c *CustomFieldUpdateNumber) GetSlug() *string

func (*CustomFieldUpdateNumber) GetType ¶

func (c *CustomFieldUpdateNumber) GetType() string

func (CustomFieldUpdateNumber) MarshalJSON ¶

func (c CustomFieldUpdateNumber) MarshalJSON() ([]byte, error)

func (*CustomFieldUpdateNumber) UnmarshalJSON ¶

func (c *CustomFieldUpdateNumber) UnmarshalJSON(data []byte) error

type CustomFieldUpdateNumberMetadata ¶

type CustomFieldUpdateNumberMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomFieldUpdateNumberMetadataType
}

func CreateCustomFieldUpdateNumberMetadataBoolean ¶

func CreateCustomFieldUpdateNumberMetadataBoolean(boolean bool) CustomFieldUpdateNumberMetadata

func CreateCustomFieldUpdateNumberMetadataInteger ¶

func CreateCustomFieldUpdateNumberMetadataInteger(integer int64) CustomFieldUpdateNumberMetadata

func CreateCustomFieldUpdateNumberMetadataNumber ¶ added in v0.4.12

func CreateCustomFieldUpdateNumberMetadataNumber(number float64) CustomFieldUpdateNumberMetadata

func CreateCustomFieldUpdateNumberMetadataStr ¶

func CreateCustomFieldUpdateNumberMetadataStr(str string) CustomFieldUpdateNumberMetadata

func (CustomFieldUpdateNumberMetadata) MarshalJSON ¶

func (u CustomFieldUpdateNumberMetadata) MarshalJSON() ([]byte, error)

func (*CustomFieldUpdateNumberMetadata) UnmarshalJSON ¶

func (u *CustomFieldUpdateNumberMetadata) UnmarshalJSON(data []byte) error

type CustomFieldUpdateNumberMetadataType ¶

type CustomFieldUpdateNumberMetadataType string
const (
	CustomFieldUpdateNumberMetadataTypeStr     CustomFieldUpdateNumberMetadataType = "str"
	CustomFieldUpdateNumberMetadataTypeInteger CustomFieldUpdateNumberMetadataType = "integer"
	CustomFieldUpdateNumberMetadataTypeNumber  CustomFieldUpdateNumberMetadataType = "number"
	CustomFieldUpdateNumberMetadataTypeBoolean CustomFieldUpdateNumberMetadataType = "boolean"
)

type CustomFieldUpdateSelect ¶

type CustomFieldUpdateSelect struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomFieldUpdateSelectMetadata `json:"metadata,omitempty"`
	Name     *string                                    `json:"name,omitempty"`
	Slug     *string                                    `json:"slug,omitempty"`

	Properties *CustomFieldSelectProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

CustomFieldUpdateSelect - Schema to update a custom field of type select.

func (*CustomFieldUpdateSelect) GetMetadata ¶

func (*CustomFieldUpdateSelect) GetName ¶

func (c *CustomFieldUpdateSelect) GetName() *string

func (*CustomFieldUpdateSelect) GetProperties ¶

func (*CustomFieldUpdateSelect) GetSlug ¶

func (c *CustomFieldUpdateSelect) GetSlug() *string

func (*CustomFieldUpdateSelect) GetType ¶

func (c *CustomFieldUpdateSelect) GetType() string

func (CustomFieldUpdateSelect) MarshalJSON ¶

func (c CustomFieldUpdateSelect) MarshalJSON() ([]byte, error)

func (*CustomFieldUpdateSelect) UnmarshalJSON ¶

func (c *CustomFieldUpdateSelect) UnmarshalJSON(data []byte) error

type CustomFieldUpdateSelectMetadata ¶

type CustomFieldUpdateSelectMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomFieldUpdateSelectMetadataType
}

func CreateCustomFieldUpdateSelectMetadataBoolean ¶

func CreateCustomFieldUpdateSelectMetadataBoolean(boolean bool) CustomFieldUpdateSelectMetadata

func CreateCustomFieldUpdateSelectMetadataInteger ¶

func CreateCustomFieldUpdateSelectMetadataInteger(integer int64) CustomFieldUpdateSelectMetadata

func CreateCustomFieldUpdateSelectMetadataNumber ¶ added in v0.4.12

func CreateCustomFieldUpdateSelectMetadataNumber(number float64) CustomFieldUpdateSelectMetadata

func CreateCustomFieldUpdateSelectMetadataStr ¶

func CreateCustomFieldUpdateSelectMetadataStr(str string) CustomFieldUpdateSelectMetadata

func (CustomFieldUpdateSelectMetadata) MarshalJSON ¶

func (u CustomFieldUpdateSelectMetadata) MarshalJSON() ([]byte, error)

func (*CustomFieldUpdateSelectMetadata) UnmarshalJSON ¶

func (u *CustomFieldUpdateSelectMetadata) UnmarshalJSON(data []byte) error

type CustomFieldUpdateSelectMetadataType ¶

type CustomFieldUpdateSelectMetadataType string
const (
	CustomFieldUpdateSelectMetadataTypeStr     CustomFieldUpdateSelectMetadataType = "str"
	CustomFieldUpdateSelectMetadataTypeInteger CustomFieldUpdateSelectMetadataType = "integer"
	CustomFieldUpdateSelectMetadataTypeNumber  CustomFieldUpdateSelectMetadataType = "number"
	CustomFieldUpdateSelectMetadataTypeBoolean CustomFieldUpdateSelectMetadataType = "boolean"
)

type CustomFieldUpdateText ¶

type CustomFieldUpdateText struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomFieldUpdateTextMetadata `json:"metadata,omitempty"`
	Name     *string                                  `json:"name,omitempty"`
	Slug     *string                                  `json:"slug,omitempty"`

	Properties *CustomFieldTextProperties `json:"properties,omitempty"`
	// contains filtered or unexported fields
}

CustomFieldUpdateText - Schema to update a custom field of type text.

func (*CustomFieldUpdateText) GetMetadata ¶

func (*CustomFieldUpdateText) GetName ¶

func (c *CustomFieldUpdateText) GetName() *string

func (*CustomFieldUpdateText) GetProperties ¶

func (*CustomFieldUpdateText) GetSlug ¶

func (c *CustomFieldUpdateText) GetSlug() *string

func (*CustomFieldUpdateText) GetType ¶

func (c *CustomFieldUpdateText) GetType() string

func (CustomFieldUpdateText) MarshalJSON ¶

func (c CustomFieldUpdateText) MarshalJSON() ([]byte, error)

func (*CustomFieldUpdateText) UnmarshalJSON ¶

func (c *CustomFieldUpdateText) UnmarshalJSON(data []byte) error

type CustomFieldUpdateTextMetadata ¶

type CustomFieldUpdateTextMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomFieldUpdateTextMetadataType
}

func CreateCustomFieldUpdateTextMetadataBoolean ¶

func CreateCustomFieldUpdateTextMetadataBoolean(boolean bool) CustomFieldUpdateTextMetadata

func CreateCustomFieldUpdateTextMetadataInteger ¶

func CreateCustomFieldUpdateTextMetadataInteger(integer int64) CustomFieldUpdateTextMetadata

func CreateCustomFieldUpdateTextMetadataNumber ¶ added in v0.4.12

func CreateCustomFieldUpdateTextMetadataNumber(number float64) CustomFieldUpdateTextMetadata

func CreateCustomFieldUpdateTextMetadataStr ¶

func CreateCustomFieldUpdateTextMetadataStr(str string) CustomFieldUpdateTextMetadata

func (CustomFieldUpdateTextMetadata) MarshalJSON ¶

func (u CustomFieldUpdateTextMetadata) MarshalJSON() ([]byte, error)

func (*CustomFieldUpdateTextMetadata) UnmarshalJSON ¶

func (u *CustomFieldUpdateTextMetadata) UnmarshalJSON(data []byte) error

type CustomFieldUpdateTextMetadataType ¶

type CustomFieldUpdateTextMetadataType string
const (
	CustomFieldUpdateTextMetadataTypeStr     CustomFieldUpdateTextMetadataType = "str"
	CustomFieldUpdateTextMetadataTypeInteger CustomFieldUpdateTextMetadataType = "integer"
	CustomFieldUpdateTextMetadataTypeNumber  CustomFieldUpdateTextMetadataType = "number"
	CustomFieldUpdateTextMetadataTypeBoolean CustomFieldUpdateTextMetadataType = "boolean"
)

type CustomFieldUpdateType ¶

type CustomFieldUpdateType string
const (
	CustomFieldUpdateTypeCheckbox CustomFieldUpdateType = "checkbox"
	CustomFieldUpdateTypeDate     CustomFieldUpdateType = "date"
	CustomFieldUpdateTypeNumber   CustomFieldUpdateType = "number"
	CustomFieldUpdateTypeSelect   CustomFieldUpdateType = "select"
	CustomFieldUpdateTypeText     CustomFieldUpdateType = "text"
)

type Customer ¶

type Customer struct {
	CustomerIndividual *CustomerIndividual `queryParam:"inline" union:"member"`
	CustomerTeam       *CustomerTeam       `queryParam:"inline" union:"member"`

	Type CustomerUnionType
}

func CreateCustomerIndividual ¶ added in v0.16.0

func CreateCustomerIndividual(individual CustomerIndividual) Customer

func CreateCustomerTeam ¶ added in v0.16.0

func CreateCustomerTeam(team CustomerTeam) Customer

func (Customer) MarshalJSON ¶

func (u Customer) MarshalJSON() ([]byte, error)

func (*Customer) UnmarshalJSON ¶

func (u *Customer) UnmarshalJSON(data []byte) error

type CustomerBenefitGrant ¶

type CustomerBenefitGrant struct {
	CustomerBenefitGrantDiscord          *CustomerBenefitGrantDiscord          `queryParam:"inline" union:"member"`
	CustomerBenefitGrantGitHubRepository *CustomerBenefitGrantGitHubRepository `queryParam:"inline" union:"member"`
	CustomerBenefitGrantDownloadables    *CustomerBenefitGrantDownloadables    `queryParam:"inline" union:"member"`
	CustomerBenefitGrantLicenseKeys      *CustomerBenefitGrantLicenseKeys      `queryParam:"inline" union:"member"`
	CustomerBenefitGrantCustom           *CustomerBenefitGrantCustom           `queryParam:"inline" union:"member"`
	CustomerBenefitGrantMeterCredit      *CustomerBenefitGrantMeterCredit      `queryParam:"inline" union:"member"`
	CustomerBenefitGrantFeatureFlag      *CustomerBenefitGrantFeatureFlag      `queryParam:"inline" union:"member"`

	Type CustomerBenefitGrantType
}

func CreateCustomerBenefitGrantCustomerBenefitGrantCustom ¶

func CreateCustomerBenefitGrantCustomerBenefitGrantCustom(customerBenefitGrantCustom CustomerBenefitGrantCustom) CustomerBenefitGrant

func CreateCustomerBenefitGrantCustomerBenefitGrantDiscord ¶

func CreateCustomerBenefitGrantCustomerBenefitGrantDiscord(customerBenefitGrantDiscord CustomerBenefitGrantDiscord) CustomerBenefitGrant

func CreateCustomerBenefitGrantCustomerBenefitGrantDownloadables ¶

func CreateCustomerBenefitGrantCustomerBenefitGrantDownloadables(customerBenefitGrantDownloadables CustomerBenefitGrantDownloadables) CustomerBenefitGrant

func CreateCustomerBenefitGrantCustomerBenefitGrantFeatureFlag ¶ added in v0.15.0

func CreateCustomerBenefitGrantCustomerBenefitGrantFeatureFlag(customerBenefitGrantFeatureFlag CustomerBenefitGrantFeatureFlag) CustomerBenefitGrant

func CreateCustomerBenefitGrantCustomerBenefitGrantGitHubRepository ¶

func CreateCustomerBenefitGrantCustomerBenefitGrantGitHubRepository(customerBenefitGrantGitHubRepository CustomerBenefitGrantGitHubRepository) CustomerBenefitGrant

func CreateCustomerBenefitGrantCustomerBenefitGrantLicenseKeys ¶

func CreateCustomerBenefitGrantCustomerBenefitGrantLicenseKeys(customerBenefitGrantLicenseKeys CustomerBenefitGrantLicenseKeys) CustomerBenefitGrant

func CreateCustomerBenefitGrantCustomerBenefitGrantMeterCredit ¶ added in v0.4.10

func CreateCustomerBenefitGrantCustomerBenefitGrantMeterCredit(customerBenefitGrantMeterCredit CustomerBenefitGrantMeterCredit) CustomerBenefitGrant

func (CustomerBenefitGrant) MarshalJSON ¶

func (u CustomerBenefitGrant) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrant) UnmarshalJSON ¶

func (u *CustomerBenefitGrant) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantCustom ¶

type CustomerBenefitGrantCustom struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID             string                       `json:"id"`
	GrantedAt      *time.Time                   `json:"granted_at"`
	RevokedAt      *time.Time                   `json:"revoked_at"`
	CustomerID     string                       `json:"customer_id"`
	MemberID       *string                      `json:"member_id,omitempty"`
	BenefitID      string                       `json:"benefit_id"`
	SubscriptionID *string                      `json:"subscription_id"`
	OrderID        *string                      `json:"order_id"`
	IsGranted      bool                         `json:"is_granted"`
	IsRevoked      bool                         `json:"is_revoked"`
	Error          *BenefitGrantError           `json:"error,omitempty"`
	Customer       CustomerPortalCustomer       `json:"customer"`
	Benefit        BenefitCustomSubscriber      `json:"benefit"`
	Properties     BenefitGrantCustomProperties `json:"properties"`
}

func (*CustomerBenefitGrantCustom) GetBenefit ¶

func (*CustomerBenefitGrantCustom) GetBenefitID ¶

func (c *CustomerBenefitGrantCustom) GetBenefitID() string

func (*CustomerBenefitGrantCustom) GetCreatedAt ¶

func (c *CustomerBenefitGrantCustom) GetCreatedAt() time.Time

func (*CustomerBenefitGrantCustom) GetCustomer ¶

func (*CustomerBenefitGrantCustom) GetCustomerID ¶

func (c *CustomerBenefitGrantCustom) GetCustomerID() string

func (*CustomerBenefitGrantCustom) GetError ¶ added in v0.13.0

func (*CustomerBenefitGrantCustom) GetGrantedAt ¶

func (c *CustomerBenefitGrantCustom) GetGrantedAt() *time.Time

func (*CustomerBenefitGrantCustom) GetID ¶

func (*CustomerBenefitGrantCustom) GetIsGranted ¶

func (c *CustomerBenefitGrantCustom) GetIsGranted() bool

func (*CustomerBenefitGrantCustom) GetIsRevoked ¶

func (c *CustomerBenefitGrantCustom) GetIsRevoked() bool

func (*CustomerBenefitGrantCustom) GetMemberID ¶ added in v0.13.0

func (c *CustomerBenefitGrantCustom) GetMemberID() *string

func (*CustomerBenefitGrantCustom) GetModifiedAt ¶

func (c *CustomerBenefitGrantCustom) GetModifiedAt() *time.Time

func (*CustomerBenefitGrantCustom) GetOrderID ¶

func (c *CustomerBenefitGrantCustom) GetOrderID() *string

func (*CustomerBenefitGrantCustom) GetProperties ¶

func (*CustomerBenefitGrantCustom) GetRevokedAt ¶

func (c *CustomerBenefitGrantCustom) GetRevokedAt() *time.Time

func (*CustomerBenefitGrantCustom) GetSubscriptionID ¶

func (c *CustomerBenefitGrantCustom) GetSubscriptionID() *string

func (CustomerBenefitGrantCustom) MarshalJSON ¶

func (c CustomerBenefitGrantCustom) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantCustom) UnmarshalJSON ¶

func (c *CustomerBenefitGrantCustom) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantCustomUpdate ¶

type CustomerBenefitGrantCustomUpdate struct {
	// contains filtered or unexported fields
}

func (*CustomerBenefitGrantCustomUpdate) GetBenefitType ¶

func (c *CustomerBenefitGrantCustomUpdate) GetBenefitType() string

func (CustomerBenefitGrantCustomUpdate) MarshalJSON ¶

func (c CustomerBenefitGrantCustomUpdate) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantCustomUpdate) UnmarshalJSON ¶

func (c *CustomerBenefitGrantCustomUpdate) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantDiscord ¶

type CustomerBenefitGrantDiscord struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID             string                        `json:"id"`
	GrantedAt      *time.Time                    `json:"granted_at"`
	RevokedAt      *time.Time                    `json:"revoked_at"`
	CustomerID     string                        `json:"customer_id"`
	MemberID       *string                       `json:"member_id,omitempty"`
	BenefitID      string                        `json:"benefit_id"`
	SubscriptionID *string                       `json:"subscription_id"`
	OrderID        *string                       `json:"order_id"`
	IsGranted      bool                          `json:"is_granted"`
	IsRevoked      bool                          `json:"is_revoked"`
	Error          *BenefitGrantError            `json:"error,omitempty"`
	Customer       CustomerPortalCustomer        `json:"customer"`
	Benefit        BenefitDiscordSubscriber      `json:"benefit"`
	Properties     BenefitGrantDiscordProperties `json:"properties"`
}

func (*CustomerBenefitGrantDiscord) GetBenefit ¶

func (*CustomerBenefitGrantDiscord) GetBenefitID ¶

func (c *CustomerBenefitGrantDiscord) GetBenefitID() string

func (*CustomerBenefitGrantDiscord) GetCreatedAt ¶

func (c *CustomerBenefitGrantDiscord) GetCreatedAt() time.Time

func (*CustomerBenefitGrantDiscord) GetCustomer ¶

func (*CustomerBenefitGrantDiscord) GetCustomerID ¶

func (c *CustomerBenefitGrantDiscord) GetCustomerID() string

func (*CustomerBenefitGrantDiscord) GetError ¶ added in v0.13.0

func (*CustomerBenefitGrantDiscord) GetGrantedAt ¶

func (c *CustomerBenefitGrantDiscord) GetGrantedAt() *time.Time

func (*CustomerBenefitGrantDiscord) GetID ¶

func (*CustomerBenefitGrantDiscord) GetIsGranted ¶

func (c *CustomerBenefitGrantDiscord) GetIsGranted() bool

func (*CustomerBenefitGrantDiscord) GetIsRevoked ¶

func (c *CustomerBenefitGrantDiscord) GetIsRevoked() bool

func (*CustomerBenefitGrantDiscord) GetMemberID ¶ added in v0.13.0

func (c *CustomerBenefitGrantDiscord) GetMemberID() *string

func (*CustomerBenefitGrantDiscord) GetModifiedAt ¶

func (c *CustomerBenefitGrantDiscord) GetModifiedAt() *time.Time

func (*CustomerBenefitGrantDiscord) GetOrderID ¶

func (c *CustomerBenefitGrantDiscord) GetOrderID() *string

func (*CustomerBenefitGrantDiscord) GetProperties ¶

func (*CustomerBenefitGrantDiscord) GetRevokedAt ¶

func (c *CustomerBenefitGrantDiscord) GetRevokedAt() *time.Time

func (*CustomerBenefitGrantDiscord) GetSubscriptionID ¶

func (c *CustomerBenefitGrantDiscord) GetSubscriptionID() *string

func (CustomerBenefitGrantDiscord) MarshalJSON ¶

func (c CustomerBenefitGrantDiscord) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantDiscord) UnmarshalJSON ¶

func (c *CustomerBenefitGrantDiscord) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantDiscordPropertiesUpdate ¶

type CustomerBenefitGrantDiscordPropertiesUpdate struct {
	AccountID *string `json:"account_id"`
}

func (*CustomerBenefitGrantDiscordPropertiesUpdate) GetAccountID ¶

func (CustomerBenefitGrantDiscordPropertiesUpdate) MarshalJSON ¶ added in v0.8.4

func (*CustomerBenefitGrantDiscordPropertiesUpdate) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomerBenefitGrantDiscordPropertiesUpdate) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantDiscordUpdate ¶

type CustomerBenefitGrantDiscordUpdate struct {
	Properties CustomerBenefitGrantDiscordPropertiesUpdate `json:"properties"`
	// contains filtered or unexported fields
}

func (*CustomerBenefitGrantDiscordUpdate) GetBenefitType ¶

func (c *CustomerBenefitGrantDiscordUpdate) GetBenefitType() string

func (*CustomerBenefitGrantDiscordUpdate) GetProperties ¶

func (CustomerBenefitGrantDiscordUpdate) MarshalJSON ¶

func (c CustomerBenefitGrantDiscordUpdate) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantDiscordUpdate) UnmarshalJSON ¶

func (c *CustomerBenefitGrantDiscordUpdate) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantDownloadables ¶

type CustomerBenefitGrantDownloadables struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID             string                              `json:"id"`
	GrantedAt      *time.Time                          `json:"granted_at"`
	RevokedAt      *time.Time                          `json:"revoked_at"`
	CustomerID     string                              `json:"customer_id"`
	MemberID       *string                             `json:"member_id,omitempty"`
	BenefitID      string                              `json:"benefit_id"`
	SubscriptionID *string                             `json:"subscription_id"`
	OrderID        *string                             `json:"order_id"`
	IsGranted      bool                                `json:"is_granted"`
	IsRevoked      bool                                `json:"is_revoked"`
	Error          *BenefitGrantError                  `json:"error,omitempty"`
	Customer       CustomerPortalCustomer              `json:"customer"`
	Benefit        BenefitDownloadablesSubscriber      `json:"benefit"`
	Properties     BenefitGrantDownloadablesProperties `json:"properties"`
}

func (*CustomerBenefitGrantDownloadables) GetBenefit ¶

func (*CustomerBenefitGrantDownloadables) GetBenefitID ¶

func (c *CustomerBenefitGrantDownloadables) GetBenefitID() string

func (*CustomerBenefitGrantDownloadables) GetCreatedAt ¶

func (c *CustomerBenefitGrantDownloadables) GetCreatedAt() time.Time

func (*CustomerBenefitGrantDownloadables) GetCustomer ¶

func (*CustomerBenefitGrantDownloadables) GetCustomerID ¶

func (c *CustomerBenefitGrantDownloadables) GetCustomerID() string

func (*CustomerBenefitGrantDownloadables) GetError ¶ added in v0.13.0

func (*CustomerBenefitGrantDownloadables) GetGrantedAt ¶

func (c *CustomerBenefitGrantDownloadables) GetGrantedAt() *time.Time

func (*CustomerBenefitGrantDownloadables) GetID ¶

func (*CustomerBenefitGrantDownloadables) GetIsGranted ¶

func (c *CustomerBenefitGrantDownloadables) GetIsGranted() bool

func (*CustomerBenefitGrantDownloadables) GetIsRevoked ¶

func (c *CustomerBenefitGrantDownloadables) GetIsRevoked() bool

func (*CustomerBenefitGrantDownloadables) GetMemberID ¶ added in v0.13.0

func (c *CustomerBenefitGrantDownloadables) GetMemberID() *string

func (*CustomerBenefitGrantDownloadables) GetModifiedAt ¶

func (c *CustomerBenefitGrantDownloadables) GetModifiedAt() *time.Time

func (*CustomerBenefitGrantDownloadables) GetOrderID ¶

func (c *CustomerBenefitGrantDownloadables) GetOrderID() *string

func (*CustomerBenefitGrantDownloadables) GetProperties ¶

func (*CustomerBenefitGrantDownloadables) GetRevokedAt ¶

func (c *CustomerBenefitGrantDownloadables) GetRevokedAt() *time.Time

func (*CustomerBenefitGrantDownloadables) GetSubscriptionID ¶

func (c *CustomerBenefitGrantDownloadables) GetSubscriptionID() *string

func (CustomerBenefitGrantDownloadables) MarshalJSON ¶

func (c CustomerBenefitGrantDownloadables) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantDownloadables) UnmarshalJSON ¶

func (c *CustomerBenefitGrantDownloadables) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantDownloadablesUpdate ¶

type CustomerBenefitGrantDownloadablesUpdate struct {
	// contains filtered or unexported fields
}

func (*CustomerBenefitGrantDownloadablesUpdate) GetBenefitType ¶

func (c *CustomerBenefitGrantDownloadablesUpdate) GetBenefitType() string

func (CustomerBenefitGrantDownloadablesUpdate) MarshalJSON ¶

func (c CustomerBenefitGrantDownloadablesUpdate) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantDownloadablesUpdate) UnmarshalJSON ¶

func (c *CustomerBenefitGrantDownloadablesUpdate) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantFeatureFlag ¶ added in v0.15.0

type CustomerBenefitGrantFeatureFlag struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID             string                            `json:"id"`
	GrantedAt      *time.Time                        `json:"granted_at"`
	RevokedAt      *time.Time                        `json:"revoked_at"`
	CustomerID     string                            `json:"customer_id"`
	MemberID       *string                           `json:"member_id,omitempty"`
	BenefitID      string                            `json:"benefit_id"`
	SubscriptionID *string                           `json:"subscription_id"`
	OrderID        *string                           `json:"order_id"`
	IsGranted      bool                              `json:"is_granted"`
	IsRevoked      bool                              `json:"is_revoked"`
	Error          *BenefitGrantError                `json:"error,omitempty"`
	Customer       CustomerPortalCustomer            `json:"customer"`
	Benefit        BenefitFeatureFlagSubscriber      `json:"benefit"`
	Properties     BenefitGrantFeatureFlagProperties `json:"properties"`
}

func (*CustomerBenefitGrantFeatureFlag) GetBenefit ¶ added in v0.15.0

func (*CustomerBenefitGrantFeatureFlag) GetBenefitID ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) GetBenefitID() string

func (*CustomerBenefitGrantFeatureFlag) GetCreatedAt ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) GetCreatedAt() time.Time

func (*CustomerBenefitGrantFeatureFlag) GetCustomer ¶ added in v0.15.0

func (*CustomerBenefitGrantFeatureFlag) GetCustomerID ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) GetCustomerID() string

func (*CustomerBenefitGrantFeatureFlag) GetError ¶ added in v0.15.0

func (*CustomerBenefitGrantFeatureFlag) GetGrantedAt ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) GetGrantedAt() *time.Time

func (*CustomerBenefitGrantFeatureFlag) GetID ¶ added in v0.15.0

func (*CustomerBenefitGrantFeatureFlag) GetIsGranted ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) GetIsGranted() bool

func (*CustomerBenefitGrantFeatureFlag) GetIsRevoked ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) GetIsRevoked() bool

func (*CustomerBenefitGrantFeatureFlag) GetMemberID ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) GetMemberID() *string

func (*CustomerBenefitGrantFeatureFlag) GetModifiedAt ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) GetModifiedAt() *time.Time

func (*CustomerBenefitGrantFeatureFlag) GetOrderID ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) GetOrderID() *string

func (*CustomerBenefitGrantFeatureFlag) GetProperties ¶ added in v0.15.0

func (*CustomerBenefitGrantFeatureFlag) GetRevokedAt ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) GetRevokedAt() *time.Time

func (*CustomerBenefitGrantFeatureFlag) GetSubscriptionID ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) GetSubscriptionID() *string

func (CustomerBenefitGrantFeatureFlag) MarshalJSON ¶ added in v0.15.0

func (c CustomerBenefitGrantFeatureFlag) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantFeatureFlag) UnmarshalJSON ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlag) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantFeatureFlagUpdate ¶ added in v0.15.0

type CustomerBenefitGrantFeatureFlagUpdate struct {
	// contains filtered or unexported fields
}

func (*CustomerBenefitGrantFeatureFlagUpdate) GetBenefitType ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlagUpdate) GetBenefitType() string

func (CustomerBenefitGrantFeatureFlagUpdate) MarshalJSON ¶ added in v0.15.0

func (c CustomerBenefitGrantFeatureFlagUpdate) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantFeatureFlagUpdate) UnmarshalJSON ¶ added in v0.15.0

func (c *CustomerBenefitGrantFeatureFlagUpdate) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantGitHubRepository ¶

type CustomerBenefitGrantGitHubRepository struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID             string                                 `json:"id"`
	GrantedAt      *time.Time                             `json:"granted_at"`
	RevokedAt      *time.Time                             `json:"revoked_at"`
	CustomerID     string                                 `json:"customer_id"`
	MemberID       *string                                `json:"member_id,omitempty"`
	BenefitID      string                                 `json:"benefit_id"`
	SubscriptionID *string                                `json:"subscription_id"`
	OrderID        *string                                `json:"order_id"`
	IsGranted      bool                                   `json:"is_granted"`
	IsRevoked      bool                                   `json:"is_revoked"`
	Error          *BenefitGrantError                     `json:"error,omitempty"`
	Customer       CustomerPortalCustomer                 `json:"customer"`
	Benefit        BenefitGitHubRepositorySubscriber      `json:"benefit"`
	Properties     BenefitGrantGitHubRepositoryProperties `json:"properties"`
}

func (*CustomerBenefitGrantGitHubRepository) GetBenefit ¶

func (*CustomerBenefitGrantGitHubRepository) GetBenefitID ¶

func (c *CustomerBenefitGrantGitHubRepository) GetBenefitID() string

func (*CustomerBenefitGrantGitHubRepository) GetCreatedAt ¶

func (*CustomerBenefitGrantGitHubRepository) GetCustomer ¶

func (*CustomerBenefitGrantGitHubRepository) GetCustomerID ¶

func (c *CustomerBenefitGrantGitHubRepository) GetCustomerID() string

func (*CustomerBenefitGrantGitHubRepository) GetError ¶ added in v0.13.0

func (*CustomerBenefitGrantGitHubRepository) GetGrantedAt ¶

func (c *CustomerBenefitGrantGitHubRepository) GetGrantedAt() *time.Time

func (*CustomerBenefitGrantGitHubRepository) GetID ¶

func (*CustomerBenefitGrantGitHubRepository) GetIsGranted ¶

func (c *CustomerBenefitGrantGitHubRepository) GetIsGranted() bool

func (*CustomerBenefitGrantGitHubRepository) GetIsRevoked ¶

func (c *CustomerBenefitGrantGitHubRepository) GetIsRevoked() bool

func (*CustomerBenefitGrantGitHubRepository) GetMemberID ¶ added in v0.13.0

func (c *CustomerBenefitGrantGitHubRepository) GetMemberID() *string

func (*CustomerBenefitGrantGitHubRepository) GetModifiedAt ¶

func (c *CustomerBenefitGrantGitHubRepository) GetModifiedAt() *time.Time

func (*CustomerBenefitGrantGitHubRepository) GetOrderID ¶

func (*CustomerBenefitGrantGitHubRepository) GetProperties ¶

func (*CustomerBenefitGrantGitHubRepository) GetRevokedAt ¶

func (c *CustomerBenefitGrantGitHubRepository) GetRevokedAt() *time.Time

func (*CustomerBenefitGrantGitHubRepository) GetSubscriptionID ¶

func (c *CustomerBenefitGrantGitHubRepository) GetSubscriptionID() *string

func (CustomerBenefitGrantGitHubRepository) MarshalJSON ¶

func (c CustomerBenefitGrantGitHubRepository) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantGitHubRepository) UnmarshalJSON ¶

func (c *CustomerBenefitGrantGitHubRepository) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantGitHubRepositoryPropertiesUpdate ¶

type CustomerBenefitGrantGitHubRepositoryPropertiesUpdate struct {
	AccountID *string `json:"account_id"`
}

func (*CustomerBenefitGrantGitHubRepositoryPropertiesUpdate) GetAccountID ¶

func (CustomerBenefitGrantGitHubRepositoryPropertiesUpdate) MarshalJSON ¶ added in v0.8.4

func (*CustomerBenefitGrantGitHubRepositoryPropertiesUpdate) UnmarshalJSON ¶ added in v0.8.4

type CustomerBenefitGrantGitHubRepositoryUpdate ¶

type CustomerBenefitGrantGitHubRepositoryUpdate struct {
	Properties CustomerBenefitGrantGitHubRepositoryPropertiesUpdate `json:"properties"`
	// contains filtered or unexported fields
}

func (*CustomerBenefitGrantGitHubRepositoryUpdate) GetBenefitType ¶

func (*CustomerBenefitGrantGitHubRepositoryUpdate) GetProperties ¶

func (CustomerBenefitGrantGitHubRepositoryUpdate) MarshalJSON ¶

func (*CustomerBenefitGrantGitHubRepositoryUpdate) UnmarshalJSON ¶

func (c *CustomerBenefitGrantGitHubRepositoryUpdate) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantLicenseKeys ¶

type CustomerBenefitGrantLicenseKeys struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID             string                            `json:"id"`
	GrantedAt      *time.Time                        `json:"granted_at"`
	RevokedAt      *time.Time                        `json:"revoked_at"`
	CustomerID     string                            `json:"customer_id"`
	MemberID       *string                           `json:"member_id,omitempty"`
	BenefitID      string                            `json:"benefit_id"`
	SubscriptionID *string                           `json:"subscription_id"`
	OrderID        *string                           `json:"order_id"`
	IsGranted      bool                              `json:"is_granted"`
	IsRevoked      bool                              `json:"is_revoked"`
	Error          *BenefitGrantError                `json:"error,omitempty"`
	Customer       CustomerPortalCustomer            `json:"customer"`
	Benefit        BenefitLicenseKeysSubscriber      `json:"benefit"`
	Properties     BenefitGrantLicenseKeysProperties `json:"properties"`
}

func (*CustomerBenefitGrantLicenseKeys) GetBenefit ¶

func (*CustomerBenefitGrantLicenseKeys) GetBenefitID ¶

func (c *CustomerBenefitGrantLicenseKeys) GetBenefitID() string

func (*CustomerBenefitGrantLicenseKeys) GetCreatedAt ¶

func (c *CustomerBenefitGrantLicenseKeys) GetCreatedAt() time.Time

func (*CustomerBenefitGrantLicenseKeys) GetCustomer ¶

func (*CustomerBenefitGrantLicenseKeys) GetCustomerID ¶

func (c *CustomerBenefitGrantLicenseKeys) GetCustomerID() string

func (*CustomerBenefitGrantLicenseKeys) GetError ¶ added in v0.13.0

func (*CustomerBenefitGrantLicenseKeys) GetGrantedAt ¶

func (c *CustomerBenefitGrantLicenseKeys) GetGrantedAt() *time.Time

func (*CustomerBenefitGrantLicenseKeys) GetID ¶

func (*CustomerBenefitGrantLicenseKeys) GetIsGranted ¶

func (c *CustomerBenefitGrantLicenseKeys) GetIsGranted() bool

func (*CustomerBenefitGrantLicenseKeys) GetIsRevoked ¶

func (c *CustomerBenefitGrantLicenseKeys) GetIsRevoked() bool

func (*CustomerBenefitGrantLicenseKeys) GetMemberID ¶ added in v0.13.0

func (c *CustomerBenefitGrantLicenseKeys) GetMemberID() *string

func (*CustomerBenefitGrantLicenseKeys) GetModifiedAt ¶

func (c *CustomerBenefitGrantLicenseKeys) GetModifiedAt() *time.Time

func (*CustomerBenefitGrantLicenseKeys) GetOrderID ¶

func (c *CustomerBenefitGrantLicenseKeys) GetOrderID() *string

func (*CustomerBenefitGrantLicenseKeys) GetProperties ¶

func (*CustomerBenefitGrantLicenseKeys) GetRevokedAt ¶

func (c *CustomerBenefitGrantLicenseKeys) GetRevokedAt() *time.Time

func (*CustomerBenefitGrantLicenseKeys) GetSubscriptionID ¶

func (c *CustomerBenefitGrantLicenseKeys) GetSubscriptionID() *string

func (CustomerBenefitGrantLicenseKeys) MarshalJSON ¶

func (c CustomerBenefitGrantLicenseKeys) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantLicenseKeys) UnmarshalJSON ¶

func (c *CustomerBenefitGrantLicenseKeys) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantLicenseKeysUpdate ¶

type CustomerBenefitGrantLicenseKeysUpdate struct {
	// contains filtered or unexported fields
}

func (*CustomerBenefitGrantLicenseKeysUpdate) GetBenefitType ¶

func (c *CustomerBenefitGrantLicenseKeysUpdate) GetBenefitType() string

func (CustomerBenefitGrantLicenseKeysUpdate) MarshalJSON ¶

func (c CustomerBenefitGrantLicenseKeysUpdate) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantLicenseKeysUpdate) UnmarshalJSON ¶

func (c *CustomerBenefitGrantLicenseKeysUpdate) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantMeterCredit ¶ added in v0.4.10

type CustomerBenefitGrantMeterCredit struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID             string                            `json:"id"`
	GrantedAt      *time.Time                        `json:"granted_at"`
	RevokedAt      *time.Time                        `json:"revoked_at"`
	CustomerID     string                            `json:"customer_id"`
	MemberID       *string                           `json:"member_id,omitempty"`
	BenefitID      string                            `json:"benefit_id"`
	SubscriptionID *string                           `json:"subscription_id"`
	OrderID        *string                           `json:"order_id"`
	IsGranted      bool                              `json:"is_granted"`
	IsRevoked      bool                              `json:"is_revoked"`
	Error          *BenefitGrantError                `json:"error,omitempty"`
	Customer       CustomerPortalCustomer            `json:"customer"`
	Benefit        BenefitMeterCreditSubscriber      `json:"benefit"`
	Properties     BenefitGrantMeterCreditProperties `json:"properties"`
}

func (*CustomerBenefitGrantMeterCredit) GetBenefit ¶ added in v0.4.10

func (*CustomerBenefitGrantMeterCredit) GetBenefitID ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCredit) GetBenefitID() string

func (*CustomerBenefitGrantMeterCredit) GetCreatedAt ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCredit) GetCreatedAt() time.Time

func (*CustomerBenefitGrantMeterCredit) GetCustomer ¶ added in v0.4.10

func (*CustomerBenefitGrantMeterCredit) GetCustomerID ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCredit) GetCustomerID() string

func (*CustomerBenefitGrantMeterCredit) GetError ¶ added in v0.13.0

func (*CustomerBenefitGrantMeterCredit) GetGrantedAt ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCredit) GetGrantedAt() *time.Time

func (*CustomerBenefitGrantMeterCredit) GetID ¶ added in v0.4.10

func (*CustomerBenefitGrantMeterCredit) GetIsGranted ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCredit) GetIsGranted() bool

func (*CustomerBenefitGrantMeterCredit) GetIsRevoked ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCredit) GetIsRevoked() bool

func (*CustomerBenefitGrantMeterCredit) GetMemberID ¶ added in v0.13.0

func (c *CustomerBenefitGrantMeterCredit) GetMemberID() *string

func (*CustomerBenefitGrantMeterCredit) GetModifiedAt ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCredit) GetModifiedAt() *time.Time

func (*CustomerBenefitGrantMeterCredit) GetOrderID ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCredit) GetOrderID() *string

func (*CustomerBenefitGrantMeterCredit) GetProperties ¶ added in v0.4.10

func (*CustomerBenefitGrantMeterCredit) GetRevokedAt ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCredit) GetRevokedAt() *time.Time

func (*CustomerBenefitGrantMeterCredit) GetSubscriptionID ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCredit) GetSubscriptionID() *string

func (CustomerBenefitGrantMeterCredit) MarshalJSON ¶ added in v0.4.10

func (c CustomerBenefitGrantMeterCredit) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantMeterCredit) UnmarshalJSON ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCredit) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantMeterCreditUpdate ¶ added in v0.4.10

type CustomerBenefitGrantMeterCreditUpdate struct {
	// contains filtered or unexported fields
}

func (*CustomerBenefitGrantMeterCreditUpdate) GetBenefitType ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCreditUpdate) GetBenefitType() string

func (CustomerBenefitGrantMeterCreditUpdate) MarshalJSON ¶ added in v0.4.10

func (c CustomerBenefitGrantMeterCreditUpdate) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantMeterCreditUpdate) UnmarshalJSON ¶ added in v0.4.10

func (c *CustomerBenefitGrantMeterCreditUpdate) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantSortProperty ¶

type CustomerBenefitGrantSortProperty string
const (
	CustomerBenefitGrantSortPropertyGrantedAt           CustomerBenefitGrantSortProperty = "granted_at"
	CustomerBenefitGrantSortPropertyMinusGrantedAt      CustomerBenefitGrantSortProperty = "-granted_at"
	CustomerBenefitGrantSortPropertyType                CustomerBenefitGrantSortProperty = "type"
	CustomerBenefitGrantSortPropertyMinusType           CustomerBenefitGrantSortProperty = "-type"
	CustomerBenefitGrantSortPropertyOrganization        CustomerBenefitGrantSortProperty = "organization"
	CustomerBenefitGrantSortPropertyMinusOrganization   CustomerBenefitGrantSortProperty = "-organization"
	CustomerBenefitGrantSortPropertyProductBenefit      CustomerBenefitGrantSortProperty = "product_benefit"
	CustomerBenefitGrantSortPropertyMinusProductBenefit CustomerBenefitGrantSortProperty = "-product_benefit"
)

func (CustomerBenefitGrantSortProperty) ToPointer ¶

func (*CustomerBenefitGrantSortProperty) UnmarshalJSON ¶

func (e *CustomerBenefitGrantSortProperty) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantType ¶

type CustomerBenefitGrantType string
const (
	CustomerBenefitGrantTypeCustomerBenefitGrantDiscord          CustomerBenefitGrantType = "CustomerBenefitGrantDiscord"
	CustomerBenefitGrantTypeCustomerBenefitGrantGitHubRepository CustomerBenefitGrantType = "CustomerBenefitGrantGitHubRepository"
	CustomerBenefitGrantTypeCustomerBenefitGrantDownloadables    CustomerBenefitGrantType = "CustomerBenefitGrantDownloadables"
	CustomerBenefitGrantTypeCustomerBenefitGrantLicenseKeys      CustomerBenefitGrantType = "CustomerBenefitGrantLicenseKeys"
	CustomerBenefitGrantTypeCustomerBenefitGrantCustom           CustomerBenefitGrantType = "CustomerBenefitGrantCustom"
	CustomerBenefitGrantTypeCustomerBenefitGrantMeterCredit      CustomerBenefitGrantType = "CustomerBenefitGrantMeterCredit"
	CustomerBenefitGrantTypeCustomerBenefitGrantFeatureFlag      CustomerBenefitGrantType = "CustomerBenefitGrantFeatureFlag"
)

type CustomerBenefitGrantUpdate ¶

type CustomerBenefitGrantUpdate struct {
	CustomerBenefitGrantDiscordUpdate          *CustomerBenefitGrantDiscordUpdate          `queryParam:"inline" union:"member"`
	CustomerBenefitGrantGitHubRepositoryUpdate *CustomerBenefitGrantGitHubRepositoryUpdate `queryParam:"inline" union:"member"`
	CustomerBenefitGrantDownloadablesUpdate    *CustomerBenefitGrantDownloadablesUpdate    `queryParam:"inline" union:"member"`
	CustomerBenefitGrantLicenseKeysUpdate      *CustomerBenefitGrantLicenseKeysUpdate      `queryParam:"inline" union:"member"`
	CustomerBenefitGrantCustomUpdate           *CustomerBenefitGrantCustomUpdate           `queryParam:"inline" union:"member"`
	CustomerBenefitGrantMeterCreditUpdate      *CustomerBenefitGrantMeterCreditUpdate      `queryParam:"inline" union:"member"`
	CustomerBenefitGrantFeatureFlagUpdate      *CustomerBenefitGrantFeatureFlagUpdate      `queryParam:"inline" union:"member"`

	Type CustomerBenefitGrantUpdateType
}

func CreateCustomerBenefitGrantUpdateDownloadables ¶

func CreateCustomerBenefitGrantUpdateDownloadables(downloadables CustomerBenefitGrantDownloadablesUpdate) CustomerBenefitGrantUpdate

func CreateCustomerBenefitGrantUpdateFeatureFlag ¶ added in v0.15.0

func CreateCustomerBenefitGrantUpdateFeatureFlag(featureFlag CustomerBenefitGrantFeatureFlagUpdate) CustomerBenefitGrantUpdate

func CreateCustomerBenefitGrantUpdateGithubRepository ¶

func CreateCustomerBenefitGrantUpdateGithubRepository(githubRepository CustomerBenefitGrantGitHubRepositoryUpdate) CustomerBenefitGrantUpdate

func CreateCustomerBenefitGrantUpdateMeterCredit ¶ added in v0.4.10

func CreateCustomerBenefitGrantUpdateMeterCredit(meterCredit CustomerBenefitGrantMeterCreditUpdate) CustomerBenefitGrantUpdate

func (CustomerBenefitGrantUpdate) MarshalJSON ¶

func (u CustomerBenefitGrantUpdate) MarshalJSON() ([]byte, error)

func (*CustomerBenefitGrantUpdate) UnmarshalJSON ¶

func (u *CustomerBenefitGrantUpdate) UnmarshalJSON(data []byte) error

type CustomerBenefitGrantUpdateType ¶

type CustomerBenefitGrantUpdateType string
const (
	CustomerBenefitGrantUpdateTypeCustom           CustomerBenefitGrantUpdateType = "custom"
	CustomerBenefitGrantUpdateTypeDiscord          CustomerBenefitGrantUpdateType = "discord"
	CustomerBenefitGrantUpdateTypeDownloadables    CustomerBenefitGrantUpdateType = "downloadables"
	CustomerBenefitGrantUpdateTypeFeatureFlag      CustomerBenefitGrantUpdateType = "feature_flag"
	CustomerBenefitGrantUpdateTypeGithubRepository CustomerBenefitGrantUpdateType = "github_repository"
	CustomerBenefitGrantUpdateTypeLicenseKeys      CustomerBenefitGrantUpdateType = "license_keys"
	CustomerBenefitGrantUpdateTypeMeterCredit      CustomerBenefitGrantUpdateType = "meter_credit"
)

type CustomerCancellationReason ¶ added in v0.1.1

type CustomerCancellationReason string
const (
	CustomerCancellationReasonCustomerService CustomerCancellationReason = "customer_service"
	CustomerCancellationReasonLowQuality      CustomerCancellationReason = "low_quality"
	CustomerCancellationReasonMissingFeatures CustomerCancellationReason = "missing_features"
	CustomerCancellationReasonSwitchedService CustomerCancellationReason = "switched_service"
	CustomerCancellationReasonTooComplex      CustomerCancellationReason = "too_complex"
	CustomerCancellationReasonTooExpensive    CustomerCancellationReason = "too_expensive"
	CustomerCancellationReasonUnused          CustomerCancellationReason = "unused"
	CustomerCancellationReasonOther           CustomerCancellationReason = "other"
)

func (CustomerCancellationReason) ToPointer ¶ added in v0.1.1

func (*CustomerCancellationReason) UnmarshalJSON ¶ added in v0.1.1

func (e *CustomerCancellationReason) UnmarshalJSON(data []byte) error

type CustomerCreate ¶

type CustomerCreate struct {
	CustomerIndividualCreate *CustomerIndividualCreate `queryParam:"inline" union:"member"`
	CustomerTeamCreate       *CustomerTeamCreate       `queryParam:"inline" union:"member"`

	Type CustomerCreateType
}

func CreateCustomerCreateCustomerIndividualCreate ¶ added in v0.16.0

func CreateCustomerCreateCustomerIndividualCreate(customerIndividualCreate CustomerIndividualCreate) CustomerCreate

func CreateCustomerCreateCustomerTeamCreate ¶ added in v0.16.0

func CreateCustomerCreateCustomerTeamCreate(customerTeamCreate CustomerTeamCreate) CustomerCreate

func (CustomerCreate) MarshalJSON ¶ added in v0.16.0

func (u CustomerCreate) MarshalJSON() ([]byte, error)

func (*CustomerCreate) UnmarshalJSON ¶ added in v0.16.0

func (u *CustomerCreate) UnmarshalJSON(data []byte) error

type CustomerCreateType ¶ added in v0.16.0

type CustomerCreateType string
const (
	CustomerCreateTypeCustomerIndividualCreate CustomerCreateType = "CustomerIndividualCreate"
	CustomerCreateTypeCustomerTeamCreate       CustomerCreateType = "CustomerTeamCreate"
)

type CustomerCreatedEvent ¶ added in v0.12.0

type CustomerCreatedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata CustomerCreatedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

CustomerCreatedEvent - An event created by Polar when a customer is created.

func (*CustomerCreatedEvent) GetChildCount ¶ added in v0.12.0

func (c *CustomerCreatedEvent) GetChildCount() *int64

func (*CustomerCreatedEvent) GetCustomer ¶ added in v0.12.0

func (c *CustomerCreatedEvent) GetCustomer() *Customer

func (*CustomerCreatedEvent) GetCustomerID ¶ added in v0.12.0

func (c *CustomerCreatedEvent) GetCustomerID() *string

func (*CustomerCreatedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (c *CustomerCreatedEvent) GetCustomerIndividual() *CustomerIndividual

func (*CustomerCreatedEvent) GetCustomerTeam ¶ added in v0.16.0

func (c *CustomerCreatedEvent) GetCustomerTeam() *CustomerTeam

func (*CustomerCreatedEvent) GetExternalCustomerID ¶ added in v0.12.0

func (c *CustomerCreatedEvent) GetExternalCustomerID() *string

func (*CustomerCreatedEvent) GetExternalMemberID ¶ added in v0.13.0

func (c *CustomerCreatedEvent) GetExternalMemberID() *string

func (*CustomerCreatedEvent) GetID ¶ added in v0.12.0

func (c *CustomerCreatedEvent) GetID() string

func (*CustomerCreatedEvent) GetLabel ¶ added in v0.13.0

func (c *CustomerCreatedEvent) GetLabel() string

func (*CustomerCreatedEvent) GetMemberID ¶ added in v0.13.0

func (c *CustomerCreatedEvent) GetMemberID() *string

func (*CustomerCreatedEvent) GetMetadata ¶ added in v0.12.0

func (*CustomerCreatedEvent) GetName ¶ added in v0.12.0

func (c *CustomerCreatedEvent) GetName() string

func (*CustomerCreatedEvent) GetOrganizationID ¶ added in v0.12.0

func (c *CustomerCreatedEvent) GetOrganizationID() string

func (*CustomerCreatedEvent) GetParentID ¶ added in v0.13.0

func (c *CustomerCreatedEvent) GetParentID() *string

func (*CustomerCreatedEvent) GetSource ¶ added in v0.12.0

func (c *CustomerCreatedEvent) GetSource() string

func (*CustomerCreatedEvent) GetTimestamp ¶ added in v0.12.0

func (c *CustomerCreatedEvent) GetTimestamp() time.Time

func (CustomerCreatedEvent) MarshalJSON ¶ added in v0.12.0

func (c CustomerCreatedEvent) MarshalJSON() ([]byte, error)

func (*CustomerCreatedEvent) UnmarshalJSON ¶ added in v0.12.0

func (c *CustomerCreatedEvent) UnmarshalJSON(data []byte) error

type CustomerCreatedMetadata ¶ added in v0.12.0

type CustomerCreatedMetadata struct {
	CustomerID         string  `json:"customer_id"`
	CustomerEmail      *string `json:"customer_email"`
	CustomerName       *string `json:"customer_name"`
	CustomerExternalID *string `json:"customer_external_id"`
}

func (*CustomerCreatedMetadata) GetCustomerEmail ¶ added in v0.12.0

func (c *CustomerCreatedMetadata) GetCustomerEmail() *string

func (*CustomerCreatedMetadata) GetCustomerExternalID ¶ added in v0.12.0

func (c *CustomerCreatedMetadata) GetCustomerExternalID() *string

func (*CustomerCreatedMetadata) GetCustomerID ¶ added in v0.12.0

func (c *CustomerCreatedMetadata) GetCustomerID() string

func (*CustomerCreatedMetadata) GetCustomerName ¶ added in v0.12.0

func (c *CustomerCreatedMetadata) GetCustomerName() *string

func (CustomerCreatedMetadata) MarshalJSON ¶ added in v0.12.0

func (c CustomerCreatedMetadata) MarshalJSON() ([]byte, error)

func (*CustomerCreatedMetadata) UnmarshalJSON ¶ added in v0.12.0

func (c *CustomerCreatedMetadata) UnmarshalJSON(data []byte) error

type CustomerCustomerMeter ¶ added in v0.4.10

type CustomerCustomerMeter struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the customer.
	CustomerID string `json:"customer_id"`
	// The ID of the meter.
	MeterID string `json:"meter_id"`
	// The number of consumed units.
	ConsumedUnits float64 `json:"consumed_units"`
	// The number of credited units.
	CreditedUnits int64 `json:"credited_units"`
	// The balance of the meter, i.e. the difference between credited and consumed units.
	Balance float64                    `json:"balance"`
	Meter   CustomerCustomerMeterMeter `json:"meter"`
}

func (*CustomerCustomerMeter) GetBalance ¶ added in v0.4.10

func (c *CustomerCustomerMeter) GetBalance() float64

func (*CustomerCustomerMeter) GetConsumedUnits ¶ added in v0.4.10

func (c *CustomerCustomerMeter) GetConsumedUnits() float64

func (*CustomerCustomerMeter) GetCreatedAt ¶ added in v0.4.10

func (c *CustomerCustomerMeter) GetCreatedAt() time.Time

func (*CustomerCustomerMeter) GetCreditedUnits ¶ added in v0.4.10

func (c *CustomerCustomerMeter) GetCreditedUnits() int64

func (*CustomerCustomerMeter) GetCustomerID ¶ added in v0.4.10

func (c *CustomerCustomerMeter) GetCustomerID() string

func (*CustomerCustomerMeter) GetID ¶ added in v0.4.10

func (c *CustomerCustomerMeter) GetID() string

func (*CustomerCustomerMeter) GetMeter ¶ added in v0.4.10

func (*CustomerCustomerMeter) GetMeterID ¶ added in v0.4.10

func (c *CustomerCustomerMeter) GetMeterID() string

func (*CustomerCustomerMeter) GetModifiedAt ¶ added in v0.4.10

func (c *CustomerCustomerMeter) GetModifiedAt() *time.Time

func (CustomerCustomerMeter) MarshalJSON ¶ added in v0.4.10

func (c CustomerCustomerMeter) MarshalJSON() ([]byte, error)

func (*CustomerCustomerMeter) UnmarshalJSON ¶ added in v0.4.10

func (c *CustomerCustomerMeter) UnmarshalJSON(data []byte) error

type CustomerCustomerMeterMeter ¶ added in v0.4.10

type CustomerCustomerMeterMeter struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The name of the meter. Will be shown on customer's invoices and usage.
	Name string `json:"name"`
}

func (*CustomerCustomerMeterMeter) GetCreatedAt ¶ added in v0.4.10

func (c *CustomerCustomerMeterMeter) GetCreatedAt() time.Time

func (*CustomerCustomerMeterMeter) GetID ¶ added in v0.4.10

func (*CustomerCustomerMeterMeter) GetModifiedAt ¶ added in v0.4.10

func (c *CustomerCustomerMeterMeter) GetModifiedAt() *time.Time

func (*CustomerCustomerMeterMeter) GetName ¶ added in v0.4.10

func (c *CustomerCustomerMeterMeter) GetName() string

func (CustomerCustomerMeterMeter) MarshalJSON ¶ added in v0.4.10

func (c CustomerCustomerMeterMeter) MarshalJSON() ([]byte, error)

func (*CustomerCustomerMeterMeter) UnmarshalJSON ¶ added in v0.4.10

func (c *CustomerCustomerMeterMeter) UnmarshalJSON(data []byte) error

type CustomerCustomerMeterSortProperty ¶ added in v0.4.10

type CustomerCustomerMeterSortProperty string
const (
	CustomerCustomerMeterSortPropertyCreatedAt          CustomerCustomerMeterSortProperty = "created_at"
	CustomerCustomerMeterSortPropertyMinusCreatedAt     CustomerCustomerMeterSortProperty = "-created_at"
	CustomerCustomerMeterSortPropertyModifiedAt         CustomerCustomerMeterSortProperty = "modified_at"
	CustomerCustomerMeterSortPropertyMinusModifiedAt    CustomerCustomerMeterSortProperty = "-modified_at"
	CustomerCustomerMeterSortPropertyMeterID            CustomerCustomerMeterSortProperty = "meter_id"
	CustomerCustomerMeterSortPropertyMinusMeterID       CustomerCustomerMeterSortProperty = "-meter_id"
	CustomerCustomerMeterSortPropertyMeterName          CustomerCustomerMeterSortProperty = "meter_name"
	CustomerCustomerMeterSortPropertyMinusMeterName     CustomerCustomerMeterSortProperty = "-meter_name"
	CustomerCustomerMeterSortPropertyConsumedUnits      CustomerCustomerMeterSortProperty = "consumed_units"
	CustomerCustomerMeterSortPropertyMinusConsumedUnits CustomerCustomerMeterSortProperty = "-consumed_units"
	CustomerCustomerMeterSortPropertyCreditedUnits      CustomerCustomerMeterSortProperty = "credited_units"
	CustomerCustomerMeterSortPropertyMinusCreditedUnits CustomerCustomerMeterSortProperty = "-credited_units"
	CustomerCustomerMeterSortPropertyBalance            CustomerCustomerMeterSortProperty = "balance"
	CustomerCustomerMeterSortPropertyMinusBalance       CustomerCustomerMeterSortProperty = "-balance"
)

func (CustomerCustomerMeterSortProperty) ToPointer ¶ added in v0.4.10

func (*CustomerCustomerMeterSortProperty) UnmarshalJSON ¶ added in v0.4.10

func (e *CustomerCustomerMeterSortProperty) UnmarshalJSON(data []byte) error

type CustomerCustomerSession ¶ added in v0.10.1

type CustomerCustomerSession struct {
	ExpiresAt time.Time `json:"expires_at"`
	ReturnURL *string   `json:"return_url"`
}

func (*CustomerCustomerSession) GetExpiresAt ¶ added in v0.10.1

func (c *CustomerCustomerSession) GetExpiresAt() time.Time

func (*CustomerCustomerSession) GetReturnURL ¶ added in v0.10.1

func (c *CustomerCustomerSession) GetReturnURL() *string

func (CustomerCustomerSession) MarshalJSON ¶ added in v0.10.1

func (c CustomerCustomerSession) MarshalJSON() ([]byte, error)

func (*CustomerCustomerSession) UnmarshalJSON ¶ added in v0.10.1

func (c *CustomerCustomerSession) UnmarshalJSON(data []byte) error

type CustomerDeletedEvent ¶ added in v0.12.0

type CustomerDeletedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata CustomerDeletedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

CustomerDeletedEvent - An event created by Polar when a customer is deleted.

func (*CustomerDeletedEvent) GetChildCount ¶ added in v0.12.0

func (c *CustomerDeletedEvent) GetChildCount() *int64

func (*CustomerDeletedEvent) GetCustomer ¶ added in v0.12.0

func (c *CustomerDeletedEvent) GetCustomer() *Customer

func (*CustomerDeletedEvent) GetCustomerID ¶ added in v0.12.0

func (c *CustomerDeletedEvent) GetCustomerID() *string

func (*CustomerDeletedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (c *CustomerDeletedEvent) GetCustomerIndividual() *CustomerIndividual

func (*CustomerDeletedEvent) GetCustomerTeam ¶ added in v0.16.0

func (c *CustomerDeletedEvent) GetCustomerTeam() *CustomerTeam

func (*CustomerDeletedEvent) GetExternalCustomerID ¶ added in v0.12.0

func (c *CustomerDeletedEvent) GetExternalCustomerID() *string

func (*CustomerDeletedEvent) GetExternalMemberID ¶ added in v0.13.0

func (c *CustomerDeletedEvent) GetExternalMemberID() *string

func (*CustomerDeletedEvent) GetID ¶ added in v0.12.0

func (c *CustomerDeletedEvent) GetID() string

func (*CustomerDeletedEvent) GetLabel ¶ added in v0.13.0

func (c *CustomerDeletedEvent) GetLabel() string

func (*CustomerDeletedEvent) GetMemberID ¶ added in v0.13.0

func (c *CustomerDeletedEvent) GetMemberID() *string

func (*CustomerDeletedEvent) GetMetadata ¶ added in v0.12.0

func (*CustomerDeletedEvent) GetName ¶ added in v0.12.0

func (c *CustomerDeletedEvent) GetName() string

func (*CustomerDeletedEvent) GetOrganizationID ¶ added in v0.12.0

func (c *CustomerDeletedEvent) GetOrganizationID() string

func (*CustomerDeletedEvent) GetParentID ¶ added in v0.13.0

func (c *CustomerDeletedEvent) GetParentID() *string

func (*CustomerDeletedEvent) GetSource ¶ added in v0.12.0

func (c *CustomerDeletedEvent) GetSource() string

func (*CustomerDeletedEvent) GetTimestamp ¶ added in v0.12.0

func (c *CustomerDeletedEvent) GetTimestamp() time.Time

func (CustomerDeletedEvent) MarshalJSON ¶ added in v0.12.0

func (c CustomerDeletedEvent) MarshalJSON() ([]byte, error)

func (*CustomerDeletedEvent) UnmarshalJSON ¶ added in v0.12.0

func (c *CustomerDeletedEvent) UnmarshalJSON(data []byte) error

type CustomerDeletedMetadata ¶ added in v0.12.0

type CustomerDeletedMetadata struct {
	CustomerID         string  `json:"customer_id"`
	CustomerEmail      *string `json:"customer_email"`
	CustomerName       *string `json:"customer_name"`
	CustomerExternalID *string `json:"customer_external_id"`
}

func (*CustomerDeletedMetadata) GetCustomerEmail ¶ added in v0.12.0

func (c *CustomerDeletedMetadata) GetCustomerEmail() *string

func (*CustomerDeletedMetadata) GetCustomerExternalID ¶ added in v0.12.0

func (c *CustomerDeletedMetadata) GetCustomerExternalID() *string

func (*CustomerDeletedMetadata) GetCustomerID ¶ added in v0.12.0

func (c *CustomerDeletedMetadata) GetCustomerID() string

func (*CustomerDeletedMetadata) GetCustomerName ¶ added in v0.12.0

func (c *CustomerDeletedMetadata) GetCustomerName() *string

func (CustomerDeletedMetadata) MarshalJSON ¶ added in v0.12.0

func (c CustomerDeletedMetadata) MarshalJSON() ([]byte, error)

func (*CustomerDeletedMetadata) UnmarshalJSON ¶ added in v0.12.0

func (c *CustomerDeletedMetadata) UnmarshalJSON(data []byte) error

type CustomerIndividual ¶ added in v0.16.0

type CustomerIndividual struct {
	// The ID of the customer.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time                    `json:"modified_at"`
	Metadata   map[string]MetadataOutputType `json:"metadata"`
	// The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
	ExternalID *string `json:"external_id,omitempty"`
	// The email address of the customer. This must be unique within the organization.
	Email string `json:"email"`
	// Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.
	EmailVerified bool `json:"email_verified"`

	// The name of the customer.
	Name           *string                    `json:"name"`
	BillingAddress *Address                   `json:"billing_address"`
	TaxID          []*CustomerIndividualTaxID `json:"tax_id"`
	Locale         *string                    `json:"locale,omitempty"`
	// The ID of the organization owning the customer.
	OrganizationID string `json:"organization_id"`
	// Timestamp for when the customer was soft deleted.
	DeletedAt *time.Time `json:"deleted_at"`
	AvatarURL string     `json:"avatar_url"`
	// contains filtered or unexported fields
}

CustomerIndividual - A customer in an organization.

func (*CustomerIndividual) GetAvatarURL ¶ added in v0.16.0

func (c *CustomerIndividual) GetAvatarURL() string

func (*CustomerIndividual) GetBillingAddress ¶ added in v0.16.0

func (c *CustomerIndividual) GetBillingAddress() *Address

func (*CustomerIndividual) GetCreatedAt ¶ added in v0.16.0

func (c *CustomerIndividual) GetCreatedAt() time.Time

func (*CustomerIndividual) GetDeletedAt ¶ added in v0.16.0

func (c *CustomerIndividual) GetDeletedAt() *time.Time

func (*CustomerIndividual) GetEmail ¶ added in v0.16.0

func (c *CustomerIndividual) GetEmail() string

func (*CustomerIndividual) GetEmailVerified ¶ added in v0.16.0

func (c *CustomerIndividual) GetEmailVerified() bool

func (*CustomerIndividual) GetExternalID ¶ added in v0.16.0

func (c *CustomerIndividual) GetExternalID() *string

func (*CustomerIndividual) GetID ¶ added in v0.16.0

func (c *CustomerIndividual) GetID() string

func (*CustomerIndividual) GetLocale ¶ added in v0.16.0

func (c *CustomerIndividual) GetLocale() *string

func (*CustomerIndividual) GetMetadata ¶ added in v0.16.0

func (c *CustomerIndividual) GetMetadata() map[string]MetadataOutputType

func (*CustomerIndividual) GetModifiedAt ¶ added in v0.16.0

func (c *CustomerIndividual) GetModifiedAt() *time.Time

func (*CustomerIndividual) GetName ¶ added in v0.16.0

func (c *CustomerIndividual) GetName() *string

func (*CustomerIndividual) GetOrganizationID ¶ added in v0.16.0

func (c *CustomerIndividual) GetOrganizationID() string

func (*CustomerIndividual) GetTaxID ¶ added in v0.16.0

func (*CustomerIndividual) GetType ¶ added in v0.16.0

func (c *CustomerIndividual) GetType() string

func (CustomerIndividual) MarshalJSON ¶ added in v0.16.0

func (c CustomerIndividual) MarshalJSON() ([]byte, error)

func (*CustomerIndividual) UnmarshalJSON ¶ added in v0.16.0

func (c *CustomerIndividual) UnmarshalJSON(data []byte) error

type CustomerIndividualCreate ¶ added in v0.16.0

type CustomerIndividualCreate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomerIndividualCreateMetadata `json:"metadata,omitempty"`
	// The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
	ExternalID     *string       `json:"external_id,omitempty"`
	Name           *string       `json:"name,omitempty"`
	BillingAddress *AddressInput `json:"billing_address,omitempty"`
	TaxID          *string       `json:"tax_id,omitempty"`
	Locale         *string       `json:"locale,omitempty"`
	// The ID of the organization owning the customer. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
	// Optional owner member to create with the customer. If not provided, an owner member will be automatically created using the customer's email and name.
	Owner *MemberOwnerCreate `json:"owner,omitempty"`

	// The email address of the customer. This must be unique within the organization.
	Email string `json:"email"`
	// contains filtered or unexported fields
}

func (*CustomerIndividualCreate) GetBillingAddress ¶ added in v0.16.0

func (c *CustomerIndividualCreate) GetBillingAddress() *AddressInput

func (*CustomerIndividualCreate) GetEmail ¶ added in v0.16.0

func (c *CustomerIndividualCreate) GetEmail() string

func (*CustomerIndividualCreate) GetExternalID ¶ added in v0.16.0

func (c *CustomerIndividualCreate) GetExternalID() *string

func (*CustomerIndividualCreate) GetLocale ¶ added in v0.16.0

func (c *CustomerIndividualCreate) GetLocale() *string

func (*CustomerIndividualCreate) GetMetadata ¶ added in v0.16.0

func (*CustomerIndividualCreate) GetName ¶ added in v0.16.0

func (c *CustomerIndividualCreate) GetName() *string

func (*CustomerIndividualCreate) GetOrganizationID ¶ added in v0.16.0

func (c *CustomerIndividualCreate) GetOrganizationID() *string

func (*CustomerIndividualCreate) GetOwner ¶ added in v0.16.0

func (*CustomerIndividualCreate) GetTaxID ¶ added in v0.16.0

func (c *CustomerIndividualCreate) GetTaxID() *string

func (*CustomerIndividualCreate) GetType ¶ added in v0.16.0

func (c *CustomerIndividualCreate) GetType() *string

func (CustomerIndividualCreate) MarshalJSON ¶ added in v0.16.0

func (c CustomerIndividualCreate) MarshalJSON() ([]byte, error)

func (*CustomerIndividualCreate) UnmarshalJSON ¶ added in v0.16.0

func (c *CustomerIndividualCreate) UnmarshalJSON(data []byte) error

type CustomerIndividualCreateMetadata ¶ added in v0.16.0

type CustomerIndividualCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomerIndividualCreateMetadataType
}

func CreateCustomerIndividualCreateMetadataBoolean ¶ added in v0.16.0

func CreateCustomerIndividualCreateMetadataBoolean(boolean bool) CustomerIndividualCreateMetadata

func CreateCustomerIndividualCreateMetadataInteger ¶ added in v0.16.0

func CreateCustomerIndividualCreateMetadataInteger(integer int64) CustomerIndividualCreateMetadata

func CreateCustomerIndividualCreateMetadataNumber ¶ added in v0.16.0

func CreateCustomerIndividualCreateMetadataNumber(number float64) CustomerIndividualCreateMetadata

func CreateCustomerIndividualCreateMetadataStr ¶ added in v0.16.0

func CreateCustomerIndividualCreateMetadataStr(str string) CustomerIndividualCreateMetadata

func (CustomerIndividualCreateMetadata) MarshalJSON ¶ added in v0.16.0

func (u CustomerIndividualCreateMetadata) MarshalJSON() ([]byte, error)

func (*CustomerIndividualCreateMetadata) UnmarshalJSON ¶ added in v0.16.0

func (u *CustomerIndividualCreateMetadata) UnmarshalJSON(data []byte) error

type CustomerIndividualCreateMetadataType ¶ added in v0.16.0

type CustomerIndividualCreateMetadataType string
const (
	CustomerIndividualCreateMetadataTypeStr     CustomerIndividualCreateMetadataType = "str"
	CustomerIndividualCreateMetadataTypeInteger CustomerIndividualCreateMetadataType = "integer"
	CustomerIndividualCreateMetadataTypeNumber  CustomerIndividualCreateMetadataType = "number"
	CustomerIndividualCreateMetadataTypeBoolean CustomerIndividualCreateMetadataType = "boolean"
)

type CustomerIndividualTaxID ¶ added in v0.16.0

type CustomerIndividualTaxID struct {
	Str         *string      `queryParam:"inline" union:"member"`
	TaxIDFormat *TaxIDFormat `queryParam:"inline" union:"member"`

	Type CustomerIndividualTaxIDType
}

func CreateCustomerIndividualTaxIDStr ¶ added in v0.16.0

func CreateCustomerIndividualTaxIDStr(str string) CustomerIndividualTaxID

func CreateCustomerIndividualTaxIDTaxIDFormat ¶ added in v0.16.0

func CreateCustomerIndividualTaxIDTaxIDFormat(taxIDFormat TaxIDFormat) CustomerIndividualTaxID

func (CustomerIndividualTaxID) MarshalJSON ¶ added in v0.16.0

func (u CustomerIndividualTaxID) MarshalJSON() ([]byte, error)

func (*CustomerIndividualTaxID) UnmarshalJSON ¶ added in v0.16.0

func (u *CustomerIndividualTaxID) UnmarshalJSON(data []byte) error

type CustomerIndividualTaxIDType ¶ added in v0.16.0

type CustomerIndividualTaxIDType string
const (
	CustomerIndividualTaxIDTypeStr         CustomerIndividualTaxIDType = "str"
	CustomerIndividualTaxIDTypeTaxIDFormat CustomerIndividualTaxIDType = "TaxIDFormat"
)

type CustomerMetadata ¶

type CustomerMetadata struct {
	Str     *string `queryParam:"inline" union:"member"`
	Integer *int64  `queryParam:"inline" union:"member"`
	Boolean *bool   `queryParam:"inline" union:"member"`

	Type CustomerMetadataType
}

func CreateCustomerMetadataBoolean ¶

func CreateCustomerMetadataBoolean(boolean bool) CustomerMetadata

func CreateCustomerMetadataInteger ¶

func CreateCustomerMetadataInteger(integer int64) CustomerMetadata

func CreateCustomerMetadataStr ¶

func CreateCustomerMetadataStr(str string) CustomerMetadata

func (CustomerMetadata) MarshalJSON ¶

func (u CustomerMetadata) MarshalJSON() ([]byte, error)

func (*CustomerMetadata) UnmarshalJSON ¶

func (u *CustomerMetadata) UnmarshalJSON(data []byte) error

type CustomerMetadataType ¶

type CustomerMetadataType string
const (
	CustomerMetadataTypeStr     CustomerMetadataType = "str"
	CustomerMetadataTypeInteger CustomerMetadataType = "integer"
	CustomerMetadataTypeBoolean CustomerMetadataType = "boolean"
)

type CustomerMeter ¶ added in v0.4.10

type CustomerMeter struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the customer.
	CustomerID string `json:"customer_id"`
	// The ID of the meter.
	MeterID string `json:"meter_id"`
	// The number of consumed units.
	ConsumedUnits float64 `json:"consumed_units"`
	// The number of credited units.
	CreditedUnits int64 `json:"credited_units"`
	// The balance of the meter, i.e. the difference between credited and consumed units.
	Balance  float64  `json:"balance"`
	Customer Customer `json:"customer"`
	Meter    Meter    `json:"meter"`
}

CustomerMeter - An active customer meter, with current consumed and credited units.

func (*CustomerMeter) GetBalance ¶ added in v0.4.10

func (c *CustomerMeter) GetBalance() float64

func (*CustomerMeter) GetConsumedUnits ¶ added in v0.4.10

func (c *CustomerMeter) GetConsumedUnits() float64

func (*CustomerMeter) GetCreatedAt ¶ added in v0.4.10

func (c *CustomerMeter) GetCreatedAt() time.Time

func (*CustomerMeter) GetCreditedUnits ¶ added in v0.4.10

func (c *CustomerMeter) GetCreditedUnits() int64

func (*CustomerMeter) GetCustomer ¶ added in v0.4.10

func (c *CustomerMeter) GetCustomer() Customer

func (*CustomerMeter) GetCustomerID ¶ added in v0.4.10

func (c *CustomerMeter) GetCustomerID() string

func (*CustomerMeter) GetCustomerIndividual ¶ added in v0.16.0

func (c *CustomerMeter) GetCustomerIndividual() *CustomerIndividual

func (*CustomerMeter) GetCustomerTeam ¶ added in v0.16.0

func (c *CustomerMeter) GetCustomerTeam() *CustomerTeam

func (*CustomerMeter) GetID ¶ added in v0.4.10

func (c *CustomerMeter) GetID() string

func (*CustomerMeter) GetMeter ¶ added in v0.4.10

func (c *CustomerMeter) GetMeter() Meter

func (*CustomerMeter) GetMeterID ¶ added in v0.4.10

func (c *CustomerMeter) GetMeterID() string

func (*CustomerMeter) GetModifiedAt ¶ added in v0.4.10

func (c *CustomerMeter) GetModifiedAt() *time.Time

func (CustomerMeter) MarshalJSON ¶ added in v0.4.10

func (c CustomerMeter) MarshalJSON() ([]byte, error)

func (*CustomerMeter) UnmarshalJSON ¶ added in v0.4.10

func (c *CustomerMeter) UnmarshalJSON(data []byte) error

type CustomerMeterSortProperty ¶ added in v0.4.10

type CustomerMeterSortProperty string
const (
	CustomerMeterSortPropertyCreatedAt          CustomerMeterSortProperty = "created_at"
	CustomerMeterSortPropertyMinusCreatedAt     CustomerMeterSortProperty = "-created_at"
	CustomerMeterSortPropertyModifiedAt         CustomerMeterSortProperty = "modified_at"
	CustomerMeterSortPropertyMinusModifiedAt    CustomerMeterSortProperty = "-modified_at"
	CustomerMeterSortPropertyCustomerID         CustomerMeterSortProperty = "customer_id"
	CustomerMeterSortPropertyMinusCustomerID    CustomerMeterSortProperty = "-customer_id"
	CustomerMeterSortPropertyCustomerName       CustomerMeterSortProperty = "customer_name"
	CustomerMeterSortPropertyMinusCustomerName  CustomerMeterSortProperty = "-customer_name"
	CustomerMeterSortPropertyMeterID            CustomerMeterSortProperty = "meter_id"
	CustomerMeterSortPropertyMinusMeterID       CustomerMeterSortProperty = "-meter_id"
	CustomerMeterSortPropertyMeterName          CustomerMeterSortProperty = "meter_name"
	CustomerMeterSortPropertyMinusMeterName     CustomerMeterSortProperty = "-meter_name"
	CustomerMeterSortPropertyConsumedUnits      CustomerMeterSortProperty = "consumed_units"
	CustomerMeterSortPropertyMinusConsumedUnits CustomerMeterSortProperty = "-consumed_units"
	CustomerMeterSortPropertyCreditedUnits      CustomerMeterSortProperty = "credited_units"
	CustomerMeterSortPropertyMinusCreditedUnits CustomerMeterSortProperty = "-credited_units"
	CustomerMeterSortPropertyBalance            CustomerMeterSortProperty = "balance"
	CustomerMeterSortPropertyMinusBalance       CustomerMeterSortProperty = "-balance"
)

func (CustomerMeterSortProperty) ToPointer ¶ added in v0.4.10

func (*CustomerMeterSortProperty) UnmarshalJSON ¶ added in v0.4.10

func (e *CustomerMeterSortProperty) UnmarshalJSON(data []byte) error

type CustomerOrder ¶

type CustomerOrder struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time  `json:"modified_at"`
	Status     OrderStatus `json:"status"`
	// Whether the order has been paid for.
	Paid bool `json:"paid"`
	// Amount in cents, before discounts and taxes.
	SubtotalAmount int64 `json:"subtotal_amount"`
	// Discount amount in cents.
	DiscountAmount int64 `json:"discount_amount"`
	// Amount in cents, after discounts but before taxes.
	NetAmount int64 `json:"net_amount"`
	// Sales tax amount in cents.
	TaxAmount int64 `json:"tax_amount"`
	// Amount in cents, after discounts and taxes.
	TotalAmount int64 `json:"total_amount"`
	// Customer's balance amount applied to this invoice. Can increase the total amount paid, if the customer has a negative balance,  or decrease it, if the customer has a positive balance.Amount in cents.
	AppliedBalanceAmount int64 `json:"applied_balance_amount"`
	// Amount in cents that is due for this order.
	DueAmount int64 `json:"due_amount"`
	// Amount refunded in cents.
	RefundedAmount int64 `json:"refunded_amount"`
	// Sales tax refunded in cents.
	RefundedTaxAmount int64              `json:"refunded_tax_amount"`
	Currency          string             `json:"currency"`
	BillingReason     OrderBillingReason `json:"billing_reason"`
	// The name of the customer that should appear on the invoice.
	BillingName    *string  `json:"billing_name"`
	BillingAddress *Address `json:"billing_address"`
	// The invoice number associated with this order.
	InvoiceNumber string `json:"invoice_number"`
	// Whether an invoice has been generated for this order.
	IsInvoiceGenerated bool `json:"is_invoice_generated"`
	// Number of seats purchased (for seat-based one-time orders).
	Seats          *int64                     `json:"seats,omitempty"`
	CustomerID     string                     `json:"customer_id"`
	ProductID      *string                    `json:"product_id"`
	DiscountID     *string                    `json:"discount_id"`
	SubscriptionID *string                    `json:"subscription_id"`
	CheckoutID     *string                    `json:"checkout_id"`
	Product        *CustomerOrderProduct      `json:"product"`
	Subscription   *CustomerOrderSubscription `json:"subscription"`
	// Line items composing the order.
	Items []OrderItemSchema `json:"items"`
	// A summary description of the order.
	Description string `json:"description"`
	// When the next payment retry is scheduled
	NextPaymentAttemptAt *time.Time `json:"next_payment_attempt_at,omitempty"`
}

func (*CustomerOrder) GetAppliedBalanceAmount ¶ added in v0.10.0

func (c *CustomerOrder) GetAppliedBalanceAmount() int64

func (*CustomerOrder) GetBillingAddress ¶ added in v0.4.16

func (c *CustomerOrder) GetBillingAddress() *Address

func (*CustomerOrder) GetBillingName ¶ added in v0.5.0

func (c *CustomerOrder) GetBillingName() *string

func (*CustomerOrder) GetBillingReason ¶ added in v0.4.16

func (c *CustomerOrder) GetBillingReason() OrderBillingReason

func (*CustomerOrder) GetCheckoutID ¶ added in v0.4.16

func (c *CustomerOrder) GetCheckoutID() *string

func (*CustomerOrder) GetCreatedAt ¶

func (c *CustomerOrder) GetCreatedAt() time.Time

func (*CustomerOrder) GetCurrency ¶

func (c *CustomerOrder) GetCurrency() string

func (*CustomerOrder) GetCustomerID ¶

func (c *CustomerOrder) GetCustomerID() string

func (*CustomerOrder) GetDescription ¶ added in v0.12.0

func (c *CustomerOrder) GetDescription() string

func (*CustomerOrder) GetDiscountAmount ¶ added in v0.4.6

func (c *CustomerOrder) GetDiscountAmount() int64

func (*CustomerOrder) GetDiscountID ¶ added in v0.4.16

func (c *CustomerOrder) GetDiscountID() *string

func (*CustomerOrder) GetDueAmount ¶ added in v0.10.0

func (c *CustomerOrder) GetDueAmount() int64

func (*CustomerOrder) GetID ¶

func (c *CustomerOrder) GetID() string

func (*CustomerOrder) GetInvoiceNumber ¶ added in v0.9.2

func (c *CustomerOrder) GetInvoiceNumber() string

func (*CustomerOrder) GetIsInvoiceGenerated ¶ added in v0.5.0

func (c *CustomerOrder) GetIsInvoiceGenerated() bool

func (*CustomerOrder) GetItems ¶ added in v0.4.6

func (c *CustomerOrder) GetItems() []OrderItemSchema

func (*CustomerOrder) GetModifiedAt ¶

func (c *CustomerOrder) GetModifiedAt() *time.Time

func (*CustomerOrder) GetNetAmount ¶ added in v0.4.6

func (c *CustomerOrder) GetNetAmount() int64

func (*CustomerOrder) GetNextPaymentAttemptAt ¶ added in v0.8.0

func (c *CustomerOrder) GetNextPaymentAttemptAt() *time.Time

func (*CustomerOrder) GetPaid ¶ added in v0.4.7

func (c *CustomerOrder) GetPaid() bool

func (*CustomerOrder) GetProduct ¶

func (c *CustomerOrder) GetProduct() *CustomerOrderProduct

func (*CustomerOrder) GetProductID ¶

func (c *CustomerOrder) GetProductID() *string

func (*CustomerOrder) GetRefundedAmount ¶ added in v0.4.6

func (c *CustomerOrder) GetRefundedAmount() int64

func (*CustomerOrder) GetRefundedTaxAmount ¶ added in v0.4.6

func (c *CustomerOrder) GetRefundedTaxAmount() int64

func (*CustomerOrder) GetSeats ¶ added in v0.12.0

func (c *CustomerOrder) GetSeats() *int64

func (*CustomerOrder) GetStatus ¶ added in v0.4.7

func (c *CustomerOrder) GetStatus() OrderStatus

func (*CustomerOrder) GetSubscription ¶

func (c *CustomerOrder) GetSubscription() *CustomerOrderSubscription

func (*CustomerOrder) GetSubscriptionID ¶

func (c *CustomerOrder) GetSubscriptionID() *string

func (*CustomerOrder) GetSubtotalAmount ¶ added in v0.4.6

func (c *CustomerOrder) GetSubtotalAmount() int64

func (*CustomerOrder) GetTaxAmount ¶

func (c *CustomerOrder) GetTaxAmount() int64

func (*CustomerOrder) GetTotalAmount ¶ added in v0.4.6

func (c *CustomerOrder) GetTotalAmount() int64

func (CustomerOrder) MarshalJSON ¶

func (c CustomerOrder) MarshalJSON() ([]byte, error)

func (*CustomerOrder) UnmarshalJSON ¶

func (c *CustomerOrder) UnmarshalJSON(data []byte) error

type CustomerOrderConfirmPayment ¶ added in v0.8.2

type CustomerOrderConfirmPayment struct {
	// ID of the Stripe confirmation token for new payment methods.
	ConfirmationTokenID *string `json:"confirmation_token_id,omitempty"`
	// ID of an existing saved payment method.
	PaymentMethodID  *string           `json:"payment_method_id,omitempty"`
	PaymentProcessor *PaymentProcessor `json:"payment_processor,omitempty"`
}

CustomerOrderConfirmPayment - Schema to confirm a retry payment using either a saved payment method or a new confirmation token.

func (*CustomerOrderConfirmPayment) GetConfirmationTokenID ¶ added in v0.8.2

func (c *CustomerOrderConfirmPayment) GetConfirmationTokenID() *string

func (*CustomerOrderConfirmPayment) GetPaymentMethodID ¶ added in v0.8.3

func (c *CustomerOrderConfirmPayment) GetPaymentMethodID() *string

func (*CustomerOrderConfirmPayment) GetPaymentProcessor ¶ added in v0.8.2

func (c *CustomerOrderConfirmPayment) GetPaymentProcessor() *PaymentProcessor

type CustomerOrderInvoice ¶

type CustomerOrderInvoice struct {
	// The URL to the invoice.
	URL string `json:"url"`
}

CustomerOrderInvoice - Order's invoice data.

func (*CustomerOrderInvoice) GetURL ¶

func (c *CustomerOrderInvoice) GetURL() string

type CustomerOrderPaymentConfirmation ¶ added in v0.8.2

type CustomerOrderPaymentConfirmation struct {
	// Payment status after confirmation.
	Status string `json:"status"`
	// Client secret for handling additional actions.
	ClientSecret *string `json:"client_secret,omitempty"`
	// Error message if confirmation failed.
	Error *string `json:"error,omitempty"`
}

CustomerOrderPaymentConfirmation - Response after confirming a retry payment.

func (*CustomerOrderPaymentConfirmation) GetClientSecret ¶ added in v0.8.2

func (c *CustomerOrderPaymentConfirmation) GetClientSecret() *string

func (*CustomerOrderPaymentConfirmation) GetError ¶ added in v0.8.2

func (*CustomerOrderPaymentConfirmation) GetStatus ¶ added in v0.8.2

type CustomerOrderPaymentStatus ¶ added in v0.8.2

type CustomerOrderPaymentStatus struct {
	// Current payment status.
	Status string `json:"status"`
	// Error message if payment failed.
	Error *string `json:"error,omitempty"`
}

CustomerOrderPaymentStatus - Payment status for an order.

func (*CustomerOrderPaymentStatus) GetError ¶ added in v0.8.2

func (c *CustomerOrderPaymentStatus) GetError() *string

func (*CustomerOrderPaymentStatus) GetStatus ¶ added in v0.8.2

func (c *CustomerOrderPaymentStatus) GetStatus() string

type CustomerOrderProduct ¶

type CustomerOrderProduct struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count"`
	// The name of the product.
	Name string `json:"name"`
	// The description of the product.
	Description *string           `json:"description"`
	Visibility  ProductVisibility `json:"visibility"`
	// The recurring interval of the product. If `None`, the product is a one-time purchase.
	RecurringInterval *SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
	RecurringIntervalCount *int64 `json:"recurring_interval_count"`
	// Whether the product is a subscription.
	IsRecurring bool `json:"is_recurring"`
	// Whether the product is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the organization owning the product.
	OrganizationID string `json:"organization_id"`
	// List of prices for this product.
	Prices []CustomerOrderProductPrices `json:"prices"`
	// List of benefits granted by the product.
	Benefits []BenefitPublic `json:"benefits"`
	// List of medias associated to the product.
	Medias       []ProductMediaFileRead `json:"medias"`
	Organization CustomerOrganization   `json:"organization"`
}

func (*CustomerOrderProduct) GetBenefits ¶

func (c *CustomerOrderProduct) GetBenefits() []BenefitPublic

func (*CustomerOrderProduct) GetCreatedAt ¶

func (c *CustomerOrderProduct) GetCreatedAt() time.Time

func (*CustomerOrderProduct) GetDescription ¶

func (c *CustomerOrderProduct) GetDescription() *string

func (*CustomerOrderProduct) GetID ¶

func (c *CustomerOrderProduct) GetID() string

func (*CustomerOrderProduct) GetIsArchived ¶

func (c *CustomerOrderProduct) GetIsArchived() bool

func (*CustomerOrderProduct) GetIsRecurring ¶

func (c *CustomerOrderProduct) GetIsRecurring() bool

func (*CustomerOrderProduct) GetMedias ¶

func (c *CustomerOrderProduct) GetMedias() []ProductMediaFileRead

func (*CustomerOrderProduct) GetModifiedAt ¶

func (c *CustomerOrderProduct) GetModifiedAt() *time.Time

func (*CustomerOrderProduct) GetName ¶

func (c *CustomerOrderProduct) GetName() string

func (*CustomerOrderProduct) GetOrganization ¶

func (c *CustomerOrderProduct) GetOrganization() CustomerOrganization

func (*CustomerOrderProduct) GetOrganizationID ¶

func (c *CustomerOrderProduct) GetOrganizationID() string

func (*CustomerOrderProduct) GetPrices ¶

func (*CustomerOrderProduct) GetRecurringInterval ¶ added in v0.3.0

func (c *CustomerOrderProduct) GetRecurringInterval() *SubscriptionRecurringInterval

func (*CustomerOrderProduct) GetRecurringIntervalCount ¶ added in v0.12.0

func (c *CustomerOrderProduct) GetRecurringIntervalCount() *int64

func (*CustomerOrderProduct) GetTrialInterval ¶ added in v0.9.1

func (c *CustomerOrderProduct) GetTrialInterval() *TrialInterval

func (*CustomerOrderProduct) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CustomerOrderProduct) GetTrialIntervalCount() *int64

func (*CustomerOrderProduct) GetVisibility ¶ added in v0.13.0

func (c *CustomerOrderProduct) GetVisibility() ProductVisibility

func (CustomerOrderProduct) MarshalJSON ¶

func (c CustomerOrderProduct) MarshalJSON() ([]byte, error)

func (*CustomerOrderProduct) UnmarshalJSON ¶

func (c *CustomerOrderProduct) UnmarshalJSON(data []byte) error

type CustomerOrderProductPrices ¶ added in v0.3.0

type CustomerOrderProductPrices struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CustomerOrderProductPricesType
}

func CreateCustomerOrderProductPricesLegacyRecurringProductPrice ¶ added in v0.3.0

func CreateCustomerOrderProductPricesLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CustomerOrderProductPrices

func CreateCustomerOrderProductPricesProductPrice ¶ added in v0.3.0

func CreateCustomerOrderProductPricesProductPrice(productPrice ProductPrice) CustomerOrderProductPrices

func (CustomerOrderProductPrices) MarshalJSON ¶ added in v0.3.0

func (u CustomerOrderProductPrices) MarshalJSON() ([]byte, error)

func (*CustomerOrderProductPrices) UnmarshalJSON ¶ added in v0.3.0

func (u *CustomerOrderProductPrices) UnmarshalJSON(data []byte) error

type CustomerOrderProductPricesType ¶ added in v0.3.0

type CustomerOrderProductPricesType string
const (
	CustomerOrderProductPricesTypeLegacyRecurringProductPrice CustomerOrderProductPricesType = "LegacyRecurringProductPrice"
	CustomerOrderProductPricesTypeProductPrice                CustomerOrderProductPricesType = "ProductPrice"
)

type CustomerOrderSortProperty ¶

type CustomerOrderSortProperty string
const (
	CustomerOrderSortPropertyCreatedAt         CustomerOrderSortProperty = "created_at"
	CustomerOrderSortPropertyMinusCreatedAt    CustomerOrderSortProperty = "-created_at"
	CustomerOrderSortPropertyAmount            CustomerOrderSortProperty = "amount"
	CustomerOrderSortPropertyMinusAmount       CustomerOrderSortProperty = "-amount"
	CustomerOrderSortPropertyNetAmount         CustomerOrderSortProperty = "net_amount"
	CustomerOrderSortPropertyMinusNetAmount    CustomerOrderSortProperty = "-net_amount"
	CustomerOrderSortPropertyProduct           CustomerOrderSortProperty = "product"
	CustomerOrderSortPropertyMinusProduct      CustomerOrderSortProperty = "-product"
	CustomerOrderSortPropertySubscription      CustomerOrderSortProperty = "subscription"
	CustomerOrderSortPropertyMinusSubscription CustomerOrderSortProperty = "-subscription"
)

func (CustomerOrderSortProperty) ToPointer ¶

func (*CustomerOrderSortProperty) UnmarshalJSON ¶

func (e *CustomerOrderSortProperty) UnmarshalJSON(data []byte) error

type CustomerOrderSubscription ¶

type CustomerOrderSubscription struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The amount of the subscription.
	Amount int64 `json:"amount"`
	// The currency of the subscription.
	Currency          string                        `json:"currency"`
	RecurringInterval SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.
	RecurringIntervalCount int64              `json:"recurring_interval_count"`
	Status                 SubscriptionStatus `json:"status"`
	// The start timestamp of the current billing period.
	CurrentPeriodStart time.Time `json:"current_period_start"`
	// The end timestamp of the current billing period.
	CurrentPeriodEnd time.Time `json:"current_period_end"`
	// The start timestamp of the trial period, if any.
	TrialStart *time.Time `json:"trial_start"`
	// The end timestamp of the trial period, if any.
	TrialEnd *time.Time `json:"trial_end"`
	// Whether the subscription will be canceled at the end of the current period.
	CancelAtPeriodEnd bool `json:"cancel_at_period_end"`
	// The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.
	CanceledAt *time.Time `json:"canceled_at"`
	// The timestamp when the subscription started.
	StartedAt *time.Time `json:"started_at"`
	// The timestamp when the subscription will end.
	EndsAt *time.Time `json:"ends_at"`
	// The timestamp when the subscription ended.
	EndedAt *time.Time `json:"ended_at"`
	// The ID of the subscribed customer.
	CustomerID string `json:"customer_id"`
	// The ID of the subscribed product.
	ProductID string `json:"product_id"`
	// The ID of the applied discount, if any.
	DiscountID *string `json:"discount_id"`
	CheckoutID *string `json:"checkout_id"`
	// The number of seats for seat-based subscriptions. None for non-seat subscriptions.
	Seats                       *int64                      `json:"seats,omitempty"`
	CustomerCancellationReason  *CustomerCancellationReason `json:"customer_cancellation_reason"`
	CustomerCancellationComment *string                     `json:"customer_cancellation_comment"`
}

func (*CustomerOrderSubscription) GetAmount ¶

func (c *CustomerOrderSubscription) GetAmount() int64

func (*CustomerOrderSubscription) GetCancelAtPeriodEnd ¶

func (c *CustomerOrderSubscription) GetCancelAtPeriodEnd() bool

func (*CustomerOrderSubscription) GetCanceledAt ¶ added in v0.1.1

func (c *CustomerOrderSubscription) GetCanceledAt() *time.Time

func (*CustomerOrderSubscription) GetCheckoutID ¶

func (c *CustomerOrderSubscription) GetCheckoutID() *string

func (*CustomerOrderSubscription) GetCreatedAt ¶

func (c *CustomerOrderSubscription) GetCreatedAt() time.Time

func (*CustomerOrderSubscription) GetCurrency ¶

func (c *CustomerOrderSubscription) GetCurrency() string

func (*CustomerOrderSubscription) GetCurrentPeriodEnd ¶

func (c *CustomerOrderSubscription) GetCurrentPeriodEnd() time.Time

func (*CustomerOrderSubscription) GetCurrentPeriodStart ¶

func (c *CustomerOrderSubscription) GetCurrentPeriodStart() time.Time

func (*CustomerOrderSubscription) GetCustomerCancellationComment ¶ added in v0.1.1

func (c *CustomerOrderSubscription) GetCustomerCancellationComment() *string

func (*CustomerOrderSubscription) GetCustomerCancellationReason ¶ added in v0.1.1

func (c *CustomerOrderSubscription) GetCustomerCancellationReason() *CustomerCancellationReason

func (*CustomerOrderSubscription) GetCustomerID ¶

func (c *CustomerOrderSubscription) GetCustomerID() string

func (*CustomerOrderSubscription) GetDiscountID ¶

func (c *CustomerOrderSubscription) GetDiscountID() *string

func (*CustomerOrderSubscription) GetEndedAt ¶

func (c *CustomerOrderSubscription) GetEndedAt() *time.Time

func (*CustomerOrderSubscription) GetEndsAt ¶ added in v0.1.1

func (c *CustomerOrderSubscription) GetEndsAt() *time.Time

func (*CustomerOrderSubscription) GetID ¶

func (c *CustomerOrderSubscription) GetID() string

func (*CustomerOrderSubscription) GetModifiedAt ¶

func (c *CustomerOrderSubscription) GetModifiedAt() *time.Time

func (*CustomerOrderSubscription) GetProductID ¶

func (c *CustomerOrderSubscription) GetProductID() string

func (*CustomerOrderSubscription) GetRecurringInterval ¶

func (c *CustomerOrderSubscription) GetRecurringInterval() SubscriptionRecurringInterval

func (*CustomerOrderSubscription) GetRecurringIntervalCount ¶ added in v0.12.0

func (c *CustomerOrderSubscription) GetRecurringIntervalCount() int64

func (*CustomerOrderSubscription) GetSeats ¶ added in v0.12.0

func (c *CustomerOrderSubscription) GetSeats() *int64

func (*CustomerOrderSubscription) GetStartedAt ¶

func (c *CustomerOrderSubscription) GetStartedAt() *time.Time

func (*CustomerOrderSubscription) GetStatus ¶

func (*CustomerOrderSubscription) GetTrialEnd ¶ added in v0.9.1

func (c *CustomerOrderSubscription) GetTrialEnd() *time.Time

func (*CustomerOrderSubscription) GetTrialStart ¶ added in v0.9.1

func (c *CustomerOrderSubscription) GetTrialStart() *time.Time

func (CustomerOrderSubscription) MarshalJSON ¶

func (c CustomerOrderSubscription) MarshalJSON() ([]byte, error)

func (*CustomerOrderSubscription) UnmarshalJSON ¶

func (c *CustomerOrderSubscription) UnmarshalJSON(data []byte) error

type CustomerOrderUpdate ¶ added in v0.5.0

type CustomerOrderUpdate struct {
	// The name of the customer that should appear on the invoice.
	BillingName *string `json:"billing_name,omitempty"`
	// The address of the customer that should appear on the invoice. Country and state fields cannot be updated.
	BillingAddress *AddressInput `json:"billing_address,omitempty"`
}

CustomerOrderUpdate - Schema to update an order.

func (*CustomerOrderUpdate) GetBillingAddress ¶ added in v0.5.0

func (c *CustomerOrderUpdate) GetBillingAddress() *AddressInput

func (*CustomerOrderUpdate) GetBillingName ¶ added in v0.5.0

func (c *CustomerOrderUpdate) GetBillingName() *string

type CustomerOrganization ¶ added in v0.3.0

type CustomerOrganization struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// Organization name shown in checkout, customer portal, emails etc.
	Name string `json:"name"`
	// Unique organization slug in checkout, customer portal and credit card statements.
	Slug string `json:"slug"`
	// Avatar URL shown in checkout, customer portal, emails etc.
	AvatarURL         *string                       `json:"avatar_url"`
	ProrationBehavior SubscriptionProrationBehavior `json:"proration_behavior"`
	// Whether customers can update their subscriptions from the customer portal.
	AllowCustomerUpdates   bool                               `json:"allow_customer_updates"`
	CustomerPortalSettings OrganizationCustomerPortalSettings `json:"customer_portal_settings"`
	// Feature flags exposed to the customer portal.
	OrganizationFeatures *CustomerOrganizationFeatureSettings `json:"organization_features,omitempty"`
}

func (*CustomerOrganization) GetAllowCustomerUpdates ¶ added in v0.13.0

func (c *CustomerOrganization) GetAllowCustomerUpdates() bool

func (*CustomerOrganization) GetAvatarURL ¶ added in v0.13.0

func (c *CustomerOrganization) GetAvatarURL() *string

func (*CustomerOrganization) GetCreatedAt ¶ added in v0.13.0

func (c *CustomerOrganization) GetCreatedAt() time.Time

func (*CustomerOrganization) GetCustomerPortalSettings ¶ added in v0.13.0

func (c *CustomerOrganization) GetCustomerPortalSettings() OrganizationCustomerPortalSettings

func (*CustomerOrganization) GetID ¶ added in v0.13.0

func (c *CustomerOrganization) GetID() string

func (*CustomerOrganization) GetModifiedAt ¶ added in v0.13.0

func (c *CustomerOrganization) GetModifiedAt() *time.Time

func (*CustomerOrganization) GetName ¶ added in v0.13.0

func (c *CustomerOrganization) GetName() string

func (*CustomerOrganization) GetOrganizationFeatures ¶ added in v0.13.0

func (c *CustomerOrganization) GetOrganizationFeatures() *CustomerOrganizationFeatureSettings

func (*CustomerOrganization) GetProrationBehavior ¶ added in v0.13.0

func (c *CustomerOrganization) GetProrationBehavior() SubscriptionProrationBehavior

func (*CustomerOrganization) GetSlug ¶ added in v0.13.0

func (c *CustomerOrganization) GetSlug() string

func (CustomerOrganization) MarshalJSON ¶ added in v0.13.0

func (c CustomerOrganization) MarshalJSON() ([]byte, error)

func (*CustomerOrganization) UnmarshalJSON ¶ added in v0.13.0

func (c *CustomerOrganization) UnmarshalJSON(data []byte) error

type CustomerOrganizationData ¶ added in v0.13.0

type CustomerOrganizationData struct {
	Organization CustomerOrganization `json:"organization"`
	Products     []CustomerProduct    `json:"products"`
}

CustomerOrganizationData - Schema of an organization and related data for customer portal.

func (*CustomerOrganizationData) GetOrganization ¶ added in v0.13.0

func (c *CustomerOrganizationData) GetOrganization() CustomerOrganization

func (*CustomerOrganizationData) GetProducts ¶ added in v0.13.0

func (c *CustomerOrganizationData) GetProducts() []CustomerProduct

type CustomerOrganizationFeatureSettings ¶ added in v0.13.0

type CustomerOrganizationFeatureSettings struct {
	// Whether the member model is enabled for this organization.
	MemberModelEnabled *bool `default:"false" json:"member_model_enabled"`
}

CustomerOrganizationFeatureSettings - Feature flags exposed to the customer portal.

func (*CustomerOrganizationFeatureSettings) GetMemberModelEnabled ¶ added in v0.13.0

func (c *CustomerOrganizationFeatureSettings) GetMemberModelEnabled() *bool

func (CustomerOrganizationFeatureSettings) MarshalJSON ¶ added in v0.13.0

func (c CustomerOrganizationFeatureSettings) MarshalJSON() ([]byte, error)

func (*CustomerOrganizationFeatureSettings) UnmarshalJSON ¶ added in v0.13.0

func (c *CustomerOrganizationFeatureSettings) UnmarshalJSON(data []byte) error

type CustomerPaymentMethod ¶ added in v0.7.3

type CustomerPaymentMethod struct {
	PaymentMethodCard    *PaymentMethodCard    `queryParam:"inline" union:"member"`
	PaymentMethodGeneric *PaymentMethodGeneric `queryParam:"inline" union:"member"`

	Type CustomerPaymentMethodType
}

func CreateCustomerPaymentMethodPaymentMethodCard ¶ added in v0.7.3

func CreateCustomerPaymentMethodPaymentMethodCard(paymentMethodCard PaymentMethodCard) CustomerPaymentMethod

func CreateCustomerPaymentMethodPaymentMethodGeneric ¶ added in v0.7.3

func CreateCustomerPaymentMethodPaymentMethodGeneric(paymentMethodGeneric PaymentMethodGeneric) CustomerPaymentMethod

func (CustomerPaymentMethod) MarshalJSON ¶ added in v0.7.3

func (u CustomerPaymentMethod) MarshalJSON() ([]byte, error)

func (*CustomerPaymentMethod) UnmarshalJSON ¶ added in v0.7.3

func (u *CustomerPaymentMethod) UnmarshalJSON(data []byte) error

type CustomerPaymentMethodConfirm ¶ added in v0.9.2

type CustomerPaymentMethodConfirm struct {
	SetupIntentID string `json:"setup_intent_id"`
	SetDefault    bool   `json:"set_default"`
}

func (*CustomerPaymentMethodConfirm) GetSetDefault ¶ added in v0.9.2

func (c *CustomerPaymentMethodConfirm) GetSetDefault() bool

func (*CustomerPaymentMethodConfirm) GetSetupIntentID ¶ added in v0.9.2

func (c *CustomerPaymentMethodConfirm) GetSetupIntentID() string

type CustomerPaymentMethodCreate ¶ added in v0.4.0

type CustomerPaymentMethodCreate struct {
	ConfirmationTokenID string `json:"confirmation_token_id"`
	SetDefault          bool   `json:"set_default"`
	ReturnURL           string `json:"return_url"`
}

func (*CustomerPaymentMethodCreate) GetConfirmationTokenID ¶ added in v0.4.0

func (c *CustomerPaymentMethodCreate) GetConfirmationTokenID() string

func (*CustomerPaymentMethodCreate) GetReturnURL ¶ added in v0.4.0

func (c *CustomerPaymentMethodCreate) GetReturnURL() string

func (*CustomerPaymentMethodCreate) GetSetDefault ¶ added in v0.4.0

func (c *CustomerPaymentMethodCreate) GetSetDefault() bool

type CustomerPaymentMethodCreateRequiresActionResponse ¶ added in v0.9.2

type CustomerPaymentMethodCreateRequiresActionResponse struct {
	ClientSecret string `json:"client_secret"`
	// contains filtered or unexported fields
}

func (*CustomerPaymentMethodCreateRequiresActionResponse) GetClientSecret ¶ added in v0.9.2

func (*CustomerPaymentMethodCreateRequiresActionResponse) GetStatus ¶ added in v0.9.2

func (CustomerPaymentMethodCreateRequiresActionResponse) MarshalJSON ¶ added in v0.9.2

func (*CustomerPaymentMethodCreateRequiresActionResponse) UnmarshalJSON ¶ added in v0.9.2

type CustomerPaymentMethodCreateResponse ¶ added in v0.9.2

type CustomerPaymentMethodCreateResponse struct {
	CustomerPaymentMethodCreateSucceededResponse      *CustomerPaymentMethodCreateSucceededResponse      `queryParam:"inline" union:"member"`
	CustomerPaymentMethodCreateRequiresActionResponse *CustomerPaymentMethodCreateRequiresActionResponse `queryParam:"inline" union:"member"`

	Type CustomerPaymentMethodCreateResponseType
}

func CreateCustomerPaymentMethodCreateResponseRequiresAction ¶ added in v0.9.2

func CreateCustomerPaymentMethodCreateResponseRequiresAction(requiresAction CustomerPaymentMethodCreateRequiresActionResponse) CustomerPaymentMethodCreateResponse

func CreateCustomerPaymentMethodCreateResponseSucceeded ¶ added in v0.9.2

func CreateCustomerPaymentMethodCreateResponseSucceeded(succeeded CustomerPaymentMethodCreateSucceededResponse) CustomerPaymentMethodCreateResponse

func (CustomerPaymentMethodCreateResponse) MarshalJSON ¶ added in v0.9.2

func (u CustomerPaymentMethodCreateResponse) MarshalJSON() ([]byte, error)

func (*CustomerPaymentMethodCreateResponse) UnmarshalJSON ¶ added in v0.9.2

func (u *CustomerPaymentMethodCreateResponse) UnmarshalJSON(data []byte) error

type CustomerPaymentMethodCreateResponseType ¶ added in v0.9.2

type CustomerPaymentMethodCreateResponseType string
const (
	CustomerPaymentMethodCreateResponseTypeRequiresAction CustomerPaymentMethodCreateResponseType = "requires_action"
	CustomerPaymentMethodCreateResponseTypeSucceeded      CustomerPaymentMethodCreateResponseType = "succeeded"
)

type CustomerPaymentMethodCreateSucceededResponse ¶ added in v0.9.2

type CustomerPaymentMethodCreateSucceededResponse struct {
	PaymentMethod CustomerPaymentMethod `json:"payment_method"`
	// contains filtered or unexported fields
}

func (*CustomerPaymentMethodCreateSucceededResponse) GetPaymentMethod ¶ added in v0.9.2

func (*CustomerPaymentMethodCreateSucceededResponse) GetStatus ¶ added in v0.9.2

func (CustomerPaymentMethodCreateSucceededResponse) MarshalJSON ¶ added in v0.9.2

func (*CustomerPaymentMethodCreateSucceededResponse) UnmarshalJSON ¶ added in v0.9.2

func (c *CustomerPaymentMethodCreateSucceededResponse) UnmarshalJSON(data []byte) error

type CustomerPaymentMethodType ¶ added in v0.7.3

type CustomerPaymentMethodType string
const (
	CustomerPaymentMethodTypePaymentMethodCard    CustomerPaymentMethodType = "PaymentMethodCard"
	CustomerPaymentMethodTypePaymentMethodGeneric CustomerPaymentMethodType = "PaymentMethodGeneric"
)

type CustomerPortalCustomer ¶

type CustomerPortalCustomer struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID                     string                                `json:"id"`
	Email                  *string                               `json:"email"`
	EmailVerified          bool                                  `json:"email_verified"`
	Name                   *string                               `json:"name"`
	BillingName            *string                               `json:"billing_name"`
	BillingAddress         *Address                              `json:"billing_address"`
	TaxID                  []*CustomerPortalCustomerTaxID        `json:"tax_id"`
	OauthAccounts          map[string]CustomerPortalOAuthAccount `json:"oauth_accounts"`
	DefaultPaymentMethodID *string                               `json:"default_payment_method_id,omitempty"`
	Type                   *CustomerType                         `json:"type,omitempty"`
}

func (*CustomerPortalCustomer) GetBillingAddress ¶

func (c *CustomerPortalCustomer) GetBillingAddress() *Address

func (*CustomerPortalCustomer) GetBillingName ¶ added in v0.8.3

func (c *CustomerPortalCustomer) GetBillingName() *string

func (*CustomerPortalCustomer) GetCreatedAt ¶

func (c *CustomerPortalCustomer) GetCreatedAt() time.Time

func (*CustomerPortalCustomer) GetDefaultPaymentMethodID ¶ added in v0.7.2

func (c *CustomerPortalCustomer) GetDefaultPaymentMethodID() *string

func (*CustomerPortalCustomer) GetEmail ¶

func (c *CustomerPortalCustomer) GetEmail() *string

func (*CustomerPortalCustomer) GetEmailVerified ¶

func (c *CustomerPortalCustomer) GetEmailVerified() bool

func (*CustomerPortalCustomer) GetID ¶

func (c *CustomerPortalCustomer) GetID() string

func (*CustomerPortalCustomer) GetModifiedAt ¶

func (c *CustomerPortalCustomer) GetModifiedAt() *time.Time

func (*CustomerPortalCustomer) GetName ¶

func (c *CustomerPortalCustomer) GetName() *string

func (*CustomerPortalCustomer) GetOauthAccounts ¶

func (c *CustomerPortalCustomer) GetOauthAccounts() map[string]CustomerPortalOAuthAccount

func (*CustomerPortalCustomer) GetTaxID ¶

func (*CustomerPortalCustomer) GetType ¶ added in v0.13.0

func (c *CustomerPortalCustomer) GetType() *CustomerType

func (CustomerPortalCustomer) MarshalJSON ¶

func (c CustomerPortalCustomer) MarshalJSON() ([]byte, error)

func (*CustomerPortalCustomer) UnmarshalJSON ¶

func (c *CustomerPortalCustomer) UnmarshalJSON(data []byte) error

type CustomerPortalCustomerTaxID ¶

type CustomerPortalCustomerTaxID struct {
	Str         *string      `queryParam:"inline" union:"member"`
	TaxIDFormat *TaxIDFormat `queryParam:"inline" union:"member"`

	Type CustomerPortalCustomerTaxIDType
}

func CreateCustomerPortalCustomerTaxIDStr ¶

func CreateCustomerPortalCustomerTaxIDStr(str string) CustomerPortalCustomerTaxID

func CreateCustomerPortalCustomerTaxIDTaxIDFormat ¶

func CreateCustomerPortalCustomerTaxIDTaxIDFormat(taxIDFormat TaxIDFormat) CustomerPortalCustomerTaxID

func (CustomerPortalCustomerTaxID) MarshalJSON ¶

func (u CustomerPortalCustomerTaxID) MarshalJSON() ([]byte, error)

func (*CustomerPortalCustomerTaxID) UnmarshalJSON ¶

func (u *CustomerPortalCustomerTaxID) UnmarshalJSON(data []byte) error

type CustomerPortalCustomerTaxIDType ¶

type CustomerPortalCustomerTaxIDType string
const (
	CustomerPortalCustomerTaxIDTypeStr         CustomerPortalCustomerTaxIDType = "str"
	CustomerPortalCustomerTaxIDTypeTaxIDFormat CustomerPortalCustomerTaxIDType = "TaxIDFormat"
)

type CustomerPortalCustomerUpdate ¶ added in v0.4.0

type CustomerPortalCustomerUpdate struct {
	BillingName    *string       `json:"billing_name,omitempty"`
	BillingAddress *AddressInput `json:"billing_address,omitempty"`
	TaxID          *string       `json:"tax_id,omitempty"`
}

func (*CustomerPortalCustomerUpdate) GetBillingAddress ¶ added in v0.4.0

func (c *CustomerPortalCustomerUpdate) GetBillingAddress() *AddressInput

func (*CustomerPortalCustomerUpdate) GetBillingName ¶ added in v0.8.3

func (c *CustomerPortalCustomerUpdate) GetBillingName() *string

func (*CustomerPortalCustomerUpdate) GetTaxID ¶ added in v0.4.0

func (c *CustomerPortalCustomerUpdate) GetTaxID() *string

type CustomerPortalMember ¶ added in v0.13.0

type CustomerPortalMember struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The email address of the member.
	Email string `json:"email"`
	// The name of the member.
	Name *string    `json:"name"`
	Role MemberRole `json:"role"`
}

CustomerPortalMember - A member of the customer's team as seen in the customer portal.

func (*CustomerPortalMember) GetCreatedAt ¶ added in v0.13.0

func (c *CustomerPortalMember) GetCreatedAt() time.Time

func (*CustomerPortalMember) GetEmail ¶ added in v0.13.0

func (c *CustomerPortalMember) GetEmail() string

func (*CustomerPortalMember) GetID ¶ added in v0.13.0

func (c *CustomerPortalMember) GetID() string

func (*CustomerPortalMember) GetModifiedAt ¶ added in v0.13.0

func (c *CustomerPortalMember) GetModifiedAt() *time.Time

func (*CustomerPortalMember) GetName ¶ added in v0.13.0

func (c *CustomerPortalMember) GetName() *string

func (*CustomerPortalMember) GetRole ¶ added in v0.13.0

func (c *CustomerPortalMember) GetRole() MemberRole

func (CustomerPortalMember) MarshalJSON ¶ added in v0.13.0

func (c CustomerPortalMember) MarshalJSON() ([]byte, error)

func (*CustomerPortalMember) UnmarshalJSON ¶ added in v0.13.0

func (c *CustomerPortalMember) UnmarshalJSON(data []byte) error

type CustomerPortalMemberCreate ¶ added in v0.13.0

type CustomerPortalMemberCreate struct {
	// The email address of the new member.
	Email string `json:"email"`
	// The name of the new member (optional).
	Name *string     `json:"name,omitempty"`
	Role *MemberRole `json:"role,omitempty"`
}

CustomerPortalMemberCreate - Schema for adding a new member to the customer's team.

func (*CustomerPortalMemberCreate) GetEmail ¶ added in v0.13.0

func (c *CustomerPortalMemberCreate) GetEmail() string

func (*CustomerPortalMemberCreate) GetName ¶ added in v0.13.0

func (c *CustomerPortalMemberCreate) GetName() *string

func (*CustomerPortalMemberCreate) GetRole ¶ added in v0.13.0

func (c *CustomerPortalMemberCreate) GetRole() *MemberRole

type CustomerPortalMemberUpdate ¶ added in v0.13.0

type CustomerPortalMemberUpdate struct {
	// The new role for the member.
	Role *MemberRole `json:"role,omitempty"`
}

CustomerPortalMemberUpdate - Schema for updating a member's role in the customer portal.

func (*CustomerPortalMemberUpdate) GetRole ¶ added in v0.13.0

func (c *CustomerPortalMemberUpdate) GetRole() *MemberRole

type CustomerPortalOAuthAccount ¶

type CustomerPortalOAuthAccount struct {
	AccountID       string  `json:"account_id"`
	AccountUsername *string `json:"account_username"`
}

func (*CustomerPortalOAuthAccount) GetAccountID ¶

func (c *CustomerPortalOAuthAccount) GetAccountID() string

func (*CustomerPortalOAuthAccount) GetAccountUsername ¶

func (c *CustomerPortalOAuthAccount) GetAccountUsername() *string

func (CustomerPortalOAuthAccount) MarshalJSON ¶ added in v0.8.4

func (c CustomerPortalOAuthAccount) MarshalJSON() ([]byte, error)

func (*CustomerPortalOAuthAccount) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomerPortalOAuthAccount) UnmarshalJSON(data []byte) error

type CustomerPortalSubscriptionSettings ¶ added in v0.13.0

type CustomerPortalSubscriptionSettings struct {
	UpdateSeats bool `json:"update_seats"`
	UpdatePlan  bool `json:"update_plan"`
}

func (*CustomerPortalSubscriptionSettings) GetUpdatePlan ¶ added in v0.13.0

func (c *CustomerPortalSubscriptionSettings) GetUpdatePlan() bool

func (*CustomerPortalSubscriptionSettings) GetUpdateSeats ¶ added in v0.13.0

func (c *CustomerPortalSubscriptionSettings) GetUpdateSeats() bool

type CustomerPortalUsageSettings ¶ added in v0.13.0

type CustomerPortalUsageSettings struct {
	Show bool `json:"show"`
}

func (*CustomerPortalUsageSettings) GetShow ¶ added in v0.13.0

func (c *CustomerPortalUsageSettings) GetShow() bool

type CustomerProduct ¶ added in v0.3.0

type CustomerProduct struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count"`
	// The name of the product.
	Name string `json:"name"`
	// The description of the product.
	Description *string           `json:"description"`
	Visibility  ProductVisibility `json:"visibility"`
	// The recurring interval of the product. If `None`, the product is a one-time purchase.
	RecurringInterval *SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
	RecurringIntervalCount *int64 `json:"recurring_interval_count"`
	// Whether the product is a subscription.
	IsRecurring bool `json:"is_recurring"`
	// Whether the product is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the organization owning the product.
	OrganizationID string `json:"organization_id"`
	// List of available prices for this product.
	Prices []CustomerProductPrices `json:"prices"`
	// The benefits granted by the product.
	Benefits []BenefitPublic `json:"benefits"`
	// The medias associated to the product.
	Medias []ProductMediaFileRead `json:"medias"`
}

CustomerProduct - Schema of a product for customer portal.

func (*CustomerProduct) GetBenefits ¶ added in v0.3.0

func (c *CustomerProduct) GetBenefits() []BenefitPublic

func (*CustomerProduct) GetCreatedAt ¶ added in v0.3.0

func (c *CustomerProduct) GetCreatedAt() time.Time

func (*CustomerProduct) GetDescription ¶ added in v0.3.0

func (c *CustomerProduct) GetDescription() *string

func (*CustomerProduct) GetID ¶ added in v0.3.0

func (c *CustomerProduct) GetID() string

func (*CustomerProduct) GetIsArchived ¶ added in v0.3.0

func (c *CustomerProduct) GetIsArchived() bool

func (*CustomerProduct) GetIsRecurring ¶ added in v0.3.0

func (c *CustomerProduct) GetIsRecurring() bool

func (*CustomerProduct) GetMedias ¶ added in v0.3.0

func (c *CustomerProduct) GetMedias() []ProductMediaFileRead

func (*CustomerProduct) GetModifiedAt ¶ added in v0.3.0

func (c *CustomerProduct) GetModifiedAt() *time.Time

func (*CustomerProduct) GetName ¶ added in v0.3.0

func (c *CustomerProduct) GetName() string

func (*CustomerProduct) GetOrganizationID ¶ added in v0.3.0

func (c *CustomerProduct) GetOrganizationID() string

func (*CustomerProduct) GetPrices ¶ added in v0.3.0

func (c *CustomerProduct) GetPrices() []CustomerProductPrices

func (*CustomerProduct) GetRecurringInterval ¶ added in v0.3.0

func (c *CustomerProduct) GetRecurringInterval() *SubscriptionRecurringInterval

func (*CustomerProduct) GetRecurringIntervalCount ¶ added in v0.12.0

func (c *CustomerProduct) GetRecurringIntervalCount() *int64

func (*CustomerProduct) GetTrialInterval ¶ added in v0.9.1

func (c *CustomerProduct) GetTrialInterval() *TrialInterval

func (*CustomerProduct) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CustomerProduct) GetTrialIntervalCount() *int64

func (*CustomerProduct) GetVisibility ¶ added in v0.13.0

func (c *CustomerProduct) GetVisibility() ProductVisibility

func (CustomerProduct) MarshalJSON ¶ added in v0.3.0

func (c CustomerProduct) MarshalJSON() ([]byte, error)

func (*CustomerProduct) UnmarshalJSON ¶ added in v0.3.0

func (c *CustomerProduct) UnmarshalJSON(data []byte) error

type CustomerProductPrices ¶ added in v0.3.0

type CustomerProductPrices struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CustomerProductPricesType
}

func CreateCustomerProductPricesLegacyRecurringProductPrice ¶ added in v0.3.0

func CreateCustomerProductPricesLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CustomerProductPrices

func CreateCustomerProductPricesProductPrice ¶ added in v0.3.0

func CreateCustomerProductPricesProductPrice(productPrice ProductPrice) CustomerProductPrices

func (CustomerProductPrices) MarshalJSON ¶ added in v0.3.0

func (u CustomerProductPrices) MarshalJSON() ([]byte, error)

func (*CustomerProductPrices) UnmarshalJSON ¶ added in v0.3.0

func (u *CustomerProductPrices) UnmarshalJSON(data []byte) error

type CustomerProductPricesType ¶ added in v0.3.0

type CustomerProductPricesType string
const (
	CustomerProductPricesTypeLegacyRecurringProductPrice CustomerProductPricesType = "LegacyRecurringProductPrice"
	CustomerProductPricesTypeProductPrice                CustomerProductPricesType = "ProductPrice"
)

type CustomerSeat ¶ added in v0.10.1

type CustomerSeat struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The seat ID
	ID string `json:"id"`
	// The subscription ID (for recurring seats)
	SubscriptionID *string `json:"subscription_id,omitempty"`
	// The order ID (for one-time purchase seats)
	OrderID *string    `json:"order_id,omitempty"`
	Status  SeatStatus `json:"status"`
	// The customer ID. When member_model_enabled is true, this is the billing customer (purchaser). When false, this is the seat member customer.
	CustomerID *string `json:"customer_id,omitempty"`
	// The member ID of the seat occupant
	MemberID *string `json:"member_id,omitempty"`
	// The member associated with this seat
	Member *Member `json:"member,omitempty"`
	// Email of the seat member (set when member_model_enabled is true)
	Email *string `json:"email,omitempty"`
	// The assigned customer email
	CustomerEmail *string `json:"customer_email,omitempty"`
	// When the invitation token expires
	InvitationTokenExpiresAt *time.Time `json:"invitation_token_expires_at,omitempty"`
	// When the seat was claimed
	ClaimedAt *time.Time `json:"claimed_at,omitempty"`
	// When the seat was revoked
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Additional metadata for the seat
	SeatMetadata map[string]any `json:"seat_metadata,omitempty"`
}

func (*CustomerSeat) GetClaimedAt ¶ added in v0.10.1

func (c *CustomerSeat) GetClaimedAt() *time.Time

func (*CustomerSeat) GetCreatedAt ¶ added in v0.10.1

func (c *CustomerSeat) GetCreatedAt() time.Time

func (*CustomerSeat) GetCustomerEmail ¶ added in v0.10.1

func (c *CustomerSeat) GetCustomerEmail() *string

func (*CustomerSeat) GetCustomerID ¶ added in v0.10.1

func (c *CustomerSeat) GetCustomerID() *string

func (*CustomerSeat) GetEmail ¶ added in v0.13.0

func (c *CustomerSeat) GetEmail() *string

func (*CustomerSeat) GetID ¶ added in v0.10.1

func (c *CustomerSeat) GetID() string

func (*CustomerSeat) GetInvitationTokenExpiresAt ¶ added in v0.10.1

func (c *CustomerSeat) GetInvitationTokenExpiresAt() *time.Time

func (*CustomerSeat) GetMember ¶ added in v0.13.0

func (c *CustomerSeat) GetMember() *Member

func (*CustomerSeat) GetMemberID ¶ added in v0.13.0

func (c *CustomerSeat) GetMemberID() *string

func (*CustomerSeat) GetModifiedAt ¶ added in v0.10.1

func (c *CustomerSeat) GetModifiedAt() *time.Time

func (*CustomerSeat) GetOrderID ¶ added in v0.12.0

func (c *CustomerSeat) GetOrderID() *string

func (*CustomerSeat) GetRevokedAt ¶ added in v0.10.1

func (c *CustomerSeat) GetRevokedAt() *time.Time

func (*CustomerSeat) GetSeatMetadata ¶ added in v0.10.1

func (c *CustomerSeat) GetSeatMetadata() map[string]any

func (*CustomerSeat) GetStatus ¶ added in v0.10.1

func (c *CustomerSeat) GetStatus() SeatStatus

func (*CustomerSeat) GetSubscriptionID ¶ added in v0.10.1

func (c *CustomerSeat) GetSubscriptionID() *string

func (CustomerSeat) MarshalJSON ¶ added in v0.10.1

func (c CustomerSeat) MarshalJSON() ([]byte, error)

func (*CustomerSeat) UnmarshalJSON ¶ added in v0.10.1

func (c *CustomerSeat) UnmarshalJSON(data []byte) error

type CustomerSeatClaimResponse ¶ added in v0.12.0

type CustomerSeatClaimResponse struct {
	Seat CustomerSeat `json:"seat"`
	// Session token for immediate customer portal access
	CustomerSessionToken string `json:"customer_session_token"`
}

CustomerSeatClaimResponse - Response after successfully claiming a seat.

func (*CustomerSeatClaimResponse) GetCustomerSessionToken ¶ added in v0.12.0

func (c *CustomerSeatClaimResponse) GetCustomerSessionToken() string

func (*CustomerSeatClaimResponse) GetSeat ¶ added in v0.12.0

type CustomerSession ¶

type CustomerSession struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID                string    `json:"id"`
	Token             string    `json:"token"`
	ExpiresAt         time.Time `json:"expires_at"`
	ReturnURL         *string   `json:"return_url"`
	CustomerPortalURL string    `json:"customer_portal_url"`
	CustomerID        string    `json:"customer_id"`
	Customer          Customer  `json:"customer"`
}

CustomerSession - A customer session that can be used to authenticate as a customer.

func (*CustomerSession) GetCreatedAt ¶

func (c *CustomerSession) GetCreatedAt() time.Time

func (*CustomerSession) GetCustomer ¶

func (c *CustomerSession) GetCustomer() Customer

func (*CustomerSession) GetCustomerID ¶

func (c *CustomerSession) GetCustomerID() string

func (*CustomerSession) GetCustomerIndividual ¶ added in v0.16.0

func (c *CustomerSession) GetCustomerIndividual() *CustomerIndividual

func (*CustomerSession) GetCustomerPortalURL ¶

func (c *CustomerSession) GetCustomerPortalURL() string

func (*CustomerSession) GetCustomerTeam ¶ added in v0.16.0

func (c *CustomerSession) GetCustomerTeam() *CustomerTeam

func (*CustomerSession) GetExpiresAt ¶

func (c *CustomerSession) GetExpiresAt() time.Time

func (*CustomerSession) GetID ¶

func (c *CustomerSession) GetID() string

func (*CustomerSession) GetModifiedAt ¶

func (c *CustomerSession) GetModifiedAt() *time.Time

func (*CustomerSession) GetReturnURL ¶ added in v0.10.1

func (c *CustomerSession) GetReturnURL() *string

func (*CustomerSession) GetToken ¶

func (c *CustomerSession) GetToken() string

func (CustomerSession) MarshalJSON ¶

func (c CustomerSession) MarshalJSON() ([]byte, error)

func (*CustomerSession) UnmarshalJSON ¶

func (c *CustomerSession) UnmarshalJSON(data []byte) error

type CustomerSessionCustomerExternalIDCreate ¶ added in v0.4.1

type CustomerSessionCustomerExternalIDCreate struct {
	// ID of the member to create a session for. When not provided and the organization has `member_model_enabled`, the owner member of the customer will be used for individual customers.
	MemberID *string `json:"member_id,omitempty"`
	// External ID of the member to create a session for. Alternative to `member_id`.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// When set, a back button will be shown in the customer portal to return to this URL.
	ReturnURL *string `json:"return_url,omitempty"`
	// External ID of the customer to create a session for.
	ExternalCustomerID string `json:"external_customer_id"`
}

CustomerSessionCustomerExternalIDCreate - Schema for creating a customer session using an external customer ID.

func (*CustomerSessionCustomerExternalIDCreate) GetExternalCustomerID ¶ added in v0.7.0

func (c *CustomerSessionCustomerExternalIDCreate) GetExternalCustomerID() string

func (*CustomerSessionCustomerExternalIDCreate) GetExternalMemberID ¶ added in v0.15.0

func (c *CustomerSessionCustomerExternalIDCreate) GetExternalMemberID() *string

func (*CustomerSessionCustomerExternalIDCreate) GetMemberID ¶ added in v0.15.0

func (*CustomerSessionCustomerExternalIDCreate) GetReturnURL ¶ added in v0.10.1

func (CustomerSessionCustomerExternalIDCreate) MarshalJSON ¶ added in v0.8.4

func (c CustomerSessionCustomerExternalIDCreate) MarshalJSON() ([]byte, error)

func (*CustomerSessionCustomerExternalIDCreate) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomerSessionCustomerExternalIDCreate) UnmarshalJSON(data []byte) error

type CustomerSessionCustomerIDCreate ¶ added in v0.4.1

type CustomerSessionCustomerIDCreate struct {
	// ID of the member to create a session for. When not provided and the organization has `member_model_enabled`, the owner member of the customer will be used for individual customers.
	MemberID *string `json:"member_id,omitempty"`
	// External ID of the member to create a session for. Alternative to `member_id`.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// When set, a back button will be shown in the customer portal to return to this URL.
	ReturnURL *string `json:"return_url,omitempty"`
	// ID of the customer to create a session for.
	CustomerID string `json:"customer_id"`
}

CustomerSessionCustomerIDCreate - Schema for creating a customer session using a customer ID.

func (*CustomerSessionCustomerIDCreate) GetCustomerID ¶ added in v0.4.1

func (c *CustomerSessionCustomerIDCreate) GetCustomerID() string

func (*CustomerSessionCustomerIDCreate) GetExternalMemberID ¶ added in v0.15.0

func (c *CustomerSessionCustomerIDCreate) GetExternalMemberID() *string

func (*CustomerSessionCustomerIDCreate) GetMemberID ¶ added in v0.15.0

func (c *CustomerSessionCustomerIDCreate) GetMemberID() *string

func (*CustomerSessionCustomerIDCreate) GetReturnURL ¶ added in v0.10.1

func (c *CustomerSessionCustomerIDCreate) GetReturnURL() *string

func (CustomerSessionCustomerIDCreate) MarshalJSON ¶ added in v0.8.4

func (c CustomerSessionCustomerIDCreate) MarshalJSON() ([]byte, error)

func (*CustomerSessionCustomerIDCreate) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomerSessionCustomerIDCreate) UnmarshalJSON(data []byte) error

type CustomerSortProperty ¶

type CustomerSortProperty string
const (
	CustomerSortPropertyCreatedAt      CustomerSortProperty = "created_at"
	CustomerSortPropertyMinusCreatedAt CustomerSortProperty = "-created_at"
	CustomerSortPropertyEmail          CustomerSortProperty = "email"
	CustomerSortPropertyMinusEmail     CustomerSortProperty = "-email"
	CustomerSortPropertyName           CustomerSortProperty = "name"
	CustomerSortPropertyMinusName      CustomerSortProperty = "-name"
)

func (CustomerSortProperty) ToPointer ¶

func (*CustomerSortProperty) UnmarshalJSON ¶

func (e *CustomerSortProperty) UnmarshalJSON(data []byte) error

type CustomerState ¶ added in v0.4.3

type CustomerState struct {
	CustomerStateIndividual *CustomerStateIndividual `queryParam:"inline" union:"member"`
	CustomerStateTeam       *CustomerStateTeam       `queryParam:"inline" union:"member"`

	Type CustomerStateType
}

func CreateCustomerStateIndividual ¶ added in v0.16.0

func CreateCustomerStateIndividual(individual CustomerStateIndividual) CustomerState

func CreateCustomerStateTeam ¶ added in v0.16.0

func CreateCustomerStateTeam(team CustomerStateTeam) CustomerState

func (CustomerState) MarshalJSON ¶ added in v0.4.3

func (u CustomerState) MarshalJSON() ([]byte, error)

func (*CustomerState) UnmarshalJSON ¶ added in v0.4.3

func (u *CustomerState) UnmarshalJSON(data []byte) error

type CustomerStateBenefitGrant ¶ added in v0.4.3

type CustomerStateBenefitGrant struct {
	// The ID of the grant.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The timestamp when the benefit was granted.
	GrantedAt time.Time `json:"granted_at"`
	// The ID of the benefit concerned by this grant.
	BenefitID       string                              `json:"benefit_id"`
	BenefitType     BenefitType                         `json:"benefit_type"`
	BenefitMetadata map[string]MetadataOutputType       `json:"benefit_metadata"`
	Properties      CustomerStateBenefitGrantProperties `json:"properties"`
}

CustomerStateBenefitGrant - An active benefit grant for a customer.

func (*CustomerStateBenefitGrant) GetBenefitID ¶ added in v0.4.3

func (c *CustomerStateBenefitGrant) GetBenefitID() string

func (*CustomerStateBenefitGrant) GetBenefitMetadata ¶ added in v0.7.0

func (c *CustomerStateBenefitGrant) GetBenefitMetadata() map[string]MetadataOutputType

func (*CustomerStateBenefitGrant) GetBenefitType ¶ added in v0.4.3

func (c *CustomerStateBenefitGrant) GetBenefitType() BenefitType

func (*CustomerStateBenefitGrant) GetCreatedAt ¶ added in v0.4.3

func (c *CustomerStateBenefitGrant) GetCreatedAt() time.Time

func (*CustomerStateBenefitGrant) GetGrantedAt ¶ added in v0.4.3

func (c *CustomerStateBenefitGrant) GetGrantedAt() time.Time

func (*CustomerStateBenefitGrant) GetID ¶ added in v0.4.3

func (c *CustomerStateBenefitGrant) GetID() string

func (*CustomerStateBenefitGrant) GetModifiedAt ¶ added in v0.4.3

func (c *CustomerStateBenefitGrant) GetModifiedAt() *time.Time

func (*CustomerStateBenefitGrant) GetProperties ¶ added in v0.4.3

func (CustomerStateBenefitGrant) MarshalJSON ¶ added in v0.4.3

func (c CustomerStateBenefitGrant) MarshalJSON() ([]byte, error)

func (*CustomerStateBenefitGrant) UnmarshalJSON ¶ added in v0.4.3

func (c *CustomerStateBenefitGrant) UnmarshalJSON(data []byte) error

type CustomerStateBenefitGrantProperties ¶ added in v0.4.3

type CustomerStateBenefitGrantProperties struct {
	BenefitGrantDiscordProperties          *BenefitGrantDiscordProperties          `queryParam:"inline" union:"member"`
	BenefitGrantGitHubRepositoryProperties *BenefitGrantGitHubRepositoryProperties `queryParam:"inline" union:"member"`
	BenefitGrantDownloadablesProperties    *BenefitGrantDownloadablesProperties    `queryParam:"inline" union:"member"`
	BenefitGrantLicenseKeysProperties      *BenefitGrantLicenseKeysProperties      `queryParam:"inline" union:"member"`
	BenefitGrantCustomProperties           *BenefitGrantCustomProperties           `queryParam:"inline" union:"member"`
	BenefitGrantFeatureFlagProperties      *BenefitGrantFeatureFlagProperties      `queryParam:"inline" union:"member"`

	Type CustomerStateBenefitGrantPropertiesType
}

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantCustomProperties ¶ added in v0.4.3

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantCustomProperties(benefitGrantCustomProperties BenefitGrantCustomProperties) CustomerStateBenefitGrantProperties

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantDiscordProperties ¶ added in v0.4.3

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantDiscordProperties(benefitGrantDiscordProperties BenefitGrantDiscordProperties) CustomerStateBenefitGrantProperties

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantDownloadablesProperties ¶ added in v0.4.3

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantDownloadablesProperties(benefitGrantDownloadablesProperties BenefitGrantDownloadablesProperties) CustomerStateBenefitGrantProperties

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantFeatureFlagProperties ¶ added in v0.15.0

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantFeatureFlagProperties(benefitGrantFeatureFlagProperties BenefitGrantFeatureFlagProperties) CustomerStateBenefitGrantProperties

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantGitHubRepositoryProperties ¶ added in v0.4.3

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantGitHubRepositoryProperties(benefitGrantGitHubRepositoryProperties BenefitGrantGitHubRepositoryProperties) CustomerStateBenefitGrantProperties

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantLicenseKeysProperties ¶ added in v0.4.3

func CreateCustomerStateBenefitGrantPropertiesBenefitGrantLicenseKeysProperties(benefitGrantLicenseKeysProperties BenefitGrantLicenseKeysProperties) CustomerStateBenefitGrantProperties

func (CustomerStateBenefitGrantProperties) MarshalJSON ¶ added in v0.4.3

func (u CustomerStateBenefitGrantProperties) MarshalJSON() ([]byte, error)

func (*CustomerStateBenefitGrantProperties) UnmarshalJSON ¶ added in v0.4.3

func (u *CustomerStateBenefitGrantProperties) UnmarshalJSON(data []byte) error

type CustomerStateBenefitGrantPropertiesType ¶ added in v0.4.3

type CustomerStateBenefitGrantPropertiesType string
const (
	CustomerStateBenefitGrantPropertiesTypeBenefitGrantDiscordProperties          CustomerStateBenefitGrantPropertiesType = "BenefitGrantDiscordProperties"
	CustomerStateBenefitGrantPropertiesTypeBenefitGrantGitHubRepositoryProperties CustomerStateBenefitGrantPropertiesType = "BenefitGrantGitHubRepositoryProperties"
	CustomerStateBenefitGrantPropertiesTypeBenefitGrantDownloadablesProperties    CustomerStateBenefitGrantPropertiesType = "BenefitGrantDownloadablesProperties"
	CustomerStateBenefitGrantPropertiesTypeBenefitGrantLicenseKeysProperties      CustomerStateBenefitGrantPropertiesType = "BenefitGrantLicenseKeysProperties"
	CustomerStateBenefitGrantPropertiesTypeBenefitGrantCustomProperties           CustomerStateBenefitGrantPropertiesType = "BenefitGrantCustomProperties"
	CustomerStateBenefitGrantPropertiesTypeBenefitGrantFeatureFlagProperties      CustomerStateBenefitGrantPropertiesType = "BenefitGrantFeatureFlagProperties"
)

type CustomerStateIndividual ¶ added in v0.16.0

type CustomerStateIndividual struct {
	// The ID of the customer.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time                    `json:"modified_at"`
	Metadata   map[string]MetadataOutputType `json:"metadata"`
	// The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
	ExternalID *string `json:"external_id,omitempty"`
	// The email address of the customer. This must be unique within the organization.
	Email string `json:"email"`
	// Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.
	EmailVerified bool `json:"email_verified"`

	// The name of the customer.
	Name           *string                         `json:"name"`
	BillingAddress *Address                        `json:"billing_address"`
	TaxID          []*CustomerStateIndividualTaxID `json:"tax_id"`
	Locale         *string                         `json:"locale,omitempty"`
	// The ID of the organization owning the customer.
	OrganizationID string `json:"organization_id"`
	// Timestamp for when the customer was soft deleted.
	DeletedAt *time.Time `json:"deleted_at"`
	// The customer's active subscriptions.
	ActiveSubscriptions []CustomerStateSubscription `json:"active_subscriptions"`
	// The customer's active benefit grants.
	GrantedBenefits []CustomerStateBenefitGrant `json:"granted_benefits"`
	// The customer's active meters.
	ActiveMeters []CustomerStateMeter `json:"active_meters"`
	AvatarURL    string               `json:"avatar_url"`
	// contains filtered or unexported fields
}

CustomerStateIndividual - A customer along with additional state information:

* Active subscriptions * Granted benefits * Active meters

func (*CustomerStateIndividual) GetActiveMeters ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetActiveMeters() []CustomerStateMeter

func (*CustomerStateIndividual) GetActiveSubscriptions ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetActiveSubscriptions() []CustomerStateSubscription

func (*CustomerStateIndividual) GetAvatarURL ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetAvatarURL() string

func (*CustomerStateIndividual) GetBillingAddress ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetBillingAddress() *Address

func (*CustomerStateIndividual) GetCreatedAt ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetCreatedAt() time.Time

func (*CustomerStateIndividual) GetDeletedAt ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetDeletedAt() *time.Time

func (*CustomerStateIndividual) GetEmail ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetEmail() string

func (*CustomerStateIndividual) GetEmailVerified ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetEmailVerified() bool

func (*CustomerStateIndividual) GetExternalID ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetExternalID() *string

func (*CustomerStateIndividual) GetGrantedBenefits ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetGrantedBenefits() []CustomerStateBenefitGrant

func (*CustomerStateIndividual) GetID ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetID() string

func (*CustomerStateIndividual) GetLocale ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetLocale() *string

func (*CustomerStateIndividual) GetMetadata ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetMetadata() map[string]MetadataOutputType

func (*CustomerStateIndividual) GetModifiedAt ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetModifiedAt() *time.Time

func (*CustomerStateIndividual) GetName ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetName() *string

func (*CustomerStateIndividual) GetOrganizationID ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetOrganizationID() string

func (*CustomerStateIndividual) GetTaxID ¶ added in v0.16.0

func (*CustomerStateIndividual) GetType ¶ added in v0.16.0

func (c *CustomerStateIndividual) GetType() string

func (CustomerStateIndividual) MarshalJSON ¶ added in v0.16.0

func (c CustomerStateIndividual) MarshalJSON() ([]byte, error)

func (*CustomerStateIndividual) UnmarshalJSON ¶ added in v0.16.0

func (c *CustomerStateIndividual) UnmarshalJSON(data []byte) error

type CustomerStateIndividualTaxID ¶ added in v0.16.0

type CustomerStateIndividualTaxID struct {
	Str         *string      `queryParam:"inline" union:"member"`
	TaxIDFormat *TaxIDFormat `queryParam:"inline" union:"member"`

	Type CustomerStateIndividualTaxIDType
}

func CreateCustomerStateIndividualTaxIDStr ¶ added in v0.16.0

func CreateCustomerStateIndividualTaxIDStr(str string) CustomerStateIndividualTaxID

func CreateCustomerStateIndividualTaxIDTaxIDFormat ¶ added in v0.16.0

func CreateCustomerStateIndividualTaxIDTaxIDFormat(taxIDFormat TaxIDFormat) CustomerStateIndividualTaxID

func (CustomerStateIndividualTaxID) MarshalJSON ¶ added in v0.16.0

func (u CustomerStateIndividualTaxID) MarshalJSON() ([]byte, error)

func (*CustomerStateIndividualTaxID) UnmarshalJSON ¶ added in v0.16.0

func (u *CustomerStateIndividualTaxID) UnmarshalJSON(data []byte) error

type CustomerStateIndividualTaxIDType ¶ added in v0.16.0

type CustomerStateIndividualTaxIDType string
const (
	CustomerStateIndividualTaxIDTypeStr         CustomerStateIndividualTaxIDType = "str"
	CustomerStateIndividualTaxIDTypeTaxIDFormat CustomerStateIndividualTaxIDType = "TaxIDFormat"
)

type CustomerStateMeter ¶ added in v0.4.10

type CustomerStateMeter struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the meter.
	MeterID string `json:"meter_id"`
	// The number of consumed units.
	ConsumedUnits float64 `json:"consumed_units"`
	// The number of credited units.
	CreditedUnits int64 `json:"credited_units"`
	// The balance of the meter, i.e. the difference between credited and consumed units.
	Balance float64 `json:"balance"`
}

CustomerStateMeter - An active meter for a customer, with latest consumed and credited units.

func (*CustomerStateMeter) GetBalance ¶ added in v0.4.10

func (c *CustomerStateMeter) GetBalance() float64

func (*CustomerStateMeter) GetConsumedUnits ¶ added in v0.4.10

func (c *CustomerStateMeter) GetConsumedUnits() float64

func (*CustomerStateMeter) GetCreatedAt ¶ added in v0.4.10

func (c *CustomerStateMeter) GetCreatedAt() time.Time

func (*CustomerStateMeter) GetCreditedUnits ¶ added in v0.4.10

func (c *CustomerStateMeter) GetCreditedUnits() int64

func (*CustomerStateMeter) GetID ¶ added in v0.5.0

func (c *CustomerStateMeter) GetID() string

func (*CustomerStateMeter) GetMeterID ¶ added in v0.4.10

func (c *CustomerStateMeter) GetMeterID() string

func (*CustomerStateMeter) GetModifiedAt ¶ added in v0.4.10

func (c *CustomerStateMeter) GetModifiedAt() *time.Time

func (CustomerStateMeter) MarshalJSON ¶ added in v0.4.10

func (c CustomerStateMeter) MarshalJSON() ([]byte, error)

func (*CustomerStateMeter) UnmarshalJSON ¶ added in v0.4.10

func (c *CustomerStateMeter) UnmarshalJSON(data []byte) error

type CustomerStateSubscription ¶ added in v0.4.3

type CustomerStateSubscription struct {
	// The ID of the subscription.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// Key-value object storing custom field values.
	CustomFieldData map[string]*CustomerStateSubscriptionCustomFieldData `json:"custom_field_data,omitempty"`
	Metadata        map[string]MetadataOutputType                        `json:"metadata"`
	Status          Status                                               `json:"status"`
	// The amount of the subscription.
	Amount int64 `json:"amount"`
	// The currency of the subscription.
	Currency          string                        `json:"currency"`
	RecurringInterval SubscriptionRecurringInterval `json:"recurring_interval"`
	// The start timestamp of the current billing period.
	CurrentPeriodStart time.Time `json:"current_period_start"`
	// The end timestamp of the current billing period.
	CurrentPeriodEnd time.Time `json:"current_period_end"`
	// The start timestamp of the trial period, if any.
	TrialStart *time.Time `json:"trial_start"`
	// The end timestamp of the trial period, if any.
	TrialEnd *time.Time `json:"trial_end"`
	// Whether the subscription will be canceled at the end of the current period.
	CancelAtPeriodEnd bool `json:"cancel_at_period_end"`
	// The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.
	CanceledAt *time.Time `json:"canceled_at"`
	// The timestamp when the subscription started.
	StartedAt *time.Time `json:"started_at"`
	// The timestamp when the subscription will end.
	EndsAt *time.Time `json:"ends_at"`
	// The ID of the subscribed product.
	ProductID string `json:"product_id"`
	// The ID of the applied discount, if any.
	DiscountID *string `json:"discount_id"`
	// List of meters associated with the subscription.
	Meters []CustomerStateSubscriptionMeter `json:"meters"`
}

CustomerStateSubscription - An active customer subscription.

func (*CustomerStateSubscription) GetAmount ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetAmount() int64

func (*CustomerStateSubscription) GetCancelAtPeriodEnd ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetCancelAtPeriodEnd() bool

func (*CustomerStateSubscription) GetCanceledAt ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetCanceledAt() *time.Time

func (*CustomerStateSubscription) GetCreatedAt ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetCreatedAt() time.Time

func (*CustomerStateSubscription) GetCurrency ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetCurrency() string

func (*CustomerStateSubscription) GetCurrentPeriodEnd ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetCurrentPeriodEnd() time.Time

func (*CustomerStateSubscription) GetCurrentPeriodStart ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetCurrentPeriodStart() time.Time

func (*CustomerStateSubscription) GetCustomFieldData ¶ added in v0.4.3

func (*CustomerStateSubscription) GetDiscountID ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetDiscountID() *string

func (*CustomerStateSubscription) GetEndsAt ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetEndsAt() *time.Time

func (*CustomerStateSubscription) GetID ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetID() string

func (*CustomerStateSubscription) GetMetadata ¶ added in v0.4.3

func (*CustomerStateSubscription) GetMeters ¶ added in v0.4.11

func (*CustomerStateSubscription) GetModifiedAt ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetModifiedAt() *time.Time

func (*CustomerStateSubscription) GetProductID ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetProductID() string

func (*CustomerStateSubscription) GetRecurringInterval ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetRecurringInterval() SubscriptionRecurringInterval

func (*CustomerStateSubscription) GetStartedAt ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetStartedAt() *time.Time

func (*CustomerStateSubscription) GetStatus ¶ added in v0.4.3

func (c *CustomerStateSubscription) GetStatus() Status

func (*CustomerStateSubscription) GetTrialEnd ¶ added in v0.9.1

func (c *CustomerStateSubscription) GetTrialEnd() *time.Time

func (*CustomerStateSubscription) GetTrialStart ¶ added in v0.9.1

func (c *CustomerStateSubscription) GetTrialStart() *time.Time

func (CustomerStateSubscription) MarshalJSON ¶ added in v0.4.3

func (c CustomerStateSubscription) MarshalJSON() ([]byte, error)

func (*CustomerStateSubscription) UnmarshalJSON ¶ added in v0.4.3

func (c *CustomerStateSubscription) UnmarshalJSON(data []byte) error

type CustomerStateSubscriptionCustomFieldData ¶ added in v0.4.3

type CustomerStateSubscriptionCustomFieldData struct {
	Str      *string    `queryParam:"inline" union:"member"`
	Integer  *int64     `queryParam:"inline" union:"member"`
	Boolean  *bool      `queryParam:"inline" union:"member"`
	DateTime *time.Time `queryParam:"inline" union:"member"`

	Type CustomerStateSubscriptionCustomFieldDataType
}

func CreateCustomerStateSubscriptionCustomFieldDataBoolean ¶ added in v0.4.3

func CreateCustomerStateSubscriptionCustomFieldDataBoolean(boolean bool) CustomerStateSubscriptionCustomFieldData

func CreateCustomerStateSubscriptionCustomFieldDataDateTime ¶ added in v0.4.3

func CreateCustomerStateSubscriptionCustomFieldDataDateTime(dateTime time.Time) CustomerStateSubscriptionCustomFieldData

func CreateCustomerStateSubscriptionCustomFieldDataInteger ¶ added in v0.4.3

func CreateCustomerStateSubscriptionCustomFieldDataInteger(integer int64) CustomerStateSubscriptionCustomFieldData

func CreateCustomerStateSubscriptionCustomFieldDataStr ¶ added in v0.4.3

func CreateCustomerStateSubscriptionCustomFieldDataStr(str string) CustomerStateSubscriptionCustomFieldData

func (CustomerStateSubscriptionCustomFieldData) MarshalJSON ¶ added in v0.4.3

func (*CustomerStateSubscriptionCustomFieldData) UnmarshalJSON ¶ added in v0.4.3

func (u *CustomerStateSubscriptionCustomFieldData) UnmarshalJSON(data []byte) error

type CustomerStateSubscriptionCustomFieldDataType ¶ added in v0.4.3

type CustomerStateSubscriptionCustomFieldDataType string
const (
	CustomerStateSubscriptionCustomFieldDataTypeStr      CustomerStateSubscriptionCustomFieldDataType = "str"
	CustomerStateSubscriptionCustomFieldDataTypeInteger  CustomerStateSubscriptionCustomFieldDataType = "integer"
	CustomerStateSubscriptionCustomFieldDataTypeBoolean  CustomerStateSubscriptionCustomFieldDataType = "boolean"
	CustomerStateSubscriptionCustomFieldDataTypeDateTime CustomerStateSubscriptionCustomFieldDataType = "date-time"
)

type CustomerStateSubscriptionMeter ¶ added in v0.4.11

type CustomerStateSubscriptionMeter struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The number of consumed units so far in this billing period.
	ConsumedUnits float64 `json:"consumed_units"`
	// The number of credited units so far in this billing period.
	CreditedUnits int64 `json:"credited_units"`
	// The amount due in cents so far in this billing period.
	Amount int64 `json:"amount"`
	// The ID of the meter.
	MeterID string `json:"meter_id"`
}

CustomerStateSubscriptionMeter - Current consumption and spending for a subscription meter.

func (*CustomerStateSubscriptionMeter) GetAmount ¶ added in v0.4.11

func (c *CustomerStateSubscriptionMeter) GetAmount() int64

func (*CustomerStateSubscriptionMeter) GetConsumedUnits ¶ added in v0.4.11

func (c *CustomerStateSubscriptionMeter) GetConsumedUnits() float64

func (*CustomerStateSubscriptionMeter) GetCreatedAt ¶ added in v0.4.11

func (c *CustomerStateSubscriptionMeter) GetCreatedAt() time.Time

func (*CustomerStateSubscriptionMeter) GetCreditedUnits ¶ added in v0.4.11

func (c *CustomerStateSubscriptionMeter) GetCreditedUnits() int64

func (*CustomerStateSubscriptionMeter) GetID ¶ added in v0.4.11

func (*CustomerStateSubscriptionMeter) GetMeterID ¶ added in v0.4.11

func (c *CustomerStateSubscriptionMeter) GetMeterID() string

func (*CustomerStateSubscriptionMeter) GetModifiedAt ¶ added in v0.4.11

func (c *CustomerStateSubscriptionMeter) GetModifiedAt() *time.Time

func (CustomerStateSubscriptionMeter) MarshalJSON ¶ added in v0.4.11

func (c CustomerStateSubscriptionMeter) MarshalJSON() ([]byte, error)

func (*CustomerStateSubscriptionMeter) UnmarshalJSON ¶ added in v0.4.11

func (c *CustomerStateSubscriptionMeter) UnmarshalJSON(data []byte) error

type CustomerStateTeam ¶ added in v0.16.0

type CustomerStateTeam struct {
	// The ID of the customer.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time                    `json:"modified_at"`
	Metadata   map[string]MetadataOutputType `json:"metadata"`
	// The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
	ExternalID *string `json:"external_id,omitempty"`
	// The email address of the customer. This must be unique within the organization.
	Email *string `json:"email,omitempty"`
	// Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.
	EmailVerified bool `json:"email_verified"`

	// The name of the customer.
	Name           *string                   `json:"name"`
	BillingAddress *Address                  `json:"billing_address"`
	TaxID          []*CustomerStateTeamTaxID `json:"tax_id"`
	Locale         *string                   `json:"locale,omitempty"`
	// The ID of the organization owning the customer.
	OrganizationID string `json:"organization_id"`
	// Timestamp for when the customer was soft deleted.
	DeletedAt *time.Time `json:"deleted_at"`
	// The customer's active subscriptions.
	ActiveSubscriptions []CustomerStateSubscription `json:"active_subscriptions"`
	// The customer's active benefit grants.
	GrantedBenefits []CustomerStateBenefitGrant `json:"granted_benefits"`
	// The customer's active meters.
	ActiveMeters []CustomerStateMeter `json:"active_meters"`
	AvatarURL    string               `json:"avatar_url"`
	// contains filtered or unexported fields
}

CustomerStateTeam - A team customer along with additional state information:

* Active subscriptions * Granted benefits * Active meters

func (*CustomerStateTeam) GetActiveMeters ¶ added in v0.16.0

func (c *CustomerStateTeam) GetActiveMeters() []CustomerStateMeter

func (*CustomerStateTeam) GetActiveSubscriptions ¶ added in v0.16.0

func (c *CustomerStateTeam) GetActiveSubscriptions() []CustomerStateSubscription

func (*CustomerStateTeam) GetAvatarURL ¶ added in v0.16.0

func (c *CustomerStateTeam) GetAvatarURL() string

func (*CustomerStateTeam) GetBillingAddress ¶ added in v0.16.0

func (c *CustomerStateTeam) GetBillingAddress() *Address

func (*CustomerStateTeam) GetCreatedAt ¶ added in v0.16.0

func (c *CustomerStateTeam) GetCreatedAt() time.Time

func (*CustomerStateTeam) GetDeletedAt ¶ added in v0.16.0

func (c *CustomerStateTeam) GetDeletedAt() *time.Time

func (*CustomerStateTeam) GetEmail ¶ added in v0.16.0

func (c *CustomerStateTeam) GetEmail() *string

func (*CustomerStateTeam) GetEmailVerified ¶ added in v0.16.0

func (c *CustomerStateTeam) GetEmailVerified() bool

func (*CustomerStateTeam) GetExternalID ¶ added in v0.16.0

func (c *CustomerStateTeam) GetExternalID() *string

func (*CustomerStateTeam) GetGrantedBenefits ¶ added in v0.16.0

func (c *CustomerStateTeam) GetGrantedBenefits() []CustomerStateBenefitGrant

func (*CustomerStateTeam) GetID ¶ added in v0.16.0

func (c *CustomerStateTeam) GetID() string

func (*CustomerStateTeam) GetLocale ¶ added in v0.16.0

func (c *CustomerStateTeam) GetLocale() *string

func (*CustomerStateTeam) GetMetadata ¶ added in v0.16.0

func (c *CustomerStateTeam) GetMetadata() map[string]MetadataOutputType

func (*CustomerStateTeam) GetModifiedAt ¶ added in v0.16.0

func (c *CustomerStateTeam) GetModifiedAt() *time.Time

func (*CustomerStateTeam) GetName ¶ added in v0.16.0

func (c *CustomerStateTeam) GetName() *string

func (*CustomerStateTeam) GetOrganizationID ¶ added in v0.16.0

func (c *CustomerStateTeam) GetOrganizationID() string

func (*CustomerStateTeam) GetTaxID ¶ added in v0.16.0

func (c *CustomerStateTeam) GetTaxID() []*CustomerStateTeamTaxID

func (*CustomerStateTeam) GetType ¶ added in v0.16.0

func (c *CustomerStateTeam) GetType() string

func (CustomerStateTeam) MarshalJSON ¶ added in v0.16.0

func (c CustomerStateTeam) MarshalJSON() ([]byte, error)

func (*CustomerStateTeam) UnmarshalJSON ¶ added in v0.16.0

func (c *CustomerStateTeam) UnmarshalJSON(data []byte) error

type CustomerStateTeamTaxID ¶ added in v0.16.0

type CustomerStateTeamTaxID struct {
	Str         *string      `queryParam:"inline" union:"member"`
	TaxIDFormat *TaxIDFormat `queryParam:"inline" union:"member"`

	Type CustomerStateTeamTaxIDType
}

func CreateCustomerStateTeamTaxIDStr ¶ added in v0.16.0

func CreateCustomerStateTeamTaxIDStr(str string) CustomerStateTeamTaxID

func CreateCustomerStateTeamTaxIDTaxIDFormat ¶ added in v0.16.0

func CreateCustomerStateTeamTaxIDTaxIDFormat(taxIDFormat TaxIDFormat) CustomerStateTeamTaxID

func (CustomerStateTeamTaxID) MarshalJSON ¶ added in v0.16.0

func (u CustomerStateTeamTaxID) MarshalJSON() ([]byte, error)

func (*CustomerStateTeamTaxID) UnmarshalJSON ¶ added in v0.16.0

func (u *CustomerStateTeamTaxID) UnmarshalJSON(data []byte) error

type CustomerStateTeamTaxIDType ¶ added in v0.16.0

type CustomerStateTeamTaxIDType string
const (
	CustomerStateTeamTaxIDTypeStr         CustomerStateTeamTaxIDType = "str"
	CustomerStateTeamTaxIDTypeTaxIDFormat CustomerStateTeamTaxIDType = "TaxIDFormat"
)

type CustomerStateType ¶ added in v0.16.0

type CustomerStateType string
const (
	CustomerStateTypeIndividual CustomerStateType = "individual"
	CustomerStateTypeTeam       CustomerStateType = "team"
)

type CustomerSubscription ¶

type CustomerSubscription struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The amount of the subscription.
	Amount int64 `json:"amount"`
	// The currency of the subscription.
	Currency          string                        `json:"currency"`
	RecurringInterval SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.
	RecurringIntervalCount int64              `json:"recurring_interval_count"`
	Status                 SubscriptionStatus `json:"status"`
	// The start timestamp of the current billing period.
	CurrentPeriodStart time.Time `json:"current_period_start"`
	// The end timestamp of the current billing period.
	CurrentPeriodEnd time.Time `json:"current_period_end"`
	// The start timestamp of the trial period, if any.
	TrialStart *time.Time `json:"trial_start"`
	// The end timestamp of the trial period, if any.
	TrialEnd *time.Time `json:"trial_end"`
	// Whether the subscription will be canceled at the end of the current period.
	CancelAtPeriodEnd bool `json:"cancel_at_period_end"`
	// The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.
	CanceledAt *time.Time `json:"canceled_at"`
	// The timestamp when the subscription started.
	StartedAt *time.Time `json:"started_at"`
	// The timestamp when the subscription will end.
	EndsAt *time.Time `json:"ends_at"`
	// The timestamp when the subscription ended.
	EndedAt *time.Time `json:"ended_at"`
	// The ID of the subscribed customer.
	CustomerID string `json:"customer_id"`
	// The ID of the subscribed product.
	ProductID string `json:"product_id"`
	// The ID of the applied discount, if any.
	DiscountID *string `json:"discount_id"`
	CheckoutID *string `json:"checkout_id"`
	// The number of seats for seat-based subscriptions. None for non-seat subscriptions.
	Seats                       *int64                      `json:"seats,omitempty"`
	CustomerCancellationReason  *CustomerCancellationReason `json:"customer_cancellation_reason"`
	CustomerCancellationComment *string                     `json:"customer_cancellation_comment"`
	Product                     CustomerSubscriptionProduct `json:"product"`
	// List of enabled prices for the subscription.
	Prices []CustomerSubscriptionPrices `json:"prices"`
	// List of meters associated with the subscription.
	Meters []CustomerSubscriptionMeter `json:"meters"`
	// Pending subscription update that will be applied at the beginning of the next period. If `null`, there is no pending update.
	PendingUpdate *PendingSubscriptionUpdate `json:"pending_update"`
}

func (*CustomerSubscription) GetAmount ¶

func (c *CustomerSubscription) GetAmount() int64

func (*CustomerSubscription) GetCancelAtPeriodEnd ¶

func (c *CustomerSubscription) GetCancelAtPeriodEnd() bool

func (*CustomerSubscription) GetCanceledAt ¶ added in v0.1.1

func (c *CustomerSubscription) GetCanceledAt() *time.Time

func (*CustomerSubscription) GetCheckoutID ¶

func (c *CustomerSubscription) GetCheckoutID() *string

func (*CustomerSubscription) GetCreatedAt ¶

func (c *CustomerSubscription) GetCreatedAt() time.Time

func (*CustomerSubscription) GetCurrency ¶

func (c *CustomerSubscription) GetCurrency() string

func (*CustomerSubscription) GetCurrentPeriodEnd ¶

func (c *CustomerSubscription) GetCurrentPeriodEnd() time.Time

func (*CustomerSubscription) GetCurrentPeriodStart ¶

func (c *CustomerSubscription) GetCurrentPeriodStart() time.Time

func (*CustomerSubscription) GetCustomerCancellationComment ¶ added in v0.1.1

func (c *CustomerSubscription) GetCustomerCancellationComment() *string

func (*CustomerSubscription) GetCustomerCancellationReason ¶ added in v0.1.1

func (c *CustomerSubscription) GetCustomerCancellationReason() *CustomerCancellationReason

func (*CustomerSubscription) GetCustomerID ¶

func (c *CustomerSubscription) GetCustomerID() string

func (*CustomerSubscription) GetDiscountID ¶

func (c *CustomerSubscription) GetDiscountID() *string

func (*CustomerSubscription) GetEndedAt ¶

func (c *CustomerSubscription) GetEndedAt() *time.Time

func (*CustomerSubscription) GetEndsAt ¶ added in v0.1.1

func (c *CustomerSubscription) GetEndsAt() *time.Time

func (*CustomerSubscription) GetID ¶

func (c *CustomerSubscription) GetID() string

func (*CustomerSubscription) GetMeters ¶ added in v0.4.11

func (*CustomerSubscription) GetModifiedAt ¶

func (c *CustomerSubscription) GetModifiedAt() *time.Time

func (*CustomerSubscription) GetPendingUpdate ¶ added in v0.15.1

func (c *CustomerSubscription) GetPendingUpdate() *PendingSubscriptionUpdate

func (*CustomerSubscription) GetPrices ¶ added in v0.4.6

func (*CustomerSubscription) GetProduct ¶

func (*CustomerSubscription) GetProductID ¶

func (c *CustomerSubscription) GetProductID() string

func (*CustomerSubscription) GetRecurringInterval ¶

func (c *CustomerSubscription) GetRecurringInterval() SubscriptionRecurringInterval

func (*CustomerSubscription) GetRecurringIntervalCount ¶ added in v0.12.0

func (c *CustomerSubscription) GetRecurringIntervalCount() int64

func (*CustomerSubscription) GetSeats ¶ added in v0.12.0

func (c *CustomerSubscription) GetSeats() *int64

func (*CustomerSubscription) GetStartedAt ¶

func (c *CustomerSubscription) GetStartedAt() *time.Time

func (*CustomerSubscription) GetStatus ¶

func (*CustomerSubscription) GetTrialEnd ¶ added in v0.9.1

func (c *CustomerSubscription) GetTrialEnd() *time.Time

func (*CustomerSubscription) GetTrialStart ¶ added in v0.9.1

func (c *CustomerSubscription) GetTrialStart() *time.Time

func (CustomerSubscription) MarshalJSON ¶

func (c CustomerSubscription) MarshalJSON() ([]byte, error)

func (*CustomerSubscription) UnmarshalJSON ¶

func (c *CustomerSubscription) UnmarshalJSON(data []byte) error

type CustomerSubscriptionCancel ¶ added in v0.1.1

type CustomerSubscriptionCancel struct {
	// Cancel an active subscription once the current period ends.
	//
	// Or uncancel a subscription currently set to be revoked at period end.
	CancelAtPeriodEnd *bool `json:"cancel_at_period_end,omitempty"`
	// Customers reason for cancellation.
	//
	// * `too_expensive`: Too expensive for the customer.
	// * `missing_features`: Customer is missing certain features.
	// * `switched_service`: Customer switched to another service.
	// * `unused`: Customer is not using it enough.
	// * `customer_service`: Customer is not satisfied with the customer service.
	// * `low_quality`: Customer is unhappy with the quality.
	// * `too_complex`: Customer considers the service too complicated.
	// * `other`: Other reason(s).
	CancellationReason *CustomerCancellationReason `json:"cancellation_reason,omitempty"`
	// Customer feedback and why they decided to cancel.
	CancellationComment *string `json:"cancellation_comment,omitempty"`
}

func (*CustomerSubscriptionCancel) GetCancelAtPeriodEnd ¶ added in v0.1.1

func (c *CustomerSubscriptionCancel) GetCancelAtPeriodEnd() *bool

func (*CustomerSubscriptionCancel) GetCancellationComment ¶ added in v0.1.1

func (c *CustomerSubscriptionCancel) GetCancellationComment() *string

func (*CustomerSubscriptionCancel) GetCancellationReason ¶ added in v0.1.1

func (c *CustomerSubscriptionCancel) GetCancellationReason() *CustomerCancellationReason

func (CustomerSubscriptionCancel) MarshalJSON ¶ added in v0.8.4

func (c CustomerSubscriptionCancel) MarshalJSON() ([]byte, error)

func (*CustomerSubscriptionCancel) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomerSubscriptionCancel) UnmarshalJSON(data []byte) error

type CustomerSubscriptionMeter ¶ added in v0.4.11

type CustomerSubscriptionMeter struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The number of consumed units so far in this billing period.
	ConsumedUnits float64 `json:"consumed_units"`
	// The number of credited units so far in this billing period.
	CreditedUnits int64 `json:"credited_units"`
	// The amount due in cents so far in this billing period.
	Amount int64 `json:"amount"`
	// The ID of the meter.
	MeterID string                         `json:"meter_id"`
	Meter   CustomerSubscriptionMeterMeter `json:"meter"`
}

func (*CustomerSubscriptionMeter) GetAmount ¶ added in v0.4.11

func (c *CustomerSubscriptionMeter) GetAmount() int64

func (*CustomerSubscriptionMeter) GetConsumedUnits ¶ added in v0.4.11

func (c *CustomerSubscriptionMeter) GetConsumedUnits() float64

func (*CustomerSubscriptionMeter) GetCreatedAt ¶ added in v0.4.11

func (c *CustomerSubscriptionMeter) GetCreatedAt() time.Time

func (*CustomerSubscriptionMeter) GetCreditedUnits ¶ added in v0.4.11

func (c *CustomerSubscriptionMeter) GetCreditedUnits() int64

func (*CustomerSubscriptionMeter) GetID ¶ added in v0.4.11

func (c *CustomerSubscriptionMeter) GetID() string

func (*CustomerSubscriptionMeter) GetMeter ¶ added in v0.4.11

func (*CustomerSubscriptionMeter) GetMeterID ¶ added in v0.4.11

func (c *CustomerSubscriptionMeter) GetMeterID() string

func (*CustomerSubscriptionMeter) GetModifiedAt ¶ added in v0.4.11

func (c *CustomerSubscriptionMeter) GetModifiedAt() *time.Time

func (CustomerSubscriptionMeter) MarshalJSON ¶ added in v0.4.11

func (c CustomerSubscriptionMeter) MarshalJSON() ([]byte, error)

func (*CustomerSubscriptionMeter) UnmarshalJSON ¶ added in v0.4.11

func (c *CustomerSubscriptionMeter) UnmarshalJSON(data []byte) error

type CustomerSubscriptionMeterMeter ¶ added in v0.4.11

type CustomerSubscriptionMeterMeter struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The name of the meter. Will be shown on customer's invoices and usage.
	Name string `json:"name"`
}

func (*CustomerSubscriptionMeterMeter) GetCreatedAt ¶ added in v0.4.11

func (c *CustomerSubscriptionMeterMeter) GetCreatedAt() time.Time

func (*CustomerSubscriptionMeterMeter) GetID ¶ added in v0.4.11

func (*CustomerSubscriptionMeterMeter) GetModifiedAt ¶ added in v0.4.11

func (c *CustomerSubscriptionMeterMeter) GetModifiedAt() *time.Time

func (*CustomerSubscriptionMeterMeter) GetName ¶ added in v0.4.11

func (CustomerSubscriptionMeterMeter) MarshalJSON ¶ added in v0.4.11

func (c CustomerSubscriptionMeterMeter) MarshalJSON() ([]byte, error)

func (*CustomerSubscriptionMeterMeter) UnmarshalJSON ¶ added in v0.4.11

func (c *CustomerSubscriptionMeterMeter) UnmarshalJSON(data []byte) error

type CustomerSubscriptionPrices ¶ added in v0.4.6

type CustomerSubscriptionPrices struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CustomerSubscriptionPricesType
}

func CreateCustomerSubscriptionPricesLegacyRecurringProductPrice ¶ added in v0.4.6

func CreateCustomerSubscriptionPricesLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CustomerSubscriptionPrices

func CreateCustomerSubscriptionPricesProductPrice ¶ added in v0.4.6

func CreateCustomerSubscriptionPricesProductPrice(productPrice ProductPrice) CustomerSubscriptionPrices

func (CustomerSubscriptionPrices) MarshalJSON ¶ added in v0.4.6

func (u CustomerSubscriptionPrices) MarshalJSON() ([]byte, error)

func (*CustomerSubscriptionPrices) UnmarshalJSON ¶ added in v0.4.6

func (u *CustomerSubscriptionPrices) UnmarshalJSON(data []byte) error

type CustomerSubscriptionPricesType ¶ added in v0.4.6

type CustomerSubscriptionPricesType string
const (
	CustomerSubscriptionPricesTypeLegacyRecurringProductPrice CustomerSubscriptionPricesType = "LegacyRecurringProductPrice"
	CustomerSubscriptionPricesTypeProductPrice                CustomerSubscriptionPricesType = "ProductPrice"
)

type CustomerSubscriptionProduct ¶

type CustomerSubscriptionProduct struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count"`
	// The name of the product.
	Name string `json:"name"`
	// The description of the product.
	Description *string           `json:"description"`
	Visibility  ProductVisibility `json:"visibility"`
	// The recurring interval of the product. If `None`, the product is a one-time purchase.
	RecurringInterval *SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
	RecurringIntervalCount *int64 `json:"recurring_interval_count"`
	// Whether the product is a subscription.
	IsRecurring bool `json:"is_recurring"`
	// Whether the product is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the organization owning the product.
	OrganizationID string `json:"organization_id"`
	// List of prices for this product.
	Prices []CustomerSubscriptionProductPrices `json:"prices"`
	// List of benefits granted by the product.
	Benefits []BenefitPublic `json:"benefits"`
	// List of medias associated to the product.
	Medias       []ProductMediaFileRead `json:"medias"`
	Organization CustomerOrganization   `json:"organization"`
}

func (*CustomerSubscriptionProduct) GetBenefits ¶

func (c *CustomerSubscriptionProduct) GetBenefits() []BenefitPublic

func (*CustomerSubscriptionProduct) GetCreatedAt ¶

func (c *CustomerSubscriptionProduct) GetCreatedAt() time.Time

func (*CustomerSubscriptionProduct) GetDescription ¶

func (c *CustomerSubscriptionProduct) GetDescription() *string

func (*CustomerSubscriptionProduct) GetID ¶

func (*CustomerSubscriptionProduct) GetIsArchived ¶

func (c *CustomerSubscriptionProduct) GetIsArchived() bool

func (*CustomerSubscriptionProduct) GetIsRecurring ¶

func (c *CustomerSubscriptionProduct) GetIsRecurring() bool

func (*CustomerSubscriptionProduct) GetMedias ¶

func (*CustomerSubscriptionProduct) GetModifiedAt ¶

func (c *CustomerSubscriptionProduct) GetModifiedAt() *time.Time

func (*CustomerSubscriptionProduct) GetName ¶

func (c *CustomerSubscriptionProduct) GetName() string

func (*CustomerSubscriptionProduct) GetOrganization ¶

func (*CustomerSubscriptionProduct) GetOrganizationID ¶

func (c *CustomerSubscriptionProduct) GetOrganizationID() string

func (*CustomerSubscriptionProduct) GetPrices ¶

func (*CustomerSubscriptionProduct) GetRecurringInterval ¶ added in v0.3.0

func (*CustomerSubscriptionProduct) GetRecurringIntervalCount ¶ added in v0.12.0

func (c *CustomerSubscriptionProduct) GetRecurringIntervalCount() *int64

func (*CustomerSubscriptionProduct) GetTrialInterval ¶ added in v0.9.1

func (c *CustomerSubscriptionProduct) GetTrialInterval() *TrialInterval

func (*CustomerSubscriptionProduct) GetTrialIntervalCount ¶ added in v0.9.1

func (c *CustomerSubscriptionProduct) GetTrialIntervalCount() *int64

func (*CustomerSubscriptionProduct) GetVisibility ¶ added in v0.13.0

func (CustomerSubscriptionProduct) MarshalJSON ¶

func (c CustomerSubscriptionProduct) MarshalJSON() ([]byte, error)

func (*CustomerSubscriptionProduct) UnmarshalJSON ¶

func (c *CustomerSubscriptionProduct) UnmarshalJSON(data []byte) error

type CustomerSubscriptionProductPrices ¶ added in v0.3.0

type CustomerSubscriptionProductPrices struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type CustomerSubscriptionProductPricesType
}

func CreateCustomerSubscriptionProductPricesLegacyRecurringProductPrice ¶ added in v0.3.0

func CreateCustomerSubscriptionProductPricesLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) CustomerSubscriptionProductPrices

func CreateCustomerSubscriptionProductPricesProductPrice ¶ added in v0.3.0

func CreateCustomerSubscriptionProductPricesProductPrice(productPrice ProductPrice) CustomerSubscriptionProductPrices

func (CustomerSubscriptionProductPrices) MarshalJSON ¶ added in v0.3.0

func (u CustomerSubscriptionProductPrices) MarshalJSON() ([]byte, error)

func (*CustomerSubscriptionProductPrices) UnmarshalJSON ¶ added in v0.3.0

func (u *CustomerSubscriptionProductPrices) UnmarshalJSON(data []byte) error

type CustomerSubscriptionProductPricesType ¶ added in v0.3.0

type CustomerSubscriptionProductPricesType string
const (
	CustomerSubscriptionProductPricesTypeLegacyRecurringProductPrice CustomerSubscriptionProductPricesType = "LegacyRecurringProductPrice"
	CustomerSubscriptionProductPricesTypeProductPrice                CustomerSubscriptionProductPricesType = "ProductPrice"
)

type CustomerSubscriptionSortProperty ¶

type CustomerSubscriptionSortProperty string
const (
	CustomerSubscriptionSortPropertyStartedAt         CustomerSubscriptionSortProperty = "started_at"
	CustomerSubscriptionSortPropertyMinusStartedAt    CustomerSubscriptionSortProperty = "-started_at"
	CustomerSubscriptionSortPropertyAmount            CustomerSubscriptionSortProperty = "amount"
	CustomerSubscriptionSortPropertyMinusAmount       CustomerSubscriptionSortProperty = "-amount"
	CustomerSubscriptionSortPropertyStatus            CustomerSubscriptionSortProperty = "status"
	CustomerSubscriptionSortPropertyMinusStatus       CustomerSubscriptionSortProperty = "-status"
	CustomerSubscriptionSortPropertyOrganization      CustomerSubscriptionSortProperty = "organization"
	CustomerSubscriptionSortPropertyMinusOrganization CustomerSubscriptionSortProperty = "-organization"
	CustomerSubscriptionSortPropertyProduct           CustomerSubscriptionSortProperty = "product"
	CustomerSubscriptionSortPropertyMinusProduct      CustomerSubscriptionSortProperty = "-product"
)

func (CustomerSubscriptionSortProperty) ToPointer ¶

func (*CustomerSubscriptionSortProperty) UnmarshalJSON ¶

func (e *CustomerSubscriptionSortProperty) UnmarshalJSON(data []byte) error

type CustomerSubscriptionUpdate ¶

type CustomerSubscriptionUpdate struct {
	CustomerSubscriptionUpdateProduct *CustomerSubscriptionUpdateProduct `queryParam:"inline" union:"member"`
	CustomerSubscriptionUpdateSeats   *CustomerSubscriptionUpdateSeats   `queryParam:"inline" union:"member"`
	CustomerSubscriptionCancel        *CustomerSubscriptionCancel        `queryParam:"inline" union:"member"`

	Type CustomerSubscriptionUpdateType
}

func CreateCustomerSubscriptionUpdateCustomerSubscriptionCancel ¶ added in v0.1.1

func CreateCustomerSubscriptionUpdateCustomerSubscriptionCancel(customerSubscriptionCancel CustomerSubscriptionCancel) CustomerSubscriptionUpdate

func CreateCustomerSubscriptionUpdateCustomerSubscriptionUpdateProduct ¶ added in v0.3.0

func CreateCustomerSubscriptionUpdateCustomerSubscriptionUpdateProduct(customerSubscriptionUpdateProduct CustomerSubscriptionUpdateProduct) CustomerSubscriptionUpdate

func CreateCustomerSubscriptionUpdateCustomerSubscriptionUpdateSeats ¶ added in v0.12.0

func CreateCustomerSubscriptionUpdateCustomerSubscriptionUpdateSeats(customerSubscriptionUpdateSeats CustomerSubscriptionUpdateSeats) CustomerSubscriptionUpdate

func (CustomerSubscriptionUpdate) MarshalJSON ¶ added in v0.1.1

func (u CustomerSubscriptionUpdate) MarshalJSON() ([]byte, error)

func (*CustomerSubscriptionUpdate) UnmarshalJSON ¶ added in v0.1.1

func (u *CustomerSubscriptionUpdate) UnmarshalJSON(data []byte) error

type CustomerSubscriptionUpdateProduct ¶ added in v0.3.0

type CustomerSubscriptionUpdateProduct struct {
	// Update subscription to another product.
	ProductID string `json:"product_id"`
}

func (*CustomerSubscriptionUpdateProduct) GetProductID ¶ added in v0.3.0

func (c *CustomerSubscriptionUpdateProduct) GetProductID() string

func (CustomerSubscriptionUpdateProduct) MarshalJSON ¶ added in v0.8.4

func (c CustomerSubscriptionUpdateProduct) MarshalJSON() ([]byte, error)

func (*CustomerSubscriptionUpdateProduct) UnmarshalJSON ¶ added in v0.8.4

func (c *CustomerSubscriptionUpdateProduct) UnmarshalJSON(data []byte) error

type CustomerSubscriptionUpdateSeats ¶ added in v0.12.0

type CustomerSubscriptionUpdateSeats struct {
	// Update the number of seats for this subscription.
	Seats int64 `json:"seats"`
	// Determine how to handle the proration billing. If not provided, will use the default organization setting.
	ProrationBehavior *SubscriptionProrationBehavior `json:"proration_behavior,omitempty"`
}

func (*CustomerSubscriptionUpdateSeats) GetProrationBehavior ¶ added in v0.12.0

func (*CustomerSubscriptionUpdateSeats) GetSeats ¶ added in v0.12.0

func (c *CustomerSubscriptionUpdateSeats) GetSeats() int64

func (CustomerSubscriptionUpdateSeats) MarshalJSON ¶ added in v0.12.0

func (c CustomerSubscriptionUpdateSeats) MarshalJSON() ([]byte, error)

func (*CustomerSubscriptionUpdateSeats) UnmarshalJSON ¶ added in v0.12.0

func (c *CustomerSubscriptionUpdateSeats) UnmarshalJSON(data []byte) error

type CustomerSubscriptionUpdateType ¶ added in v0.1.1

type CustomerSubscriptionUpdateType string
const (
	CustomerSubscriptionUpdateTypeCustomerSubscriptionUpdateProduct CustomerSubscriptionUpdateType = "CustomerSubscriptionUpdateProduct"
	CustomerSubscriptionUpdateTypeCustomerSubscriptionUpdateSeats   CustomerSubscriptionUpdateType = "CustomerSubscriptionUpdateSeats"
	CustomerSubscriptionUpdateTypeCustomerSubscriptionCancel        CustomerSubscriptionUpdateType = "CustomerSubscriptionCancel"
)

type CustomerTeam ¶ added in v0.16.0

type CustomerTeam struct {
	// The ID of the customer.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time                    `json:"modified_at"`
	Metadata   map[string]MetadataOutputType `json:"metadata"`
	// The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
	ExternalID *string `json:"external_id,omitempty"`
	// The email address of the customer. This must be unique within the organization.
	Email *string `json:"email,omitempty"`
	// Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.
	EmailVerified bool `json:"email_verified"`

	// The name of the customer.
	Name           *string              `json:"name"`
	BillingAddress *Address             `json:"billing_address"`
	TaxID          []*CustomerTeamTaxID `json:"tax_id"`
	Locale         *string              `json:"locale,omitempty"`
	// The ID of the organization owning the customer.
	OrganizationID string `json:"organization_id"`
	// Timestamp for when the customer was soft deleted.
	DeletedAt *time.Time `json:"deleted_at"`
	AvatarURL string     `json:"avatar_url"`
	// contains filtered or unexported fields
}

CustomerTeam - A team customer in an organization.

func (*CustomerTeam) GetAvatarURL ¶ added in v0.16.0

func (c *CustomerTeam) GetAvatarURL() string

func (*CustomerTeam) GetBillingAddress ¶ added in v0.16.0

func (c *CustomerTeam) GetBillingAddress() *Address

func (*CustomerTeam) GetCreatedAt ¶ added in v0.16.0

func (c *CustomerTeam) GetCreatedAt() time.Time

func (*CustomerTeam) GetDeletedAt ¶ added in v0.16.0

func (c *CustomerTeam) GetDeletedAt() *time.Time

func (*CustomerTeam) GetEmail ¶ added in v0.16.0

func (c *CustomerTeam) GetEmail() *string

func (*CustomerTeam) GetEmailVerified ¶ added in v0.16.0

func (c *CustomerTeam) GetEmailVerified() bool

func (*CustomerTeam) GetExternalID ¶ added in v0.16.0

func (c *CustomerTeam) GetExternalID() *string

func (*CustomerTeam) GetID ¶ added in v0.16.0

func (c *CustomerTeam) GetID() string

func (*CustomerTeam) GetLocale ¶ added in v0.16.0

func (c *CustomerTeam) GetLocale() *string

func (*CustomerTeam) GetMetadata ¶ added in v0.16.0

func (c *CustomerTeam) GetMetadata() map[string]MetadataOutputType

func (*CustomerTeam) GetModifiedAt ¶ added in v0.16.0

func (c *CustomerTeam) GetModifiedAt() *time.Time

func (*CustomerTeam) GetName ¶ added in v0.16.0

func (c *CustomerTeam) GetName() *string

func (*CustomerTeam) GetOrganizationID ¶ added in v0.16.0

func (c *CustomerTeam) GetOrganizationID() string

func (*CustomerTeam) GetTaxID ¶ added in v0.16.0

func (c *CustomerTeam) GetTaxID() []*CustomerTeamTaxID

func (*CustomerTeam) GetType ¶ added in v0.16.0

func (c *CustomerTeam) GetType() string

func (CustomerTeam) MarshalJSON ¶ added in v0.16.0

func (c CustomerTeam) MarshalJSON() ([]byte, error)

func (*CustomerTeam) UnmarshalJSON ¶ added in v0.16.0

func (c *CustomerTeam) UnmarshalJSON(data []byte) error

type CustomerTeamCreate ¶ added in v0.16.0

type CustomerTeamCreate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomerTeamCreateMetadata `json:"metadata,omitempty"`
	// The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
	ExternalID     *string       `json:"external_id,omitempty"`
	Name           *string       `json:"name,omitempty"`
	BillingAddress *AddressInput `json:"billing_address,omitempty"`
	TaxID          *string       `json:"tax_id,omitempty"`
	Locale         *string       `json:"locale,omitempty"`
	// The ID of the organization owning the customer. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
	// Optional owner member to create with the customer. If not provided, an owner member will be automatically created using the customer's email and name.
	Owner *MemberOwnerCreate `json:"owner,omitempty"`

	// The email address of the team customer. Optional for team customers — if omitted, an owner with an email must be provided.
	Email *string `json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*CustomerTeamCreate) GetBillingAddress ¶ added in v0.16.0

func (c *CustomerTeamCreate) GetBillingAddress() *AddressInput

func (*CustomerTeamCreate) GetEmail ¶ added in v0.16.0

func (c *CustomerTeamCreate) GetEmail() *string

func (*CustomerTeamCreate) GetExternalID ¶ added in v0.16.0

func (c *CustomerTeamCreate) GetExternalID() *string

func (*CustomerTeamCreate) GetLocale ¶ added in v0.16.0

func (c *CustomerTeamCreate) GetLocale() *string

func (*CustomerTeamCreate) GetMetadata ¶ added in v0.16.0

func (*CustomerTeamCreate) GetName ¶ added in v0.16.0

func (c *CustomerTeamCreate) GetName() *string

func (*CustomerTeamCreate) GetOrganizationID ¶ added in v0.16.0

func (c *CustomerTeamCreate) GetOrganizationID() *string

func (*CustomerTeamCreate) GetOwner ¶ added in v0.16.0

func (c *CustomerTeamCreate) GetOwner() *MemberOwnerCreate

func (*CustomerTeamCreate) GetTaxID ¶ added in v0.16.0

func (c *CustomerTeamCreate) GetTaxID() *string

func (*CustomerTeamCreate) GetType ¶ added in v0.16.0

func (c *CustomerTeamCreate) GetType() string

func (CustomerTeamCreate) MarshalJSON ¶ added in v0.16.0

func (c CustomerTeamCreate) MarshalJSON() ([]byte, error)

func (*CustomerTeamCreate) UnmarshalJSON ¶ added in v0.16.0

func (c *CustomerTeamCreate) UnmarshalJSON(data []byte) error

type CustomerTeamCreateMetadata ¶ added in v0.16.0

type CustomerTeamCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomerTeamCreateMetadataType
}

func CreateCustomerTeamCreateMetadataBoolean ¶ added in v0.16.0

func CreateCustomerTeamCreateMetadataBoolean(boolean bool) CustomerTeamCreateMetadata

func CreateCustomerTeamCreateMetadataInteger ¶ added in v0.16.0

func CreateCustomerTeamCreateMetadataInteger(integer int64) CustomerTeamCreateMetadata

func CreateCustomerTeamCreateMetadataNumber ¶ added in v0.16.0

func CreateCustomerTeamCreateMetadataNumber(number float64) CustomerTeamCreateMetadata

func CreateCustomerTeamCreateMetadataStr ¶ added in v0.16.0

func CreateCustomerTeamCreateMetadataStr(str string) CustomerTeamCreateMetadata

func (CustomerTeamCreateMetadata) MarshalJSON ¶ added in v0.16.0

func (u CustomerTeamCreateMetadata) MarshalJSON() ([]byte, error)

func (*CustomerTeamCreateMetadata) UnmarshalJSON ¶ added in v0.16.0

func (u *CustomerTeamCreateMetadata) UnmarshalJSON(data []byte) error

type CustomerTeamCreateMetadataType ¶ added in v0.16.0

type CustomerTeamCreateMetadataType string
const (
	CustomerTeamCreateMetadataTypeStr     CustomerTeamCreateMetadataType = "str"
	CustomerTeamCreateMetadataTypeInteger CustomerTeamCreateMetadataType = "integer"
	CustomerTeamCreateMetadataTypeNumber  CustomerTeamCreateMetadataType = "number"
	CustomerTeamCreateMetadataTypeBoolean CustomerTeamCreateMetadataType = "boolean"
)

type CustomerTeamTaxID ¶ added in v0.16.0

type CustomerTeamTaxID struct {
	Str         *string      `queryParam:"inline" union:"member"`
	TaxIDFormat *TaxIDFormat `queryParam:"inline" union:"member"`

	Type CustomerTeamTaxIDType
}

func CreateCustomerTeamTaxIDStr ¶ added in v0.16.0

func CreateCustomerTeamTaxIDStr(str string) CustomerTeamTaxID

func CreateCustomerTeamTaxIDTaxIDFormat ¶ added in v0.16.0

func CreateCustomerTeamTaxIDTaxIDFormat(taxIDFormat TaxIDFormat) CustomerTeamTaxID

func (CustomerTeamTaxID) MarshalJSON ¶ added in v0.16.0

func (u CustomerTeamTaxID) MarshalJSON() ([]byte, error)

func (*CustomerTeamTaxID) UnmarshalJSON ¶ added in v0.16.0

func (u *CustomerTeamTaxID) UnmarshalJSON(data []byte) error

type CustomerTeamTaxIDType ¶ added in v0.16.0

type CustomerTeamTaxIDType string
const (
	CustomerTeamTaxIDTypeStr         CustomerTeamTaxIDType = "str"
	CustomerTeamTaxIDTypeTaxIDFormat CustomerTeamTaxIDType = "TaxIDFormat"
)

type CustomerType ¶ added in v0.13.0

type CustomerType string
const (
	CustomerTypeIndividual CustomerType = "individual"
	CustomerTypeTeam       CustomerType = "team"
)

func (CustomerType) ToPointer ¶ added in v0.13.0

func (e CustomerType) ToPointer() *CustomerType

func (*CustomerType) UnmarshalJSON ¶ added in v0.13.0

func (e *CustomerType) UnmarshalJSON(data []byte) error

type CustomerUnionType ¶ added in v0.16.0

type CustomerUnionType string
const (
	CustomerUnionTypeIndividual CustomerUnionType = "individual"
	CustomerUnionTypeTeam       CustomerUnionType = "team"
)

type CustomerUpdate ¶

type CustomerUpdate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomerUpdateMetadata `json:"metadata,omitempty"`
	// The email address of the customer. This must be unique within the organization.
	Email          *string       `json:"email,omitempty"`
	Name           *string       `json:"name,omitempty"`
	BillingAddress *AddressInput `json:"billing_address,omitempty"`
	TaxID          *string       `json:"tax_id,omitempty"`
	Locale         *string       `json:"locale,omitempty"`
	// The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
	ExternalID *string `json:"external_id,omitempty"`
	// The customer type. Can only be upgraded from 'individual' to 'team', never downgraded.
	Type *CustomerType `json:"type,omitempty"`
}

func (*CustomerUpdate) GetBillingAddress ¶

func (c *CustomerUpdate) GetBillingAddress() *AddressInput

func (*CustomerUpdate) GetEmail ¶

func (c *CustomerUpdate) GetEmail() *string

func (*CustomerUpdate) GetExternalID ¶ added in v0.4.1

func (c *CustomerUpdate) GetExternalID() *string

func (*CustomerUpdate) GetLocale ¶ added in v0.13.0

func (c *CustomerUpdate) GetLocale() *string

func (*CustomerUpdate) GetMetadata ¶ added in v0.1.5

func (c *CustomerUpdate) GetMetadata() map[string]CustomerUpdateMetadata

func (*CustomerUpdate) GetName ¶

func (c *CustomerUpdate) GetName() *string

func (*CustomerUpdate) GetTaxID ¶

func (c *CustomerUpdate) GetTaxID() *string

func (*CustomerUpdate) GetType ¶ added in v0.13.0

func (c *CustomerUpdate) GetType() *CustomerType

type CustomerUpdateExternalID ¶ added in v0.4.16

type CustomerUpdateExternalID struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]CustomerUpdateExternalIDMetadata `json:"metadata,omitempty"`
	// The email address of the customer. This must be unique within the organization.
	Email          *string       `json:"email,omitempty"`
	Name           *string       `json:"name,omitempty"`
	BillingAddress *AddressInput `json:"billing_address,omitempty"`
	TaxID          *string       `json:"tax_id,omitempty"`
	Locale         *string       `json:"locale,omitempty"`
}

func (*CustomerUpdateExternalID) GetBillingAddress ¶ added in v0.4.16

func (c *CustomerUpdateExternalID) GetBillingAddress() *AddressInput

func (*CustomerUpdateExternalID) GetEmail ¶ added in v0.4.16

func (c *CustomerUpdateExternalID) GetEmail() *string

func (*CustomerUpdateExternalID) GetLocale ¶ added in v0.13.0

func (c *CustomerUpdateExternalID) GetLocale() *string

func (*CustomerUpdateExternalID) GetMetadata ¶ added in v0.4.16

func (*CustomerUpdateExternalID) GetName ¶ added in v0.4.16

func (c *CustomerUpdateExternalID) GetName() *string

func (*CustomerUpdateExternalID) GetTaxID ¶ added in v0.4.16

func (c *CustomerUpdateExternalID) GetTaxID() *string

type CustomerUpdateExternalIDMetadata ¶ added in v0.4.16

type CustomerUpdateExternalIDMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomerUpdateExternalIDMetadataType
}

func CreateCustomerUpdateExternalIDMetadataBoolean ¶ added in v0.4.16

func CreateCustomerUpdateExternalIDMetadataBoolean(boolean bool) CustomerUpdateExternalIDMetadata

func CreateCustomerUpdateExternalIDMetadataInteger ¶ added in v0.4.16

func CreateCustomerUpdateExternalIDMetadataInteger(integer int64) CustomerUpdateExternalIDMetadata

func CreateCustomerUpdateExternalIDMetadataNumber ¶ added in v0.4.16

func CreateCustomerUpdateExternalIDMetadataNumber(number float64) CustomerUpdateExternalIDMetadata

func CreateCustomerUpdateExternalIDMetadataStr ¶ added in v0.4.16

func CreateCustomerUpdateExternalIDMetadataStr(str string) CustomerUpdateExternalIDMetadata

func (CustomerUpdateExternalIDMetadata) MarshalJSON ¶ added in v0.4.16

func (u CustomerUpdateExternalIDMetadata) MarshalJSON() ([]byte, error)

func (*CustomerUpdateExternalIDMetadata) UnmarshalJSON ¶ added in v0.4.16

func (u *CustomerUpdateExternalIDMetadata) UnmarshalJSON(data []byte) error

type CustomerUpdateExternalIDMetadataType ¶ added in v0.4.16

type CustomerUpdateExternalIDMetadataType string
const (
	CustomerUpdateExternalIDMetadataTypeStr     CustomerUpdateExternalIDMetadataType = "str"
	CustomerUpdateExternalIDMetadataTypeInteger CustomerUpdateExternalIDMetadataType = "integer"
	CustomerUpdateExternalIDMetadataTypeNumber  CustomerUpdateExternalIDMetadataType = "number"
	CustomerUpdateExternalIDMetadataTypeBoolean CustomerUpdateExternalIDMetadataType = "boolean"
)

type CustomerUpdateMetadata ¶ added in v0.1.5

type CustomerUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type CustomerUpdateMetadataType
}

func CreateCustomerUpdateMetadataBoolean ¶ added in v0.1.5

func CreateCustomerUpdateMetadataBoolean(boolean bool) CustomerUpdateMetadata

func CreateCustomerUpdateMetadataInteger ¶ added in v0.1.5

func CreateCustomerUpdateMetadataInteger(integer int64) CustomerUpdateMetadata

func CreateCustomerUpdateMetadataNumber ¶ added in v0.4.12

func CreateCustomerUpdateMetadataNumber(number float64) CustomerUpdateMetadata

func CreateCustomerUpdateMetadataStr ¶ added in v0.1.5

func CreateCustomerUpdateMetadataStr(str string) CustomerUpdateMetadata

func (CustomerUpdateMetadata) MarshalJSON ¶ added in v0.1.5

func (u CustomerUpdateMetadata) MarshalJSON() ([]byte, error)

func (*CustomerUpdateMetadata) UnmarshalJSON ¶ added in v0.1.5

func (u *CustomerUpdateMetadata) UnmarshalJSON(data []byte) error

type CustomerUpdateMetadataType ¶ added in v0.1.5

type CustomerUpdateMetadataType string
const (
	CustomerUpdateMetadataTypeStr     CustomerUpdateMetadataType = "str"
	CustomerUpdateMetadataTypeInteger CustomerUpdateMetadataType = "integer"
	CustomerUpdateMetadataTypeNumber  CustomerUpdateMetadataType = "number"
	CustomerUpdateMetadataTypeBoolean CustomerUpdateMetadataType = "boolean"
)

type CustomerUpdatedEvent ¶ added in v0.12.0

type CustomerUpdatedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata CustomerUpdatedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

CustomerUpdatedEvent - An event created by Polar when a customer is updated.

func (*CustomerUpdatedEvent) GetChildCount ¶ added in v0.12.0

func (c *CustomerUpdatedEvent) GetChildCount() *int64

func (*CustomerUpdatedEvent) GetCustomer ¶ added in v0.12.0

func (c *CustomerUpdatedEvent) GetCustomer() *Customer

func (*CustomerUpdatedEvent) GetCustomerID ¶ added in v0.12.0

func (c *CustomerUpdatedEvent) GetCustomerID() *string

func (*CustomerUpdatedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (c *CustomerUpdatedEvent) GetCustomerIndividual() *CustomerIndividual

func (*CustomerUpdatedEvent) GetCustomerTeam ¶ added in v0.16.0

func (c *CustomerUpdatedEvent) GetCustomerTeam() *CustomerTeam

func (*CustomerUpdatedEvent) GetExternalCustomerID ¶ added in v0.12.0

func (c *CustomerUpdatedEvent) GetExternalCustomerID() *string

func (*CustomerUpdatedEvent) GetExternalMemberID ¶ added in v0.13.0

func (c *CustomerUpdatedEvent) GetExternalMemberID() *string

func (*CustomerUpdatedEvent) GetID ¶ added in v0.12.0

func (c *CustomerUpdatedEvent) GetID() string

func (*CustomerUpdatedEvent) GetLabel ¶ added in v0.13.0

func (c *CustomerUpdatedEvent) GetLabel() string

func (*CustomerUpdatedEvent) GetMemberID ¶ added in v0.13.0

func (c *CustomerUpdatedEvent) GetMemberID() *string

func (*CustomerUpdatedEvent) GetMetadata ¶ added in v0.12.0

func (*CustomerUpdatedEvent) GetName ¶ added in v0.12.0

func (c *CustomerUpdatedEvent) GetName() string

func (*CustomerUpdatedEvent) GetOrganizationID ¶ added in v0.12.0

func (c *CustomerUpdatedEvent) GetOrganizationID() string

func (*CustomerUpdatedEvent) GetParentID ¶ added in v0.13.0

func (c *CustomerUpdatedEvent) GetParentID() *string

func (*CustomerUpdatedEvent) GetSource ¶ added in v0.12.0

func (c *CustomerUpdatedEvent) GetSource() string

func (*CustomerUpdatedEvent) GetTimestamp ¶ added in v0.12.0

func (c *CustomerUpdatedEvent) GetTimestamp() time.Time

func (CustomerUpdatedEvent) MarshalJSON ¶ added in v0.12.0

func (c CustomerUpdatedEvent) MarshalJSON() ([]byte, error)

func (*CustomerUpdatedEvent) UnmarshalJSON ¶ added in v0.12.0

func (c *CustomerUpdatedEvent) UnmarshalJSON(data []byte) error

type CustomerUpdatedFields ¶ added in v0.12.0

type CustomerUpdatedFields struct {
	Name           *string                                  `json:"name,omitempty"`
	Email          *string                                  `json:"email,omitempty"`
	BillingAddress *AddressDict                             `json:"billing_address,omitempty"`
	TaxID          *string                                  `json:"tax_id,omitempty"`
	Metadata       map[string]CustomerUpdatedFieldsMetadata `json:"metadata,omitempty"`
}

func (*CustomerUpdatedFields) GetBillingAddress ¶ added in v0.12.0

func (c *CustomerUpdatedFields) GetBillingAddress() *AddressDict

func (*CustomerUpdatedFields) GetEmail ¶ added in v0.12.0

func (c *CustomerUpdatedFields) GetEmail() *string

func (*CustomerUpdatedFields) GetMetadata ¶ added in v0.12.0

func (*CustomerUpdatedFields) GetName ¶ added in v0.12.0

func (c *CustomerUpdatedFields) GetName() *string

func (*CustomerUpdatedFields) GetTaxID ¶ added in v0.12.0

func (c *CustomerUpdatedFields) GetTaxID() *string

func (CustomerUpdatedFields) MarshalJSON ¶ added in v0.12.0

func (c CustomerUpdatedFields) MarshalJSON() ([]byte, error)

func (*CustomerUpdatedFields) UnmarshalJSON ¶ added in v0.12.0

func (c *CustomerUpdatedFields) UnmarshalJSON(data []byte) error

type CustomerUpdatedFieldsMetadata ¶ added in v0.12.0

type CustomerUpdatedFieldsMetadata struct {
	Str     *string `queryParam:"inline" union:"member"`
	Integer *int64  `queryParam:"inline" union:"member"`
	Boolean *bool   `queryParam:"inline" union:"member"`

	Type CustomerUpdatedFieldsMetadataType
}

func CreateCustomerUpdatedFieldsMetadataBoolean ¶ added in v0.12.0

func CreateCustomerUpdatedFieldsMetadataBoolean(boolean bool) CustomerUpdatedFieldsMetadata

func CreateCustomerUpdatedFieldsMetadataInteger ¶ added in v0.12.0

func CreateCustomerUpdatedFieldsMetadataInteger(integer int64) CustomerUpdatedFieldsMetadata

func CreateCustomerUpdatedFieldsMetadataStr ¶ added in v0.12.0

func CreateCustomerUpdatedFieldsMetadataStr(str string) CustomerUpdatedFieldsMetadata

func (CustomerUpdatedFieldsMetadata) MarshalJSON ¶ added in v0.12.0

func (u CustomerUpdatedFieldsMetadata) MarshalJSON() ([]byte, error)

func (*CustomerUpdatedFieldsMetadata) UnmarshalJSON ¶ added in v0.12.0

func (u *CustomerUpdatedFieldsMetadata) UnmarshalJSON(data []byte) error

type CustomerUpdatedFieldsMetadataType ¶ added in v0.12.0

type CustomerUpdatedFieldsMetadataType string
const (
	CustomerUpdatedFieldsMetadataTypeStr     CustomerUpdatedFieldsMetadataType = "str"
	CustomerUpdatedFieldsMetadataTypeInteger CustomerUpdatedFieldsMetadataType = "integer"
	CustomerUpdatedFieldsMetadataTypeBoolean CustomerUpdatedFieldsMetadataType = "boolean"
)

type CustomerUpdatedMetadata ¶ added in v0.12.0

type CustomerUpdatedMetadata struct {
	CustomerID         string                `json:"customer_id"`
	CustomerEmail      *string               `json:"customer_email"`
	CustomerName       *string               `json:"customer_name"`
	CustomerExternalID *string               `json:"customer_external_id"`
	UpdatedFields      CustomerUpdatedFields `json:"updated_fields"`
}

func (*CustomerUpdatedMetadata) GetCustomerEmail ¶ added in v0.12.0

func (c *CustomerUpdatedMetadata) GetCustomerEmail() *string

func (*CustomerUpdatedMetadata) GetCustomerExternalID ¶ added in v0.12.0

func (c *CustomerUpdatedMetadata) GetCustomerExternalID() *string

func (*CustomerUpdatedMetadata) GetCustomerID ¶ added in v0.12.0

func (c *CustomerUpdatedMetadata) GetCustomerID() string

func (*CustomerUpdatedMetadata) GetCustomerName ¶ added in v0.12.0

func (c *CustomerUpdatedMetadata) GetCustomerName() *string

func (*CustomerUpdatedMetadata) GetUpdatedFields ¶ added in v0.12.0

func (c *CustomerUpdatedMetadata) GetUpdatedFields() CustomerUpdatedFields

func (CustomerUpdatedMetadata) MarshalJSON ¶ added in v0.12.0

func (c CustomerUpdatedMetadata) MarshalJSON() ([]byte, error)

func (*CustomerUpdatedMetadata) UnmarshalJSON ¶ added in v0.12.0

func (c *CustomerUpdatedMetadata) UnmarshalJSON(data []byte) error

type CustomerWallet ¶ added in v0.12.0

type CustomerWallet struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the customer that owns the wallet.
	CustomerID string `json:"customer_id"`
	// The current balance of the wallet, in cents.
	Balance int64 `json:"balance"`
	// The currency of the wallet.
	Currency string `json:"currency"`
}

CustomerWallet - A wallet represents your balance with an organization.

You can top-up your wallet and use the balance to pay for usage.

func (*CustomerWallet) GetBalance ¶ added in v0.12.0

func (c *CustomerWallet) GetBalance() int64

func (*CustomerWallet) GetCreatedAt ¶ added in v0.12.0

func (c *CustomerWallet) GetCreatedAt() time.Time

func (*CustomerWallet) GetCurrency ¶ added in v0.12.0

func (c *CustomerWallet) GetCurrency() string

func (*CustomerWallet) GetCustomerID ¶ added in v0.12.0

func (c *CustomerWallet) GetCustomerID() string

func (*CustomerWallet) GetID ¶ added in v0.12.0

func (c *CustomerWallet) GetID() string

func (*CustomerWallet) GetModifiedAt ¶ added in v0.12.0

func (c *CustomerWallet) GetModifiedAt() *time.Time

func (CustomerWallet) MarshalJSON ¶ added in v0.12.0

func (c CustomerWallet) MarshalJSON() ([]byte, error)

func (*CustomerWallet) UnmarshalJSON ¶ added in v0.12.0

func (c *CustomerWallet) UnmarshalJSON(data []byte) error

type CustomerWalletSortProperty ¶ added in v0.12.0

type CustomerWalletSortProperty string
const (
	CustomerWalletSortPropertyCreatedAt      CustomerWalletSortProperty = "created_at"
	CustomerWalletSortPropertyMinusCreatedAt CustomerWalletSortProperty = "-created_at"
	CustomerWalletSortPropertyBalance        CustomerWalletSortProperty = "balance"
	CustomerWalletSortPropertyMinusBalance   CustomerWalletSortProperty = "-balance"
)

func (CustomerWalletSortProperty) ToPointer ¶ added in v0.12.0

func (*CustomerWalletSortProperty) UnmarshalJSON ¶ added in v0.12.0

func (e *CustomerWalletSortProperty) UnmarshalJSON(data []byte) error

type Discount ¶

type Discount struct {
	DiscountFixedOnceForeverDuration      *DiscountFixedOnceForeverDuration      `queryParam:"inline" union:"member"`
	DiscountFixedRepeatDuration           *DiscountFixedRepeatDuration           `queryParam:"inline" union:"member"`
	DiscountPercentageOnceForeverDuration *DiscountPercentageOnceForeverDuration `queryParam:"inline" union:"member"`
	DiscountPercentageRepeatDuration      *DiscountPercentageRepeatDuration      `queryParam:"inline" union:"member"`

	Type DiscountUnionType
}

func CreateDiscountDiscountFixedOnceForeverDuration ¶

func CreateDiscountDiscountFixedOnceForeverDuration(discountFixedOnceForeverDuration DiscountFixedOnceForeverDuration) Discount

func CreateDiscountDiscountFixedRepeatDuration ¶

func CreateDiscountDiscountFixedRepeatDuration(discountFixedRepeatDuration DiscountFixedRepeatDuration) Discount

func CreateDiscountDiscountPercentageOnceForeverDuration ¶

func CreateDiscountDiscountPercentageOnceForeverDuration(discountPercentageOnceForeverDuration DiscountPercentageOnceForeverDuration) Discount

func CreateDiscountDiscountPercentageRepeatDuration ¶

func CreateDiscountDiscountPercentageRepeatDuration(discountPercentageRepeatDuration DiscountPercentageRepeatDuration) Discount

func (Discount) MarshalJSON ¶

func (u Discount) MarshalJSON() ([]byte, error)

func (*Discount) UnmarshalJSON ¶

func (u *Discount) UnmarshalJSON(data []byte) error

type DiscountCreate ¶

type DiscountCreate struct {
	DiscountFixedOnceForeverDurationCreate      *DiscountFixedOnceForeverDurationCreate      `queryParam:"inline" union:"member"`
	DiscountFixedRepeatDurationCreate           *DiscountFixedRepeatDurationCreate           `queryParam:"inline" union:"member"`
	DiscountPercentageOnceForeverDurationCreate *DiscountPercentageOnceForeverDurationCreate `queryParam:"inline" union:"member"`
	DiscountPercentageRepeatDurationCreate      *DiscountPercentageRepeatDurationCreate      `queryParam:"inline" union:"member"`

	Type DiscountCreateType
}

func CreateDiscountCreateDiscountFixedOnceForeverDurationCreate ¶

func CreateDiscountCreateDiscountFixedOnceForeverDurationCreate(discountFixedOnceForeverDurationCreate DiscountFixedOnceForeverDurationCreate) DiscountCreate

func CreateDiscountCreateDiscountFixedRepeatDurationCreate ¶

func CreateDiscountCreateDiscountFixedRepeatDurationCreate(discountFixedRepeatDurationCreate DiscountFixedRepeatDurationCreate) DiscountCreate

func CreateDiscountCreateDiscountPercentageOnceForeverDurationCreate ¶

func CreateDiscountCreateDiscountPercentageOnceForeverDurationCreate(discountPercentageOnceForeverDurationCreate DiscountPercentageOnceForeverDurationCreate) DiscountCreate

func CreateDiscountCreateDiscountPercentageRepeatDurationCreate ¶

func CreateDiscountCreateDiscountPercentageRepeatDurationCreate(discountPercentageRepeatDurationCreate DiscountPercentageRepeatDurationCreate) DiscountCreate

func (DiscountCreate) MarshalJSON ¶

func (u DiscountCreate) MarshalJSON() ([]byte, error)

func (*DiscountCreate) UnmarshalJSON ¶

func (u *DiscountCreate) UnmarshalJSON(data []byte) error

type DiscountCreateType ¶

type DiscountCreateType string
const (
	DiscountCreateTypeDiscountFixedOnceForeverDurationCreate      DiscountCreateType = "DiscountFixedOnceForeverDurationCreate"
	DiscountCreateTypeDiscountFixedRepeatDurationCreate           DiscountCreateType = "DiscountFixedRepeatDurationCreate"
	DiscountCreateTypeDiscountPercentageOnceForeverDurationCreate DiscountCreateType = "DiscountPercentageOnceForeverDurationCreate"
	DiscountCreateTypeDiscountPercentageRepeatDurationCreate      DiscountCreateType = "DiscountPercentageRepeatDurationCreate"
)

type DiscountDuration ¶

type DiscountDuration string
const (
	DiscountDurationOnce      DiscountDuration = "once"
	DiscountDurationForever   DiscountDuration = "forever"
	DiscountDurationRepeating DiscountDuration = "repeating"
)

func (DiscountDuration) ToPointer ¶

func (e DiscountDuration) ToPointer() *DiscountDuration

func (*DiscountDuration) UnmarshalJSON ¶

func (e *DiscountDuration) UnmarshalJSON(data []byte) error

type DiscountFixedOnceForeverDuration ¶

type DiscountFixedOnceForeverDuration struct {
	Duration DiscountDuration `json:"duration"`
	Type     DiscountType     `json:"type"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Amount int64 `json:"amount"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Currency string `json:"currency"`
	// Map of currency to fixed amount to discount from the total.
	Amounts map[string]int64 `json:"amounts"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout.
	Code *string `json:"code"`
	// Timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at"`
	// Timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at"`
	// Maximum number of times the discount can be redeemed.
	MaxRedemptions *int64 `json:"max_redemptions"`
	// Number of times the discount has been redeemed.
	RedemptionsCount int64 `json:"redemptions_count"`
	// The organization ID.
	OrganizationID string            `json:"organization_id"`
	Products       []DiscountProduct `json:"products"`
}

DiscountFixedOnceForeverDuration - Schema for a fixed amount discount that is applied once or forever.

func (*DiscountFixedOnceForeverDuration) GetAmount ¶

func (d *DiscountFixedOnceForeverDuration) GetAmount() int64

func (*DiscountFixedOnceForeverDuration) GetAmounts ¶ added in v0.15.0

func (d *DiscountFixedOnceForeverDuration) GetAmounts() map[string]int64

func (*DiscountFixedOnceForeverDuration) GetCode ¶

func (*DiscountFixedOnceForeverDuration) GetCreatedAt ¶

func (d *DiscountFixedOnceForeverDuration) GetCreatedAt() time.Time

func (*DiscountFixedOnceForeverDuration) GetCurrency ¶

func (d *DiscountFixedOnceForeverDuration) GetCurrency() string

func (*DiscountFixedOnceForeverDuration) GetDuration ¶

func (*DiscountFixedOnceForeverDuration) GetEndsAt ¶

func (d *DiscountFixedOnceForeverDuration) GetEndsAt() *time.Time

func (*DiscountFixedOnceForeverDuration) GetID ¶

func (*DiscountFixedOnceForeverDuration) GetMaxRedemptions ¶

func (d *DiscountFixedOnceForeverDuration) GetMaxRedemptions() *int64

func (*DiscountFixedOnceForeverDuration) GetMetadata ¶

func (*DiscountFixedOnceForeverDuration) GetModifiedAt ¶

func (d *DiscountFixedOnceForeverDuration) GetModifiedAt() *time.Time

func (*DiscountFixedOnceForeverDuration) GetName ¶

func (*DiscountFixedOnceForeverDuration) GetOrganizationID ¶

func (d *DiscountFixedOnceForeverDuration) GetOrganizationID() string

func (*DiscountFixedOnceForeverDuration) GetProducts ¶

func (*DiscountFixedOnceForeverDuration) GetRedemptionsCount ¶

func (d *DiscountFixedOnceForeverDuration) GetRedemptionsCount() int64

func (*DiscountFixedOnceForeverDuration) GetStartsAt ¶

func (d *DiscountFixedOnceForeverDuration) GetStartsAt() *time.Time

func (*DiscountFixedOnceForeverDuration) GetType ¶

func (DiscountFixedOnceForeverDuration) MarshalJSON ¶

func (d DiscountFixedOnceForeverDuration) MarshalJSON() ([]byte, error)

func (*DiscountFixedOnceForeverDuration) UnmarshalJSON ¶

func (d *DiscountFixedOnceForeverDuration) UnmarshalJSON(data []byte) error

type DiscountFixedOnceForeverDurationBase ¶

type DiscountFixedOnceForeverDurationBase struct {
	Duration DiscountDuration `json:"duration"`
	Type     DiscountType     `json:"type"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Amount int64 `json:"amount"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Currency string `json:"currency"`
	// Map of currency to fixed amount to discount from the total.
	Amounts map[string]int64 `json:"amounts"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout.
	Code *string `json:"code"`
	// Timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at"`
	// Timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at"`
	// Maximum number of times the discount can be redeemed.
	MaxRedemptions *int64 `json:"max_redemptions"`
	// Number of times the discount has been redeemed.
	RedemptionsCount int64 `json:"redemptions_count"`
	// The organization ID.
	OrganizationID string `json:"organization_id"`
}

func (*DiscountFixedOnceForeverDurationBase) GetAmount ¶

func (*DiscountFixedOnceForeverDurationBase) GetAmounts ¶ added in v0.15.0

func (*DiscountFixedOnceForeverDurationBase) GetCode ¶

func (*DiscountFixedOnceForeverDurationBase) GetCreatedAt ¶

func (*DiscountFixedOnceForeverDurationBase) GetCurrency ¶

func (*DiscountFixedOnceForeverDurationBase) GetDuration ¶

func (*DiscountFixedOnceForeverDurationBase) GetEndsAt ¶

func (*DiscountFixedOnceForeverDurationBase) GetID ¶

func (*DiscountFixedOnceForeverDurationBase) GetMaxRedemptions ¶

func (d *DiscountFixedOnceForeverDurationBase) GetMaxRedemptions() *int64

func (*DiscountFixedOnceForeverDurationBase) GetMetadata ¶

func (*DiscountFixedOnceForeverDurationBase) GetModifiedAt ¶

func (d *DiscountFixedOnceForeverDurationBase) GetModifiedAt() *time.Time

func (*DiscountFixedOnceForeverDurationBase) GetName ¶

func (*DiscountFixedOnceForeverDurationBase) GetOrganizationID ¶

func (d *DiscountFixedOnceForeverDurationBase) GetOrganizationID() string

func (*DiscountFixedOnceForeverDurationBase) GetRedemptionsCount ¶

func (d *DiscountFixedOnceForeverDurationBase) GetRedemptionsCount() int64

func (*DiscountFixedOnceForeverDurationBase) GetStartsAt ¶

func (*DiscountFixedOnceForeverDurationBase) GetType ¶

func (DiscountFixedOnceForeverDurationBase) MarshalJSON ¶

func (d DiscountFixedOnceForeverDurationBase) MarshalJSON() ([]byte, error)

func (*DiscountFixedOnceForeverDurationBase) UnmarshalJSON ¶

func (d *DiscountFixedOnceForeverDurationBase) UnmarshalJSON(data []byte) error

type DiscountFixedOnceForeverDurationCreate ¶

type DiscountFixedOnceForeverDurationCreate struct {
	Duration DiscountDuration `json:"duration"`
	Type     DiscountType     `json:"type"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Amount *int64 `json:"amount,omitempty"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Currency *PresentmentCurrency `json:"currency,omitempty"`
	Amounts  map[string]int64     `json:"amounts,omitempty"`
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]DiscountFixedOnceForeverDurationCreateMetadata `json:"metadata,omitempty"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.
	Code *string `json:"code,omitempty"`
	// Optional timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at,omitempty"`
	// Optional timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at,omitempty"`
	// Optional maximum number of times the discount can be redeemed.
	MaxRedemptions *int64   `json:"max_redemptions,omitempty"`
	Products       []string `json:"products,omitempty"`
	// The ID of the organization owning the discount. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
}

DiscountFixedOnceForeverDurationCreate - Schema to create a fixed amount discount that is applied once or forever.

func (*DiscountFixedOnceForeverDurationCreate) GetAmount ¶

func (*DiscountFixedOnceForeverDurationCreate) GetAmounts ¶ added in v0.15.0

func (*DiscountFixedOnceForeverDurationCreate) GetCode ¶

func (*DiscountFixedOnceForeverDurationCreate) GetCurrency ¶

func (*DiscountFixedOnceForeverDurationCreate) GetDuration ¶

func (*DiscountFixedOnceForeverDurationCreate) GetEndsAt ¶

func (*DiscountFixedOnceForeverDurationCreate) GetMaxRedemptions ¶

func (d *DiscountFixedOnceForeverDurationCreate) GetMaxRedemptions() *int64

func (*DiscountFixedOnceForeverDurationCreate) GetMetadata ¶

func (*DiscountFixedOnceForeverDurationCreate) GetName ¶

func (*DiscountFixedOnceForeverDurationCreate) GetOrganizationID ¶

func (d *DiscountFixedOnceForeverDurationCreate) GetOrganizationID() *string

func (*DiscountFixedOnceForeverDurationCreate) GetProducts ¶

func (*DiscountFixedOnceForeverDurationCreate) GetStartsAt ¶

func (*DiscountFixedOnceForeverDurationCreate) GetType ¶

func (DiscountFixedOnceForeverDurationCreate) MarshalJSON ¶

func (d DiscountFixedOnceForeverDurationCreate) MarshalJSON() ([]byte, error)

func (*DiscountFixedOnceForeverDurationCreate) UnmarshalJSON ¶

func (d *DiscountFixedOnceForeverDurationCreate) UnmarshalJSON(data []byte) error

type DiscountFixedOnceForeverDurationCreateMetadata ¶

type DiscountFixedOnceForeverDurationCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type DiscountFixedOnceForeverDurationCreateMetadataType
}

func CreateDiscountFixedOnceForeverDurationCreateMetadataBoolean ¶

func CreateDiscountFixedOnceForeverDurationCreateMetadataBoolean(boolean bool) DiscountFixedOnceForeverDurationCreateMetadata

func CreateDiscountFixedOnceForeverDurationCreateMetadataInteger ¶

func CreateDiscountFixedOnceForeverDurationCreateMetadataInteger(integer int64) DiscountFixedOnceForeverDurationCreateMetadata

func CreateDiscountFixedOnceForeverDurationCreateMetadataNumber ¶ added in v0.4.12

func CreateDiscountFixedOnceForeverDurationCreateMetadataNumber(number float64) DiscountFixedOnceForeverDurationCreateMetadata

func CreateDiscountFixedOnceForeverDurationCreateMetadataStr ¶

func CreateDiscountFixedOnceForeverDurationCreateMetadataStr(str string) DiscountFixedOnceForeverDurationCreateMetadata

func (DiscountFixedOnceForeverDurationCreateMetadata) MarshalJSON ¶

func (*DiscountFixedOnceForeverDurationCreateMetadata) UnmarshalJSON ¶

type DiscountFixedOnceForeverDurationCreateMetadataType ¶

type DiscountFixedOnceForeverDurationCreateMetadataType string
const (
	DiscountFixedOnceForeverDurationCreateMetadataTypeStr     DiscountFixedOnceForeverDurationCreateMetadataType = "str"
	DiscountFixedOnceForeverDurationCreateMetadataTypeInteger DiscountFixedOnceForeverDurationCreateMetadataType = "integer"
	DiscountFixedOnceForeverDurationCreateMetadataTypeNumber  DiscountFixedOnceForeverDurationCreateMetadataType = "number"
	DiscountFixedOnceForeverDurationCreateMetadataTypeBoolean DiscountFixedOnceForeverDurationCreateMetadataType = "boolean"
)

type DiscountFixedRepeatDuration ¶

type DiscountFixedRepeatDuration struct {
	Duration         DiscountDuration `json:"duration"`
	DurationInMonths int64            `json:"duration_in_months"`
	Type             DiscountType     `json:"type"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Amount int64 `json:"amount"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Currency string `json:"currency"`
	// Map of currency to fixed amount to discount from the total.
	Amounts map[string]int64 `json:"amounts"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout.
	Code *string `json:"code"`
	// Timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at"`
	// Timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at"`
	// Maximum number of times the discount can be redeemed.
	MaxRedemptions *int64 `json:"max_redemptions"`
	// Number of times the discount has been redeemed.
	RedemptionsCount int64 `json:"redemptions_count"`
	// The organization ID.
	OrganizationID string            `json:"organization_id"`
	Products       []DiscountProduct `json:"products"`
}

DiscountFixedRepeatDuration - Schema for a fixed amount discount that is applied on every invoice for a certain number of months.

func (*DiscountFixedRepeatDuration) GetAmount ¶

func (d *DiscountFixedRepeatDuration) GetAmount() int64

func (*DiscountFixedRepeatDuration) GetAmounts ¶ added in v0.15.0

func (d *DiscountFixedRepeatDuration) GetAmounts() map[string]int64

func (*DiscountFixedRepeatDuration) GetCode ¶

func (d *DiscountFixedRepeatDuration) GetCode() *string

func (*DiscountFixedRepeatDuration) GetCreatedAt ¶

func (d *DiscountFixedRepeatDuration) GetCreatedAt() time.Time

func (*DiscountFixedRepeatDuration) GetCurrency ¶

func (d *DiscountFixedRepeatDuration) GetCurrency() string

func (*DiscountFixedRepeatDuration) GetDuration ¶

func (*DiscountFixedRepeatDuration) GetDurationInMonths ¶

func (d *DiscountFixedRepeatDuration) GetDurationInMonths() int64

func (*DiscountFixedRepeatDuration) GetEndsAt ¶

func (d *DiscountFixedRepeatDuration) GetEndsAt() *time.Time

func (*DiscountFixedRepeatDuration) GetID ¶

func (*DiscountFixedRepeatDuration) GetMaxRedemptions ¶

func (d *DiscountFixedRepeatDuration) GetMaxRedemptions() *int64

func (*DiscountFixedRepeatDuration) GetMetadata ¶

func (*DiscountFixedRepeatDuration) GetModifiedAt ¶

func (d *DiscountFixedRepeatDuration) GetModifiedAt() *time.Time

func (*DiscountFixedRepeatDuration) GetName ¶

func (d *DiscountFixedRepeatDuration) GetName() string

func (*DiscountFixedRepeatDuration) GetOrganizationID ¶

func (d *DiscountFixedRepeatDuration) GetOrganizationID() string

func (*DiscountFixedRepeatDuration) GetProducts ¶

func (d *DiscountFixedRepeatDuration) GetProducts() []DiscountProduct

func (*DiscountFixedRepeatDuration) GetRedemptionsCount ¶

func (d *DiscountFixedRepeatDuration) GetRedemptionsCount() int64

func (*DiscountFixedRepeatDuration) GetStartsAt ¶

func (d *DiscountFixedRepeatDuration) GetStartsAt() *time.Time

func (*DiscountFixedRepeatDuration) GetType ¶

func (DiscountFixedRepeatDuration) MarshalJSON ¶

func (d DiscountFixedRepeatDuration) MarshalJSON() ([]byte, error)

func (*DiscountFixedRepeatDuration) UnmarshalJSON ¶

func (d *DiscountFixedRepeatDuration) UnmarshalJSON(data []byte) error

type DiscountFixedRepeatDurationBase ¶

type DiscountFixedRepeatDurationBase struct {
	Duration         DiscountDuration `json:"duration"`
	DurationInMonths int64            `json:"duration_in_months"`
	Type             DiscountType     `json:"type"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Amount int64 `json:"amount"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Currency string `json:"currency"`
	// Map of currency to fixed amount to discount from the total.
	Amounts map[string]int64 `json:"amounts"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout.
	Code *string `json:"code"`
	// Timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at"`
	// Timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at"`
	// Maximum number of times the discount can be redeemed.
	MaxRedemptions *int64 `json:"max_redemptions"`
	// Number of times the discount has been redeemed.
	RedemptionsCount int64 `json:"redemptions_count"`
	// The organization ID.
	OrganizationID string `json:"organization_id"`
}

func (*DiscountFixedRepeatDurationBase) GetAmount ¶

func (d *DiscountFixedRepeatDurationBase) GetAmount() int64

func (*DiscountFixedRepeatDurationBase) GetAmounts ¶ added in v0.15.0

func (d *DiscountFixedRepeatDurationBase) GetAmounts() map[string]int64

func (*DiscountFixedRepeatDurationBase) GetCode ¶

func (*DiscountFixedRepeatDurationBase) GetCreatedAt ¶

func (d *DiscountFixedRepeatDurationBase) GetCreatedAt() time.Time

func (*DiscountFixedRepeatDurationBase) GetCurrency ¶

func (d *DiscountFixedRepeatDurationBase) GetCurrency() string

func (*DiscountFixedRepeatDurationBase) GetDuration ¶

func (*DiscountFixedRepeatDurationBase) GetDurationInMonths ¶

func (d *DiscountFixedRepeatDurationBase) GetDurationInMonths() int64

func (*DiscountFixedRepeatDurationBase) GetEndsAt ¶

func (d *DiscountFixedRepeatDurationBase) GetEndsAt() *time.Time

func (*DiscountFixedRepeatDurationBase) GetID ¶

func (*DiscountFixedRepeatDurationBase) GetMaxRedemptions ¶

func (d *DiscountFixedRepeatDurationBase) GetMaxRedemptions() *int64

func (*DiscountFixedRepeatDurationBase) GetMetadata ¶

func (*DiscountFixedRepeatDurationBase) GetModifiedAt ¶

func (d *DiscountFixedRepeatDurationBase) GetModifiedAt() *time.Time

func (*DiscountFixedRepeatDurationBase) GetName ¶

func (*DiscountFixedRepeatDurationBase) GetOrganizationID ¶

func (d *DiscountFixedRepeatDurationBase) GetOrganizationID() string

func (*DiscountFixedRepeatDurationBase) GetRedemptionsCount ¶

func (d *DiscountFixedRepeatDurationBase) GetRedemptionsCount() int64

func (*DiscountFixedRepeatDurationBase) GetStartsAt ¶

func (d *DiscountFixedRepeatDurationBase) GetStartsAt() *time.Time

func (*DiscountFixedRepeatDurationBase) GetType ¶

func (DiscountFixedRepeatDurationBase) MarshalJSON ¶

func (d DiscountFixedRepeatDurationBase) MarshalJSON() ([]byte, error)

func (*DiscountFixedRepeatDurationBase) UnmarshalJSON ¶

func (d *DiscountFixedRepeatDurationBase) UnmarshalJSON(data []byte) error

type DiscountFixedRepeatDurationCreate ¶

type DiscountFixedRepeatDurationCreate struct {
	Duration DiscountDuration `json:"duration"`
	// Number of months the discount should be applied.
	//
	// For this to work on yearly pricing, you should multiply this by 12.
	// For example, to apply the discount for 2 years, set this to 24.
	DurationInMonths int64        `json:"duration_in_months"`
	Type             DiscountType `json:"type"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Amount *int64 `json:"amount,omitempty"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Currency *PresentmentCurrency `json:"currency,omitempty"`
	Amounts  map[string]int64     `json:"amounts,omitempty"`
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]DiscountFixedRepeatDurationCreateMetadata `json:"metadata,omitempty"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.
	Code *string `json:"code,omitempty"`
	// Optional timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at,omitempty"`
	// Optional timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at,omitempty"`
	// Optional maximum number of times the discount can be redeemed.
	MaxRedemptions *int64   `json:"max_redemptions,omitempty"`
	Products       []string `json:"products,omitempty"`
	// The ID of the organization owning the discount. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
}

DiscountFixedRepeatDurationCreate - Schema to create a fixed amount discount that is applied on every invoice for a certain number of months.

func (*DiscountFixedRepeatDurationCreate) GetAmount ¶

func (d *DiscountFixedRepeatDurationCreate) GetAmount() *int64

func (*DiscountFixedRepeatDurationCreate) GetAmounts ¶ added in v0.15.0

func (d *DiscountFixedRepeatDurationCreate) GetAmounts() map[string]int64

func (*DiscountFixedRepeatDurationCreate) GetCode ¶

func (*DiscountFixedRepeatDurationCreate) GetCurrency ¶

func (*DiscountFixedRepeatDurationCreate) GetDuration ¶

func (*DiscountFixedRepeatDurationCreate) GetDurationInMonths ¶

func (d *DiscountFixedRepeatDurationCreate) GetDurationInMonths() int64

func (*DiscountFixedRepeatDurationCreate) GetEndsAt ¶

func (*DiscountFixedRepeatDurationCreate) GetMaxRedemptions ¶

func (d *DiscountFixedRepeatDurationCreate) GetMaxRedemptions() *int64

func (*DiscountFixedRepeatDurationCreate) GetMetadata ¶

func (*DiscountFixedRepeatDurationCreate) GetName ¶

func (*DiscountFixedRepeatDurationCreate) GetOrganizationID ¶

func (d *DiscountFixedRepeatDurationCreate) GetOrganizationID() *string

func (*DiscountFixedRepeatDurationCreate) GetProducts ¶

func (d *DiscountFixedRepeatDurationCreate) GetProducts() []string

func (*DiscountFixedRepeatDurationCreate) GetStartsAt ¶

func (d *DiscountFixedRepeatDurationCreate) GetStartsAt() *time.Time

func (*DiscountFixedRepeatDurationCreate) GetType ¶

func (DiscountFixedRepeatDurationCreate) MarshalJSON ¶

func (d DiscountFixedRepeatDurationCreate) MarshalJSON() ([]byte, error)

func (*DiscountFixedRepeatDurationCreate) UnmarshalJSON ¶

func (d *DiscountFixedRepeatDurationCreate) UnmarshalJSON(data []byte) error

type DiscountFixedRepeatDurationCreateMetadata ¶

type DiscountFixedRepeatDurationCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type DiscountFixedRepeatDurationCreateMetadataType
}

func CreateDiscountFixedRepeatDurationCreateMetadataBoolean ¶

func CreateDiscountFixedRepeatDurationCreateMetadataBoolean(boolean bool) DiscountFixedRepeatDurationCreateMetadata

func CreateDiscountFixedRepeatDurationCreateMetadataInteger ¶

func CreateDiscountFixedRepeatDurationCreateMetadataInteger(integer int64) DiscountFixedRepeatDurationCreateMetadata

func CreateDiscountFixedRepeatDurationCreateMetadataNumber ¶ added in v0.4.12

func CreateDiscountFixedRepeatDurationCreateMetadataNumber(number float64) DiscountFixedRepeatDurationCreateMetadata

func CreateDiscountFixedRepeatDurationCreateMetadataStr ¶

func CreateDiscountFixedRepeatDurationCreateMetadataStr(str string) DiscountFixedRepeatDurationCreateMetadata

func (DiscountFixedRepeatDurationCreateMetadata) MarshalJSON ¶

func (*DiscountFixedRepeatDurationCreateMetadata) UnmarshalJSON ¶

func (u *DiscountFixedRepeatDurationCreateMetadata) UnmarshalJSON(data []byte) error

type DiscountFixedRepeatDurationCreateMetadataType ¶

type DiscountFixedRepeatDurationCreateMetadataType string
const (
	DiscountFixedRepeatDurationCreateMetadataTypeStr     DiscountFixedRepeatDurationCreateMetadataType = "str"
	DiscountFixedRepeatDurationCreateMetadataTypeInteger DiscountFixedRepeatDurationCreateMetadataType = "integer"
	DiscountFixedRepeatDurationCreateMetadataTypeNumber  DiscountFixedRepeatDurationCreateMetadataType = "number"
	DiscountFixedRepeatDurationCreateMetadataTypeBoolean DiscountFixedRepeatDurationCreateMetadataType = "boolean"
)

type DiscountPercentageOnceForeverDuration ¶

type DiscountPercentageOnceForeverDuration struct {
	Duration DiscountDuration `json:"duration"`
	Type     DiscountType     `json:"type"`
	// Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.
	BasisPoints int64 `json:"basis_points"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout.
	Code *string `json:"code"`
	// Timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at"`
	// Timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at"`
	// Maximum number of times the discount can be redeemed.
	MaxRedemptions *int64 `json:"max_redemptions"`
	// Number of times the discount has been redeemed.
	RedemptionsCount int64 `json:"redemptions_count"`
	// The organization ID.
	OrganizationID string            `json:"organization_id"`
	Products       []DiscountProduct `json:"products"`
}

DiscountPercentageOnceForeverDuration - Schema for a percentage discount that is applied once or forever.

func (*DiscountPercentageOnceForeverDuration) GetBasisPoints ¶

func (d *DiscountPercentageOnceForeverDuration) GetBasisPoints() int64

func (*DiscountPercentageOnceForeverDuration) GetCode ¶

func (*DiscountPercentageOnceForeverDuration) GetCreatedAt ¶

func (*DiscountPercentageOnceForeverDuration) GetDuration ¶

func (*DiscountPercentageOnceForeverDuration) GetEndsAt ¶

func (*DiscountPercentageOnceForeverDuration) GetID ¶

func (*DiscountPercentageOnceForeverDuration) GetMaxRedemptions ¶

func (d *DiscountPercentageOnceForeverDuration) GetMaxRedemptions() *int64

func (*DiscountPercentageOnceForeverDuration) GetMetadata ¶

func (*DiscountPercentageOnceForeverDuration) GetModifiedAt ¶

func (d *DiscountPercentageOnceForeverDuration) GetModifiedAt() *time.Time

func (*DiscountPercentageOnceForeverDuration) GetName ¶

func (*DiscountPercentageOnceForeverDuration) GetOrganizationID ¶

func (d *DiscountPercentageOnceForeverDuration) GetOrganizationID() string

func (*DiscountPercentageOnceForeverDuration) GetProducts ¶

func (*DiscountPercentageOnceForeverDuration) GetRedemptionsCount ¶

func (d *DiscountPercentageOnceForeverDuration) GetRedemptionsCount() int64

func (*DiscountPercentageOnceForeverDuration) GetStartsAt ¶

func (*DiscountPercentageOnceForeverDuration) GetType ¶

func (DiscountPercentageOnceForeverDuration) MarshalJSON ¶

func (d DiscountPercentageOnceForeverDuration) MarshalJSON() ([]byte, error)

func (*DiscountPercentageOnceForeverDuration) UnmarshalJSON ¶

func (d *DiscountPercentageOnceForeverDuration) UnmarshalJSON(data []byte) error

type DiscountPercentageOnceForeverDurationBase ¶

type DiscountPercentageOnceForeverDurationBase struct {
	Duration DiscountDuration `json:"duration"`
	Type     DiscountType     `json:"type"`
	// Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.
	BasisPoints int64 `json:"basis_points"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout.
	Code *string `json:"code"`
	// Timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at"`
	// Timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at"`
	// Maximum number of times the discount can be redeemed.
	MaxRedemptions *int64 `json:"max_redemptions"`
	// Number of times the discount has been redeemed.
	RedemptionsCount int64 `json:"redemptions_count"`
	// The organization ID.
	OrganizationID string `json:"organization_id"`
}

func (*DiscountPercentageOnceForeverDurationBase) GetBasisPoints ¶

func (*DiscountPercentageOnceForeverDurationBase) GetCode ¶

func (*DiscountPercentageOnceForeverDurationBase) GetCreatedAt ¶

func (*DiscountPercentageOnceForeverDurationBase) GetDuration ¶

func (*DiscountPercentageOnceForeverDurationBase) GetEndsAt ¶

func (*DiscountPercentageOnceForeverDurationBase) GetID ¶

func (*DiscountPercentageOnceForeverDurationBase) GetMaxRedemptions ¶

func (d *DiscountPercentageOnceForeverDurationBase) GetMaxRedemptions() *int64

func (*DiscountPercentageOnceForeverDurationBase) GetMetadata ¶

func (*DiscountPercentageOnceForeverDurationBase) GetModifiedAt ¶

func (*DiscountPercentageOnceForeverDurationBase) GetName ¶

func (*DiscountPercentageOnceForeverDurationBase) GetOrganizationID ¶

func (d *DiscountPercentageOnceForeverDurationBase) GetOrganizationID() string

func (*DiscountPercentageOnceForeverDurationBase) GetRedemptionsCount ¶

func (d *DiscountPercentageOnceForeverDurationBase) GetRedemptionsCount() int64

func (*DiscountPercentageOnceForeverDurationBase) GetStartsAt ¶

func (*DiscountPercentageOnceForeverDurationBase) GetType ¶

func (DiscountPercentageOnceForeverDurationBase) MarshalJSON ¶

func (*DiscountPercentageOnceForeverDurationBase) UnmarshalJSON ¶

func (d *DiscountPercentageOnceForeverDurationBase) UnmarshalJSON(data []byte) error

type DiscountPercentageOnceForeverDurationCreate ¶

type DiscountPercentageOnceForeverDurationCreate struct {
	Duration DiscountDuration `json:"duration"`
	Type     DiscountType     `json:"type"`
	// Discount percentage in basis points.
	//
	// A basis point is 1/100th of a percent.
	// For example, to create a 25.5% discount, set this to 2550.
	BasisPoints int64 `json:"basis_points"`
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]DiscountPercentageOnceForeverDurationCreateMetadata `json:"metadata,omitempty"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.
	Code *string `json:"code,omitempty"`
	// Optional timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at,omitempty"`
	// Optional timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at,omitempty"`
	// Optional maximum number of times the discount can be redeemed.
	MaxRedemptions *int64   `json:"max_redemptions,omitempty"`
	Products       []string `json:"products,omitempty"`
	// The ID of the organization owning the discount. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
}

DiscountPercentageOnceForeverDurationCreate - Schema to create a percentage discount that is applied once or forever.

func (*DiscountPercentageOnceForeverDurationCreate) GetBasisPoints ¶

func (*DiscountPercentageOnceForeverDurationCreate) GetCode ¶

func (*DiscountPercentageOnceForeverDurationCreate) GetDuration ¶

func (*DiscountPercentageOnceForeverDurationCreate) GetEndsAt ¶

func (*DiscountPercentageOnceForeverDurationCreate) GetMaxRedemptions ¶

func (d *DiscountPercentageOnceForeverDurationCreate) GetMaxRedemptions() *int64

func (*DiscountPercentageOnceForeverDurationCreate) GetMetadata ¶

func (*DiscountPercentageOnceForeverDurationCreate) GetName ¶

func (*DiscountPercentageOnceForeverDurationCreate) GetOrganizationID ¶

func (d *DiscountPercentageOnceForeverDurationCreate) GetOrganizationID() *string

func (*DiscountPercentageOnceForeverDurationCreate) GetProducts ¶

func (*DiscountPercentageOnceForeverDurationCreate) GetStartsAt ¶

func (*DiscountPercentageOnceForeverDurationCreate) GetType ¶

func (DiscountPercentageOnceForeverDurationCreate) MarshalJSON ¶

func (*DiscountPercentageOnceForeverDurationCreate) UnmarshalJSON ¶

func (d *DiscountPercentageOnceForeverDurationCreate) UnmarshalJSON(data []byte) error

type DiscountPercentageOnceForeverDurationCreateMetadata ¶

type DiscountPercentageOnceForeverDurationCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type DiscountPercentageOnceForeverDurationCreateMetadataType
}

func CreateDiscountPercentageOnceForeverDurationCreateMetadataBoolean ¶

func CreateDiscountPercentageOnceForeverDurationCreateMetadataBoolean(boolean bool) DiscountPercentageOnceForeverDurationCreateMetadata

func CreateDiscountPercentageOnceForeverDurationCreateMetadataInteger ¶

func CreateDiscountPercentageOnceForeverDurationCreateMetadataInteger(integer int64) DiscountPercentageOnceForeverDurationCreateMetadata

func CreateDiscountPercentageOnceForeverDurationCreateMetadataNumber ¶ added in v0.4.12

func CreateDiscountPercentageOnceForeverDurationCreateMetadataNumber(number float64) DiscountPercentageOnceForeverDurationCreateMetadata

func CreateDiscountPercentageOnceForeverDurationCreateMetadataStr ¶

func CreateDiscountPercentageOnceForeverDurationCreateMetadataStr(str string) DiscountPercentageOnceForeverDurationCreateMetadata

func (DiscountPercentageOnceForeverDurationCreateMetadata) MarshalJSON ¶

func (*DiscountPercentageOnceForeverDurationCreateMetadata) UnmarshalJSON ¶

type DiscountPercentageOnceForeverDurationCreateMetadataType ¶

type DiscountPercentageOnceForeverDurationCreateMetadataType string
const (
	DiscountPercentageOnceForeverDurationCreateMetadataTypeStr     DiscountPercentageOnceForeverDurationCreateMetadataType = "str"
	DiscountPercentageOnceForeverDurationCreateMetadataTypeInteger DiscountPercentageOnceForeverDurationCreateMetadataType = "integer"
	DiscountPercentageOnceForeverDurationCreateMetadataTypeNumber  DiscountPercentageOnceForeverDurationCreateMetadataType = "number"
	DiscountPercentageOnceForeverDurationCreateMetadataTypeBoolean DiscountPercentageOnceForeverDurationCreateMetadataType = "boolean"
)

type DiscountPercentageRepeatDuration ¶

type DiscountPercentageRepeatDuration struct {
	Duration         DiscountDuration `json:"duration"`
	DurationInMonths int64            `json:"duration_in_months"`
	Type             DiscountType     `json:"type"`
	// Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.
	BasisPoints int64 `json:"basis_points"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout.
	Code *string `json:"code"`
	// Timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at"`
	// Timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at"`
	// Maximum number of times the discount can be redeemed.
	MaxRedemptions *int64 `json:"max_redemptions"`
	// Number of times the discount has been redeemed.
	RedemptionsCount int64 `json:"redemptions_count"`
	// The organization ID.
	OrganizationID string            `json:"organization_id"`
	Products       []DiscountProduct `json:"products"`
}

DiscountPercentageRepeatDuration - Schema for a percentage discount that is applied on every invoice for a certain number of months.

func (*DiscountPercentageRepeatDuration) GetBasisPoints ¶

func (d *DiscountPercentageRepeatDuration) GetBasisPoints() int64

func (*DiscountPercentageRepeatDuration) GetCode ¶

func (*DiscountPercentageRepeatDuration) GetCreatedAt ¶

func (d *DiscountPercentageRepeatDuration) GetCreatedAt() time.Time

func (*DiscountPercentageRepeatDuration) GetDuration ¶

func (*DiscountPercentageRepeatDuration) GetDurationInMonths ¶

func (d *DiscountPercentageRepeatDuration) GetDurationInMonths() int64

func (*DiscountPercentageRepeatDuration) GetEndsAt ¶

func (d *DiscountPercentageRepeatDuration) GetEndsAt() *time.Time

func (*DiscountPercentageRepeatDuration) GetID ¶

func (*DiscountPercentageRepeatDuration) GetMaxRedemptions ¶

func (d *DiscountPercentageRepeatDuration) GetMaxRedemptions() *int64

func (*DiscountPercentageRepeatDuration) GetMetadata ¶

func (*DiscountPercentageRepeatDuration) GetModifiedAt ¶

func (d *DiscountPercentageRepeatDuration) GetModifiedAt() *time.Time

func (*DiscountPercentageRepeatDuration) GetName ¶

func (*DiscountPercentageRepeatDuration) GetOrganizationID ¶

func (d *DiscountPercentageRepeatDuration) GetOrganizationID() string

func (*DiscountPercentageRepeatDuration) GetProducts ¶

func (*DiscountPercentageRepeatDuration) GetRedemptionsCount ¶

func (d *DiscountPercentageRepeatDuration) GetRedemptionsCount() int64

func (*DiscountPercentageRepeatDuration) GetStartsAt ¶

func (d *DiscountPercentageRepeatDuration) GetStartsAt() *time.Time

func (*DiscountPercentageRepeatDuration) GetType ¶

func (DiscountPercentageRepeatDuration) MarshalJSON ¶

func (d DiscountPercentageRepeatDuration) MarshalJSON() ([]byte, error)

func (*DiscountPercentageRepeatDuration) UnmarshalJSON ¶

func (d *DiscountPercentageRepeatDuration) UnmarshalJSON(data []byte) error

type DiscountPercentageRepeatDurationBase ¶

type DiscountPercentageRepeatDurationBase struct {
	Duration         DiscountDuration `json:"duration"`
	DurationInMonths int64            `json:"duration_in_months"`
	Type             DiscountType     `json:"type"`
	// Discount percentage in basis points. A basis point is 1/100th of a percent. For example, 1000 basis points equals a 10% discount.
	BasisPoints int64 `json:"basis_points"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID       string                        `json:"id"`
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout.
	Code *string `json:"code"`
	// Timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at"`
	// Timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at"`
	// Maximum number of times the discount can be redeemed.
	MaxRedemptions *int64 `json:"max_redemptions"`
	// Number of times the discount has been redeemed.
	RedemptionsCount int64 `json:"redemptions_count"`
	// The organization ID.
	OrganizationID string `json:"organization_id"`
}

func (*DiscountPercentageRepeatDurationBase) GetBasisPoints ¶

func (d *DiscountPercentageRepeatDurationBase) GetBasisPoints() int64

func (*DiscountPercentageRepeatDurationBase) GetCode ¶

func (*DiscountPercentageRepeatDurationBase) GetCreatedAt ¶

func (*DiscountPercentageRepeatDurationBase) GetDuration ¶

func (*DiscountPercentageRepeatDurationBase) GetDurationInMonths ¶

func (d *DiscountPercentageRepeatDurationBase) GetDurationInMonths() int64

func (*DiscountPercentageRepeatDurationBase) GetEndsAt ¶

func (*DiscountPercentageRepeatDurationBase) GetID ¶

func (*DiscountPercentageRepeatDurationBase) GetMaxRedemptions ¶

func (d *DiscountPercentageRepeatDurationBase) GetMaxRedemptions() *int64

func (*DiscountPercentageRepeatDurationBase) GetMetadata ¶

func (*DiscountPercentageRepeatDurationBase) GetModifiedAt ¶

func (d *DiscountPercentageRepeatDurationBase) GetModifiedAt() *time.Time

func (*DiscountPercentageRepeatDurationBase) GetName ¶

func (*DiscountPercentageRepeatDurationBase) GetOrganizationID ¶

func (d *DiscountPercentageRepeatDurationBase) GetOrganizationID() string

func (*DiscountPercentageRepeatDurationBase) GetRedemptionsCount ¶

func (d *DiscountPercentageRepeatDurationBase) GetRedemptionsCount() int64

func (*DiscountPercentageRepeatDurationBase) GetStartsAt ¶

func (*DiscountPercentageRepeatDurationBase) GetType ¶

func (DiscountPercentageRepeatDurationBase) MarshalJSON ¶

func (d DiscountPercentageRepeatDurationBase) MarshalJSON() ([]byte, error)

func (*DiscountPercentageRepeatDurationBase) UnmarshalJSON ¶

func (d *DiscountPercentageRepeatDurationBase) UnmarshalJSON(data []byte) error

type DiscountPercentageRepeatDurationCreate ¶

type DiscountPercentageRepeatDurationCreate struct {
	Duration DiscountDuration `json:"duration"`
	// Number of months the discount should be applied.
	//
	// For this to work on yearly pricing, you should multiply this by 12.
	// For example, to apply the discount for 2 years, set this to 24.
	DurationInMonths int64        `json:"duration_in_months"`
	Type             DiscountType `json:"type"`
	// Discount percentage in basis points.
	//
	// A basis point is 1/100th of a percent.
	// For example, to create a 25.5% discount, set this to 2550.
	BasisPoints int64 `json:"basis_points"`
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]DiscountPercentageRepeatDurationCreateMetadata `json:"metadata,omitempty"`
	// Name of the discount. Will be displayed to the customer when the discount is applied.
	Name string `json:"name"`
	// Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.
	Code *string `json:"code,omitempty"`
	// Optional timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at,omitempty"`
	// Optional timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at,omitempty"`
	// Optional maximum number of times the discount can be redeemed.
	MaxRedemptions *int64   `json:"max_redemptions,omitempty"`
	Products       []string `json:"products,omitempty"`
	// The ID of the organization owning the discount. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
}

DiscountPercentageRepeatDurationCreate - Schema to create a percentage discount that is applied on every invoice for a certain number of months.

func (*DiscountPercentageRepeatDurationCreate) GetBasisPoints ¶

func (d *DiscountPercentageRepeatDurationCreate) GetBasisPoints() int64

func (*DiscountPercentageRepeatDurationCreate) GetCode ¶

func (*DiscountPercentageRepeatDurationCreate) GetDuration ¶

func (*DiscountPercentageRepeatDurationCreate) GetDurationInMonths ¶

func (d *DiscountPercentageRepeatDurationCreate) GetDurationInMonths() int64

func (*DiscountPercentageRepeatDurationCreate) GetEndsAt ¶

func (*DiscountPercentageRepeatDurationCreate) GetMaxRedemptions ¶

func (d *DiscountPercentageRepeatDurationCreate) GetMaxRedemptions() *int64

func (*DiscountPercentageRepeatDurationCreate) GetMetadata ¶

func (*DiscountPercentageRepeatDurationCreate) GetName ¶

func (*DiscountPercentageRepeatDurationCreate) GetOrganizationID ¶

func (d *DiscountPercentageRepeatDurationCreate) GetOrganizationID() *string

func (*DiscountPercentageRepeatDurationCreate) GetProducts ¶

func (*DiscountPercentageRepeatDurationCreate) GetStartsAt ¶

func (*DiscountPercentageRepeatDurationCreate) GetType ¶

func (DiscountPercentageRepeatDurationCreate) MarshalJSON ¶

func (d DiscountPercentageRepeatDurationCreate) MarshalJSON() ([]byte, error)

func (*DiscountPercentageRepeatDurationCreate) UnmarshalJSON ¶

func (d *DiscountPercentageRepeatDurationCreate) UnmarshalJSON(data []byte) error

type DiscountPercentageRepeatDurationCreateMetadata ¶

type DiscountPercentageRepeatDurationCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type DiscountPercentageRepeatDurationCreateMetadataType
}

func CreateDiscountPercentageRepeatDurationCreateMetadataBoolean ¶

func CreateDiscountPercentageRepeatDurationCreateMetadataBoolean(boolean bool) DiscountPercentageRepeatDurationCreateMetadata

func CreateDiscountPercentageRepeatDurationCreateMetadataInteger ¶

func CreateDiscountPercentageRepeatDurationCreateMetadataInteger(integer int64) DiscountPercentageRepeatDurationCreateMetadata

func CreateDiscountPercentageRepeatDurationCreateMetadataNumber ¶ added in v0.4.12

func CreateDiscountPercentageRepeatDurationCreateMetadataNumber(number float64) DiscountPercentageRepeatDurationCreateMetadata

func CreateDiscountPercentageRepeatDurationCreateMetadataStr ¶

func CreateDiscountPercentageRepeatDurationCreateMetadataStr(str string) DiscountPercentageRepeatDurationCreateMetadata

func (DiscountPercentageRepeatDurationCreateMetadata) MarshalJSON ¶

func (*DiscountPercentageRepeatDurationCreateMetadata) UnmarshalJSON ¶

type DiscountPercentageRepeatDurationCreateMetadataType ¶

type DiscountPercentageRepeatDurationCreateMetadataType string
const (
	DiscountPercentageRepeatDurationCreateMetadataTypeStr     DiscountPercentageRepeatDurationCreateMetadataType = "str"
	DiscountPercentageRepeatDurationCreateMetadataTypeInteger DiscountPercentageRepeatDurationCreateMetadataType = "integer"
	DiscountPercentageRepeatDurationCreateMetadataTypeNumber  DiscountPercentageRepeatDurationCreateMetadataType = "number"
	DiscountPercentageRepeatDurationCreateMetadataTypeBoolean DiscountPercentageRepeatDurationCreateMetadataType = "boolean"
)

type DiscountProduct ¶

type DiscountProduct struct {
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count"`
	// The name of the product.
	Name string `json:"name"`
	// The description of the product.
	Description *string           `json:"description"`
	Visibility  ProductVisibility `json:"visibility"`
	// The recurring interval of the product. If `None`, the product is a one-time purchase.
	RecurringInterval *SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
	RecurringIntervalCount *int64 `json:"recurring_interval_count"`
	// Whether the product is a subscription.
	IsRecurring bool `json:"is_recurring"`
	// Whether the product is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the organization owning the product.
	OrganizationID string `json:"organization_id"`
}

DiscountProduct - A product that a discount can be applied to.

func (*DiscountProduct) GetCreatedAt ¶

func (d *DiscountProduct) GetCreatedAt() time.Time

func (*DiscountProduct) GetDescription ¶

func (d *DiscountProduct) GetDescription() *string

func (*DiscountProduct) GetID ¶

func (d *DiscountProduct) GetID() string

func (*DiscountProduct) GetIsArchived ¶

func (d *DiscountProduct) GetIsArchived() bool

func (*DiscountProduct) GetIsRecurring ¶

func (d *DiscountProduct) GetIsRecurring() bool

func (*DiscountProduct) GetMetadata ¶ added in v0.4.13

func (d *DiscountProduct) GetMetadata() map[string]MetadataOutputType

func (*DiscountProduct) GetModifiedAt ¶

func (d *DiscountProduct) GetModifiedAt() *time.Time

func (*DiscountProduct) GetName ¶

func (d *DiscountProduct) GetName() string

func (*DiscountProduct) GetOrganizationID ¶

func (d *DiscountProduct) GetOrganizationID() string

func (*DiscountProduct) GetRecurringInterval ¶ added in v0.3.0

func (d *DiscountProduct) GetRecurringInterval() *SubscriptionRecurringInterval

func (*DiscountProduct) GetRecurringIntervalCount ¶ added in v0.12.0

func (d *DiscountProduct) GetRecurringIntervalCount() *int64

func (*DiscountProduct) GetTrialInterval ¶ added in v0.9.1

func (d *DiscountProduct) GetTrialInterval() *TrialInterval

func (*DiscountProduct) GetTrialIntervalCount ¶ added in v0.9.1

func (d *DiscountProduct) GetTrialIntervalCount() *int64

func (*DiscountProduct) GetVisibility ¶ added in v0.13.0

func (d *DiscountProduct) GetVisibility() ProductVisibility

func (DiscountProduct) MarshalJSON ¶

func (d DiscountProduct) MarshalJSON() ([]byte, error)

func (*DiscountProduct) UnmarshalJSON ¶

func (d *DiscountProduct) UnmarshalJSON(data []byte) error

type DiscountSortProperty ¶

type DiscountSortProperty string
const (
	DiscountSortPropertyCreatedAt             DiscountSortProperty = "created_at"
	DiscountSortPropertyMinusCreatedAt        DiscountSortProperty = "-created_at"
	DiscountSortPropertyName                  DiscountSortProperty = "name"
	DiscountSortPropertyMinusName             DiscountSortProperty = "-name"
	DiscountSortPropertyCode                  DiscountSortProperty = "code"
	DiscountSortPropertyMinusCode             DiscountSortProperty = "-code"
	DiscountSortPropertyRedemptionsCount      DiscountSortProperty = "redemptions_count"
	DiscountSortPropertyMinusRedemptionsCount DiscountSortProperty = "-redemptions_count"
	DiscountSortPropertyEndsAt                DiscountSortProperty = "ends_at"
	DiscountSortPropertyMinusEndsAt           DiscountSortProperty = "-ends_at"
)

func (DiscountSortProperty) ToPointer ¶

func (*DiscountSortProperty) UnmarshalJSON ¶

func (e *DiscountSortProperty) UnmarshalJSON(data []byte) error

type DiscountType ¶

type DiscountType string
const (
	DiscountTypeFixed      DiscountType = "fixed"
	DiscountTypePercentage DiscountType = "percentage"
)

func (DiscountType) ToPointer ¶

func (e DiscountType) ToPointer() *DiscountType

func (*DiscountType) UnmarshalJSON ¶

func (e *DiscountType) UnmarshalJSON(data []byte) error

type DiscountUnionType ¶

type DiscountUnionType string
const (
	DiscountUnionTypeDiscountFixedOnceForeverDuration      DiscountUnionType = "DiscountFixedOnceForeverDuration"
	DiscountUnionTypeDiscountFixedRepeatDuration           DiscountUnionType = "DiscountFixedRepeatDuration"
	DiscountUnionTypeDiscountPercentageOnceForeverDuration DiscountUnionType = "DiscountPercentageOnceForeverDuration"
	DiscountUnionTypeDiscountPercentageRepeatDuration      DiscountUnionType = "DiscountPercentageRepeatDuration"
)

type DiscountUpdate ¶

type DiscountUpdate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]DiscountUpdateMetadata `json:"metadata,omitempty"`
	Name     *string                           `json:"name,omitempty"`
	// Code customers can use to apply the discount during checkout. Must be between 3 and 256 characters long and contain only alphanumeric characters.If not provided, the discount can only be applied via the API.
	Code *string `json:"code,omitempty"`
	// Optional timestamp after which the discount is redeemable.
	StartsAt *time.Time `json:"starts_at,omitempty"`
	// Optional timestamp after which the discount is no longer redeemable.
	EndsAt *time.Time `json:"ends_at,omitempty"`
	// Optional maximum number of times the discount can be redeemed.
	MaxRedemptions   *int64            `json:"max_redemptions,omitempty"`
	Duration         *DiscountDuration `json:"duration,omitempty"`
	DurationInMonths *int64            `json:"duration_in_months,omitempty"`
	Type             *DiscountType     `json:"type,omitempty"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Amount *int64 `json:"amount,omitempty"`
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	Currency    *PresentmentCurrency `json:"currency,omitempty"`
	Amounts     map[string]int64     `json:"amounts,omitempty"`
	BasisPoints *int64               `json:"basis_points,omitempty"`
	Products    []string             `json:"products,omitempty"`
}

DiscountUpdate - Schema to update a discount.

func (*DiscountUpdate) GetAmount ¶

func (d *DiscountUpdate) GetAmount() *int64

func (*DiscountUpdate) GetAmounts ¶ added in v0.15.0

func (d *DiscountUpdate) GetAmounts() map[string]int64

func (*DiscountUpdate) GetBasisPoints ¶

func (d *DiscountUpdate) GetBasisPoints() *int64

func (*DiscountUpdate) GetCode ¶

func (d *DiscountUpdate) GetCode() *string

func (*DiscountUpdate) GetCurrency ¶

func (d *DiscountUpdate) GetCurrency() *PresentmentCurrency

func (*DiscountUpdate) GetDuration ¶

func (d *DiscountUpdate) GetDuration() *DiscountDuration

func (*DiscountUpdate) GetDurationInMonths ¶

func (d *DiscountUpdate) GetDurationInMonths() *int64

func (*DiscountUpdate) GetEndsAt ¶

func (d *DiscountUpdate) GetEndsAt() *time.Time

func (*DiscountUpdate) GetMaxRedemptions ¶

func (d *DiscountUpdate) GetMaxRedemptions() *int64

func (*DiscountUpdate) GetMetadata ¶

func (d *DiscountUpdate) GetMetadata() map[string]DiscountUpdateMetadata

func (*DiscountUpdate) GetName ¶

func (d *DiscountUpdate) GetName() *string

func (*DiscountUpdate) GetProducts ¶

func (d *DiscountUpdate) GetProducts() []string

func (*DiscountUpdate) GetStartsAt ¶

func (d *DiscountUpdate) GetStartsAt() *time.Time

func (*DiscountUpdate) GetType ¶

func (d *DiscountUpdate) GetType() *DiscountType

func (DiscountUpdate) MarshalJSON ¶

func (d DiscountUpdate) MarshalJSON() ([]byte, error)

func (*DiscountUpdate) UnmarshalJSON ¶

func (d *DiscountUpdate) UnmarshalJSON(data []byte) error

type DiscountUpdateMetadata ¶

type DiscountUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type DiscountUpdateMetadataType
}

func CreateDiscountUpdateMetadataBoolean ¶

func CreateDiscountUpdateMetadataBoolean(boolean bool) DiscountUpdateMetadata

func CreateDiscountUpdateMetadataInteger ¶

func CreateDiscountUpdateMetadataInteger(integer int64) DiscountUpdateMetadata

func CreateDiscountUpdateMetadataNumber ¶ added in v0.4.12

func CreateDiscountUpdateMetadataNumber(number float64) DiscountUpdateMetadata

func CreateDiscountUpdateMetadataStr ¶

func CreateDiscountUpdateMetadataStr(str string) DiscountUpdateMetadata

func (DiscountUpdateMetadata) MarshalJSON ¶

func (u DiscountUpdateMetadata) MarshalJSON() ([]byte, error)

func (*DiscountUpdateMetadata) UnmarshalJSON ¶

func (u *DiscountUpdateMetadata) UnmarshalJSON(data []byte) error

type DiscountUpdateMetadataType ¶

type DiscountUpdateMetadataType string
const (
	DiscountUpdateMetadataTypeStr     DiscountUpdateMetadataType = "str"
	DiscountUpdateMetadataTypeInteger DiscountUpdateMetadataType = "integer"
	DiscountUpdateMetadataTypeNumber  DiscountUpdateMetadataType = "number"
	DiscountUpdateMetadataTypeBoolean DiscountUpdateMetadataType = "boolean"
)

type Dispute ¶ added in v0.13.0

type Dispute struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID     string        `json:"id"`
	Status DisputeStatus `json:"status"`
	// Whether the dispute has been resolved (won or lost).
	Resolved bool `json:"resolved"`
	// Whether the dispute is closed (prevented, won, or lost).
	Closed bool `json:"closed"`
	// Amount in cents disputed.
	Amount int64 `json:"amount"`
	// Tax amount in cents disputed.
	TaxAmount int64 `json:"tax_amount"`
	// Currency code of the dispute.
	Currency string `json:"currency"`
	// The ID of the order associated with the dispute.
	OrderID string `json:"order_id"`
	// The ID of the payment associated with the dispute.
	PaymentID string `json:"payment_id"`
}

Dispute - Schema representing a dispute.

A dispute is a challenge raised by a customer or their bank regarding a payment.

func (*Dispute) GetAmount ¶ added in v0.13.0

func (d *Dispute) GetAmount() int64

func (*Dispute) GetClosed ¶ added in v0.13.0

func (d *Dispute) GetClosed() bool

func (*Dispute) GetCreatedAt ¶ added in v0.13.0

func (d *Dispute) GetCreatedAt() time.Time

func (*Dispute) GetCurrency ¶ added in v0.13.0

func (d *Dispute) GetCurrency() string

func (*Dispute) GetID ¶ added in v0.13.0

func (d *Dispute) GetID() string

func (*Dispute) GetModifiedAt ¶ added in v0.13.0

func (d *Dispute) GetModifiedAt() *time.Time

func (*Dispute) GetOrderID ¶ added in v0.13.0

func (d *Dispute) GetOrderID() string

func (*Dispute) GetPaymentID ¶ added in v0.13.0

func (d *Dispute) GetPaymentID() string

func (*Dispute) GetResolved ¶ added in v0.13.0

func (d *Dispute) GetResolved() bool

func (*Dispute) GetStatus ¶ added in v0.13.0

func (d *Dispute) GetStatus() DisputeStatus

func (*Dispute) GetTaxAmount ¶ added in v0.13.0

func (d *Dispute) GetTaxAmount() int64

func (Dispute) MarshalJSON ¶ added in v0.13.0

func (d Dispute) MarshalJSON() ([]byte, error)

func (*Dispute) UnmarshalJSON ¶ added in v0.13.0

func (d *Dispute) UnmarshalJSON(data []byte) error

type DisputeSortProperty ¶ added in v0.13.0

type DisputeSortProperty string
const (
	DisputeSortPropertyCreatedAt      DisputeSortProperty = "created_at"
	DisputeSortPropertyMinusCreatedAt DisputeSortProperty = "-created_at"
	DisputeSortPropertyAmount         DisputeSortProperty = "amount"
	DisputeSortPropertyMinusAmount    DisputeSortProperty = "-amount"
)

func (DisputeSortProperty) ToPointer ¶ added in v0.13.0

func (*DisputeSortProperty) UnmarshalJSON ¶ added in v0.13.0

func (e *DisputeSortProperty) UnmarshalJSON(data []byte) error

type DisputeStatus ¶ added in v0.13.0

type DisputeStatus string
const (
	DisputeStatusPrevented     DisputeStatus = "prevented"
	DisputeStatusEarlyWarning  DisputeStatus = "early_warning"
	DisputeStatusNeedsResponse DisputeStatus = "needs_response"
	DisputeStatusUnderReview   DisputeStatus = "under_review"
	DisputeStatusLost          DisputeStatus = "lost"
	DisputeStatusWon           DisputeStatus = "won"
)

func (DisputeStatus) ToPointer ¶ added in v0.13.0

func (e DisputeStatus) ToPointer() *DisputeStatus

func (*DisputeStatus) UnmarshalJSON ¶ added in v0.13.0

func (e *DisputeStatus) UnmarshalJSON(data []byte) error

type DownloadableFileCreate ¶

type DownloadableFileCreate struct {
	OrganizationID       *string               `json:"organization_id,omitempty"`
	Name                 string                `json:"name"`
	MimeType             string                `json:"mime_type"`
	Size                 int64                 `json:"size"`
	ChecksumSha256Base64 *string               `json:"checksum_sha256_base64,omitempty"`
	Upload               S3FileCreateMultipart `json:"upload"`

	Version *string `json:"version,omitempty"`
	// contains filtered or unexported fields
}

DownloadableFileCreate - Schema to create a file to be associated with the downloadables benefit.

func (*DownloadableFileCreate) GetChecksumSha256Base64 ¶

func (d *DownloadableFileCreate) GetChecksumSha256Base64() *string

func (*DownloadableFileCreate) GetMimeType ¶

func (d *DownloadableFileCreate) GetMimeType() string

func (*DownloadableFileCreate) GetName ¶

func (d *DownloadableFileCreate) GetName() string

func (*DownloadableFileCreate) GetOrganizationID ¶

func (d *DownloadableFileCreate) GetOrganizationID() *string

func (*DownloadableFileCreate) GetService ¶

func (d *DownloadableFileCreate) GetService() string

func (*DownloadableFileCreate) GetSize ¶

func (d *DownloadableFileCreate) GetSize() int64

func (*DownloadableFileCreate) GetUpload ¶

func (*DownloadableFileCreate) GetVersion ¶

func (d *DownloadableFileCreate) GetVersion() *string

func (DownloadableFileCreate) MarshalJSON ¶

func (d DownloadableFileCreate) MarshalJSON() ([]byte, error)

func (*DownloadableFileCreate) UnmarshalJSON ¶

func (d *DownloadableFileCreate) UnmarshalJSON(data []byte) error

type DownloadableFileRead ¶

type DownloadableFileRead struct {
	// The ID of the object.
	ID                   string     `json:"id"`
	OrganizationID       string     `json:"organization_id"`
	Name                 string     `json:"name"`
	Path                 string     `json:"path"`
	MimeType             string     `json:"mime_type"`
	Size                 int64      `json:"size"`
	StorageVersion       *string    `json:"storage_version"`
	ChecksumEtag         *string    `json:"checksum_etag"`
	ChecksumSha256Base64 *string    `json:"checksum_sha256_base64"`
	ChecksumSha256Hex    *string    `json:"checksum_sha256_hex"`
	LastModifiedAt       *time.Time `json:"last_modified_at"`
	Version              *string    `json:"version"`

	IsUploaded   bool      `json:"is_uploaded"`
	CreatedAt    time.Time `json:"created_at"`
	SizeReadable string    `json:"size_readable"`
	// contains filtered or unexported fields
}

DownloadableFileRead - File to be associated with the downloadables benefit.

func (*DownloadableFileRead) GetChecksumEtag ¶

func (d *DownloadableFileRead) GetChecksumEtag() *string

func (*DownloadableFileRead) GetChecksumSha256Base64 ¶

func (d *DownloadableFileRead) GetChecksumSha256Base64() *string

func (*DownloadableFileRead) GetChecksumSha256Hex ¶

func (d *DownloadableFileRead) GetChecksumSha256Hex() *string

func (*DownloadableFileRead) GetCreatedAt ¶

func (d *DownloadableFileRead) GetCreatedAt() time.Time

func (*DownloadableFileRead) GetID ¶

func (d *DownloadableFileRead) GetID() string

func (*DownloadableFileRead) GetIsUploaded ¶

func (d *DownloadableFileRead) GetIsUploaded() bool

func (*DownloadableFileRead) GetLastModifiedAt ¶

func (d *DownloadableFileRead) GetLastModifiedAt() *time.Time

func (*DownloadableFileRead) GetMimeType ¶

func (d *DownloadableFileRead) GetMimeType() string

func (*DownloadableFileRead) GetName ¶

func (d *DownloadableFileRead) GetName() string

func (*DownloadableFileRead) GetOrganizationID ¶

func (d *DownloadableFileRead) GetOrganizationID() string

func (*DownloadableFileRead) GetPath ¶

func (d *DownloadableFileRead) GetPath() string

func (*DownloadableFileRead) GetService ¶

func (d *DownloadableFileRead) GetService() string

func (*DownloadableFileRead) GetSize ¶

func (d *DownloadableFileRead) GetSize() int64

func (*DownloadableFileRead) GetSizeReadable ¶

func (d *DownloadableFileRead) GetSizeReadable() string

func (*DownloadableFileRead) GetStorageVersion ¶

func (d *DownloadableFileRead) GetStorageVersion() *string

func (*DownloadableFileRead) GetVersion ¶

func (d *DownloadableFileRead) GetVersion() *string

func (DownloadableFileRead) MarshalJSON ¶

func (d DownloadableFileRead) MarshalJSON() ([]byte, error)

func (*DownloadableFileRead) UnmarshalJSON ¶

func (d *DownloadableFileRead) UnmarshalJSON(data []byte) error

type DownloadableRead ¶

type DownloadableRead struct {
	ID        string       `json:"id"`
	BenefitID string       `json:"benefit_id"`
	File      FileDownload `json:"file"`
}

func (*DownloadableRead) GetBenefitID ¶

func (d *DownloadableRead) GetBenefitID() string

func (*DownloadableRead) GetFile ¶

func (d *DownloadableRead) GetFile() FileDownload

func (*DownloadableRead) GetID ¶

func (d *DownloadableRead) GetID() string

type Event ¶ added in v0.1.8

type Event struct {
	SystemEvent *SystemEvent `queryParam:"inline" union:"member"`
	UserEvent   *UserEvent   `queryParam:"inline" union:"member"`

	Type EventUnionType
}

func CreateEventSystemEvent ¶ added in v0.4.20

func CreateEventSystemEvent(systemEvent SystemEvent) Event

func CreateEventUserEvent ¶ added in v0.4.20

func CreateEventUserEvent(userEvent UserEvent) Event

func (Event) MarshalJSON ¶ added in v0.1.8

func (u Event) MarshalJSON() ([]byte, error)

func (*Event) UnmarshalJSON ¶ added in v0.1.8

func (u *Event) UnmarshalJSON(data []byte) error

type EventCreateCustomer ¶ added in v0.1.8

type EventCreateCustomer struct {
	// The timestamp of the event.
	Timestamp *time.Time `json:"timestamp,omitempty"`
	// The name of the event.
	Name string `json:"name"`
	// The ID of the organization owning the event. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
	// Your unique identifier for this event. Useful for deduplication and parent-child relationships.
	ExternalID *string `json:"external_id,omitempty"`
	// The ID of the parent event. Can be either a Polar event ID (UUID) or an external event ID.
	ParentID *string                       `json:"parent_id,omitempty"`
	Metadata map[string]EventMetadataInput `json:"metadata,omitempty"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID string `json:"customer_id"`
	// ID of the member within the customer's organization who performed the action. Used for member-level attribution in B2B.
	MemberID *string `json:"member_id,omitempty"`
}

func (*EventCreateCustomer) GetCustomerID ¶ added in v0.1.8

func (e *EventCreateCustomer) GetCustomerID() string

func (*EventCreateCustomer) GetExternalID ¶ added in v0.12.0

func (e *EventCreateCustomer) GetExternalID() *string

func (*EventCreateCustomer) GetMemberID ¶ added in v0.13.0

func (e *EventCreateCustomer) GetMemberID() *string

func (*EventCreateCustomer) GetMetadata ¶ added in v0.1.8

func (e *EventCreateCustomer) GetMetadata() map[string]EventMetadataInput

func (*EventCreateCustomer) GetName ¶ added in v0.1.8

func (e *EventCreateCustomer) GetName() string

func (*EventCreateCustomer) GetOrganizationID ¶ added in v0.1.8

func (e *EventCreateCustomer) GetOrganizationID() *string

func (*EventCreateCustomer) GetParentID ¶ added in v0.12.0

func (e *EventCreateCustomer) GetParentID() *string

func (*EventCreateCustomer) GetTimestamp ¶ added in v0.1.8

func (e *EventCreateCustomer) GetTimestamp() *time.Time

func (EventCreateCustomer) MarshalJSON ¶ added in v0.1.8

func (e EventCreateCustomer) MarshalJSON() ([]byte, error)

func (*EventCreateCustomer) UnmarshalJSON ¶ added in v0.1.8

func (e *EventCreateCustomer) UnmarshalJSON(data []byte) error

type EventCreateExternalCustomer ¶ added in v0.1.8

type EventCreateExternalCustomer struct {
	// The timestamp of the event.
	Timestamp *time.Time `json:"timestamp,omitempty"`
	// The name of the event.
	Name string `json:"name"`
	// The ID of the organization owning the event. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
	// Your unique identifier for this event. Useful for deduplication and parent-child relationships.
	ExternalID *string `json:"external_id,omitempty"`
	// The ID of the parent event. Can be either a Polar event ID (UUID) or an external event ID.
	ParentID *string                       `json:"parent_id,omitempty"`
	Metadata map[string]EventMetadataInput `json:"metadata,omitempty"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID string `json:"external_customer_id"`
	// ID of the member in your system within the customer's organization who performed the action. Used for member-level attribution in B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
}

func (*EventCreateExternalCustomer) GetExternalCustomerID ¶ added in v0.1.8

func (e *EventCreateExternalCustomer) GetExternalCustomerID() string

func (*EventCreateExternalCustomer) GetExternalID ¶ added in v0.12.0

func (e *EventCreateExternalCustomer) GetExternalID() *string

func (*EventCreateExternalCustomer) GetExternalMemberID ¶ added in v0.13.0

func (e *EventCreateExternalCustomer) GetExternalMemberID() *string

func (*EventCreateExternalCustomer) GetMetadata ¶ added in v0.1.8

func (*EventCreateExternalCustomer) GetName ¶ added in v0.1.8

func (e *EventCreateExternalCustomer) GetName() string

func (*EventCreateExternalCustomer) GetOrganizationID ¶ added in v0.1.8

func (e *EventCreateExternalCustomer) GetOrganizationID() *string

func (*EventCreateExternalCustomer) GetParentID ¶ added in v0.12.0

func (e *EventCreateExternalCustomer) GetParentID() *string

func (*EventCreateExternalCustomer) GetTimestamp ¶ added in v0.1.8

func (e *EventCreateExternalCustomer) GetTimestamp() *time.Time

func (EventCreateExternalCustomer) MarshalJSON ¶ added in v0.1.8

func (e EventCreateExternalCustomer) MarshalJSON() ([]byte, error)

func (*EventCreateExternalCustomer) UnmarshalJSON ¶ added in v0.1.8

func (e *EventCreateExternalCustomer) UnmarshalJSON(data []byte) error

type EventMetadataInput ¶ added in v0.11.0

type EventMetadataInput struct {
	Str               *string            `queryParam:"inline" union:"member"`
	Integer           *int64             `queryParam:"inline" union:"member"`
	Number            *float64           `queryParam:"inline" union:"member"`
	Boolean           *bool              `queryParam:"inline" union:"member"`
	CostMetadataInput *CostMetadataInput `queryParam:"inline" union:"member"`
	LLMMetadata       *LLMMetadata       `queryParam:"inline" union:"member"`

	Type EventMetadataInputType
}

func CreateEventMetadataInputBoolean ¶ added in v0.11.0

func CreateEventMetadataInputBoolean(boolean bool) EventMetadataInput

func CreateEventMetadataInputCostMetadataInput ¶ added in v0.12.0

func CreateEventMetadataInputCostMetadataInput(costMetadataInput CostMetadataInput) EventMetadataInput

func CreateEventMetadataInputInteger ¶ added in v0.11.0

func CreateEventMetadataInputInteger(integer int64) EventMetadataInput

func CreateEventMetadataInputLLMMetadata ¶ added in v0.12.0

func CreateEventMetadataInputLLMMetadata(llmMetadata LLMMetadata) EventMetadataInput

func CreateEventMetadataInputNumber ¶ added in v0.11.0

func CreateEventMetadataInputNumber(number float64) EventMetadataInput

func CreateEventMetadataInputStr ¶ added in v0.11.0

func CreateEventMetadataInputStr(str string) EventMetadataInput

func (EventMetadataInput) MarshalJSON ¶ added in v0.11.0

func (u EventMetadataInput) MarshalJSON() ([]byte, error)

func (*EventMetadataInput) UnmarshalJSON ¶ added in v0.11.0

func (u *EventMetadataInput) UnmarshalJSON(data []byte) error

type EventMetadataInputType ¶ added in v0.11.0

type EventMetadataInputType string
const (
	EventMetadataInputTypeStr               EventMetadataInputType = "str"
	EventMetadataInputTypeInteger           EventMetadataInputType = "integer"
	EventMetadataInputTypeNumber            EventMetadataInputType = "number"
	EventMetadataInputTypeBoolean           EventMetadataInputType = "boolean"
	EventMetadataInputTypeCostMetadataInput EventMetadataInputType = "CostMetadata-Input"
	EventMetadataInputTypeLLMMetadata       EventMetadataInputType = "LLMMetadata"
)

type EventMetadataOutput ¶ added in v0.11.0

type EventMetadataOutput struct {
	Str                *string             `queryParam:"inline" union:"member"`
	Integer            *int64              `queryParam:"inline" union:"member"`
	Number             *float64            `queryParam:"inline" union:"member"`
	Boolean            *bool               `queryParam:"inline" union:"member"`
	CostMetadataOutput *CostMetadataOutput `queryParam:"inline" union:"member"`
	LLMMetadata        *LLMMetadata        `queryParam:"inline" union:"member"`

	Type EventMetadataOutputType
}

func CreateEventMetadataOutputBoolean ¶ added in v0.11.0

func CreateEventMetadataOutputBoolean(boolean bool) EventMetadataOutput

func CreateEventMetadataOutputCostMetadataOutput ¶ added in v0.12.0

func CreateEventMetadataOutputCostMetadataOutput(costMetadataOutput CostMetadataOutput) EventMetadataOutput

func CreateEventMetadataOutputInteger ¶ added in v0.11.0

func CreateEventMetadataOutputInteger(integer int64) EventMetadataOutput

func CreateEventMetadataOutputLLMMetadata ¶ added in v0.12.0

func CreateEventMetadataOutputLLMMetadata(llmMetadata LLMMetadata) EventMetadataOutput

func CreateEventMetadataOutputNumber ¶ added in v0.11.0

func CreateEventMetadataOutputNumber(number float64) EventMetadataOutput

func CreateEventMetadataOutputStr ¶ added in v0.11.0

func CreateEventMetadataOutputStr(str string) EventMetadataOutput

func (EventMetadataOutput) MarshalJSON ¶ added in v0.11.0

func (u EventMetadataOutput) MarshalJSON() ([]byte, error)

func (*EventMetadataOutput) UnmarshalJSON ¶ added in v0.11.0

func (u *EventMetadataOutput) UnmarshalJSON(data []byte) error

type EventMetadataOutputType ¶ added in v0.11.0

type EventMetadataOutputType string
const (
	EventMetadataOutputTypeStr                EventMetadataOutputType = "str"
	EventMetadataOutputTypeInteger            EventMetadataOutputType = "integer"
	EventMetadataOutputTypeNumber             EventMetadataOutputType = "number"
	EventMetadataOutputTypeBoolean            EventMetadataOutputType = "boolean"
	EventMetadataOutputTypeCostMetadataOutput EventMetadataOutputType = "CostMetadata-Output"
	EventMetadataOutputTypeLLMMetadata        EventMetadataOutputType = "LLMMetadata"
)

type EventName ¶ added in v0.4.10

type EventName struct {
	// The name of the event.
	Name   string      `json:"name"`
	Source EventSource `json:"source"`
	// Number of times the event has occurred.
	Occurrences int64 `json:"occurrences"`
	// The first time the event occurred.
	FirstSeen time.Time `json:"first_seen"`
	// The last time the event occurred.
	LastSeen time.Time `json:"last_seen"`
}

func (*EventName) GetFirstSeen ¶ added in v0.4.10

func (e *EventName) GetFirstSeen() time.Time

func (*EventName) GetLastSeen ¶ added in v0.4.10

func (e *EventName) GetLastSeen() time.Time

func (*EventName) GetName ¶ added in v0.4.10

func (e *EventName) GetName() string

func (*EventName) GetOccurrences ¶ added in v0.4.10

func (e *EventName) GetOccurrences() int64

func (*EventName) GetSource ¶ added in v0.4.11

func (e *EventName) GetSource() EventSource

func (EventName) MarshalJSON ¶ added in v0.4.10

func (e EventName) MarshalJSON() ([]byte, error)

func (*EventName) UnmarshalJSON ¶ added in v0.4.10

func (e *EventName) UnmarshalJSON(data []byte) error

type EventNamesSortProperty ¶ added in v0.4.10

type EventNamesSortProperty string
const (
	EventNamesSortPropertyName             EventNamesSortProperty = "name"
	EventNamesSortPropertyMinusName        EventNamesSortProperty = "-name"
	EventNamesSortPropertyOccurrences      EventNamesSortProperty = "occurrences"
	EventNamesSortPropertyMinusOccurrences EventNamesSortProperty = "-occurrences"
	EventNamesSortPropertyFirstSeen        EventNamesSortProperty = "first_seen"
	EventNamesSortPropertyMinusFirstSeen   EventNamesSortProperty = "-first_seen"
	EventNamesSortPropertyLastSeen         EventNamesSortProperty = "last_seen"
	EventNamesSortPropertyMinusLastSeen    EventNamesSortProperty = "-last_seen"
)

func (EventNamesSortProperty) ToPointer ¶ added in v0.4.10

func (*EventNamesSortProperty) UnmarshalJSON ¶ added in v0.4.10

func (e *EventNamesSortProperty) UnmarshalJSON(data []byte) error

type EventSortProperty ¶ added in v0.1.8

type EventSortProperty string
const (
	EventSortPropertyTimestamp      EventSortProperty = "timestamp"
	EventSortPropertyMinusTimestamp EventSortProperty = "-timestamp"
)

func (EventSortProperty) ToPointer ¶ added in v0.1.8

func (e EventSortProperty) ToPointer() *EventSortProperty

func (*EventSortProperty) UnmarshalJSON ¶ added in v0.1.8

func (e *EventSortProperty) UnmarshalJSON(data []byte) error

type EventSource ¶ added in v0.1.8

type EventSource string
const (
	EventSourceSystem EventSource = "system"
	EventSourceUser   EventSource = "user"
)

func (EventSource) ToPointer ¶ added in v0.1.8

func (e EventSource) ToPointer() *EventSource

func (*EventSource) UnmarshalJSON ¶ added in v0.1.8

func (e *EventSource) UnmarshalJSON(data []byte) error

type EventType ¶ added in v0.4.20

type EventType struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The name of the event type.
	Name string `json:"name"`
	// The label for the event type.
	Label string `json:"label"`
	// Property path to extract dynamic label from event metadata.
	LabelPropertySelector *string `json:"label_property_selector,omitempty"`
	// The ID of the organization owning the event type.
	OrganizationID string `json:"organization_id"`
}

func (*EventType) GetCreatedAt ¶ added in v0.13.0

func (e *EventType) GetCreatedAt() time.Time

func (*EventType) GetID ¶ added in v0.13.0

func (e *EventType) GetID() string

func (*EventType) GetLabel ¶ added in v0.13.0

func (e *EventType) GetLabel() string

func (*EventType) GetLabelPropertySelector ¶ added in v0.13.0

func (e *EventType) GetLabelPropertySelector() *string

func (*EventType) GetModifiedAt ¶ added in v0.13.0

func (e *EventType) GetModifiedAt() *time.Time

func (*EventType) GetName ¶ added in v0.13.0

func (e *EventType) GetName() string

func (*EventType) GetOrganizationID ¶ added in v0.13.0

func (e *EventType) GetOrganizationID() string

func (EventType) MarshalJSON ¶ added in v0.13.0

func (e EventType) MarshalJSON() ([]byte, error)

func (*EventType) UnmarshalJSON ¶ added in v0.13.0

func (e *EventType) UnmarshalJSON(data []byte) error

type EventTypeUpdate ¶ added in v0.13.0

type EventTypeUpdate struct {
	// The label for the event type.
	Label string `json:"label"`
	// Property path to extract dynamic label from event metadata (e.g., 'subject' or 'metadata.subject').
	LabelPropertySelector *string `json:"label_property_selector,omitempty"`
}

func (*EventTypeUpdate) GetLabel ¶ added in v0.13.0

func (e *EventTypeUpdate) GetLabel() string

func (*EventTypeUpdate) GetLabelPropertySelector ¶ added in v0.13.0

func (e *EventTypeUpdate) GetLabelPropertySelector() *string

type EventTypeWithStats ¶ added in v0.13.0

type EventTypeWithStats struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The name of the event type.
	Name string `json:"name"`
	// The label for the event type.
	Label string `json:"label"`
	// Property path to extract dynamic label from event metadata.
	LabelPropertySelector *string `json:"label_property_selector,omitempty"`
	// The ID of the organization owning the event type.
	OrganizationID string      `json:"organization_id"`
	Source         EventSource `json:"source"`
	// Number of times the event has occurred.
	Occurrences int64 `json:"occurrences"`
	// The first time the event occurred.
	FirstSeen time.Time `json:"first_seen"`
	// The last time the event occurred.
	LastSeen time.Time `json:"last_seen"`
}

func (*EventTypeWithStats) GetCreatedAt ¶ added in v0.13.0

func (e *EventTypeWithStats) GetCreatedAt() time.Time

func (*EventTypeWithStats) GetFirstSeen ¶ added in v0.13.0

func (e *EventTypeWithStats) GetFirstSeen() time.Time

func (*EventTypeWithStats) GetID ¶ added in v0.13.0

func (e *EventTypeWithStats) GetID() string

func (*EventTypeWithStats) GetLabel ¶ added in v0.13.0

func (e *EventTypeWithStats) GetLabel() string

func (*EventTypeWithStats) GetLabelPropertySelector ¶ added in v0.13.0

func (e *EventTypeWithStats) GetLabelPropertySelector() *string

func (*EventTypeWithStats) GetLastSeen ¶ added in v0.13.0

func (e *EventTypeWithStats) GetLastSeen() time.Time

func (*EventTypeWithStats) GetModifiedAt ¶ added in v0.13.0

func (e *EventTypeWithStats) GetModifiedAt() *time.Time

func (*EventTypeWithStats) GetName ¶ added in v0.13.0

func (e *EventTypeWithStats) GetName() string

func (*EventTypeWithStats) GetOccurrences ¶ added in v0.13.0

func (e *EventTypeWithStats) GetOccurrences() int64

func (*EventTypeWithStats) GetOrganizationID ¶ added in v0.13.0

func (e *EventTypeWithStats) GetOrganizationID() string

func (*EventTypeWithStats) GetSource ¶ added in v0.13.0

func (e *EventTypeWithStats) GetSource() EventSource

func (EventTypeWithStats) MarshalJSON ¶ added in v0.13.0

func (e EventTypeWithStats) MarshalJSON() ([]byte, error)

func (*EventTypeWithStats) UnmarshalJSON ¶ added in v0.13.0

func (e *EventTypeWithStats) UnmarshalJSON(data []byte) error

type EventTypesSortProperty ¶ added in v0.13.0

type EventTypesSortProperty string
const (
	EventTypesSortPropertyName             EventTypesSortProperty = "name"
	EventTypesSortPropertyMinusName        EventTypesSortProperty = "-name"
	EventTypesSortPropertyLabel            EventTypesSortProperty = "label"
	EventTypesSortPropertyMinusLabel       EventTypesSortProperty = "-label"
	EventTypesSortPropertyOccurrences      EventTypesSortProperty = "occurrences"
	EventTypesSortPropertyMinusOccurrences EventTypesSortProperty = "-occurrences"
	EventTypesSortPropertyFirstSeen        EventTypesSortProperty = "first_seen"
	EventTypesSortPropertyMinusFirstSeen   EventTypesSortProperty = "-first_seen"
	EventTypesSortPropertyLastSeen         EventTypesSortProperty = "last_seen"
	EventTypesSortPropertyMinusLastSeen    EventTypesSortProperty = "-last_seen"
)

func (EventTypesSortProperty) ToPointer ¶ added in v0.13.0

func (*EventTypesSortProperty) UnmarshalJSON ¶ added in v0.13.0

func (e *EventTypesSortProperty) UnmarshalJSON(data []byte) error

type EventUnionType ¶ added in v0.13.0

type EventUnionType string
const (
	EventUnionTypeSystemEvent EventUnionType = "SystemEvent"
	EventUnionTypeUserEvent   EventUnionType = "UserEvent"
)

type Events ¶ added in v0.1.8

type Events struct {
	EventCreateCustomer         *EventCreateCustomer         `queryParam:"inline" union:"member"`
	EventCreateExternalCustomer *EventCreateExternalCustomer `queryParam:"inline" union:"member"`

	Type EventsType
}

func CreateEventsEventCreateCustomer ¶ added in v0.1.8

func CreateEventsEventCreateCustomer(eventCreateCustomer EventCreateCustomer) Events

func CreateEventsEventCreateExternalCustomer ¶ added in v0.1.8

func CreateEventsEventCreateExternalCustomer(eventCreateExternalCustomer EventCreateExternalCustomer) Events

func (Events) MarshalJSON ¶ added in v0.1.8

func (u Events) MarshalJSON() ([]byte, error)

func (*Events) UnmarshalJSON ¶ added in v0.1.8

func (u *Events) UnmarshalJSON(data []byte) error

type EventsIngest ¶ added in v0.1.8

type EventsIngest struct {
	// List of events to ingest.
	Events []Events `json:"events"`
}

func (*EventsIngest) GetEvents ¶ added in v0.1.8

func (e *EventsIngest) GetEvents() []Events

type EventsIngestResponse ¶ added in v0.1.8

type EventsIngestResponse struct {
	// Number of events inserted.
	Inserted int64 `json:"inserted"`
	// Number of duplicate events skipped.
	Duplicates *int64 `default:"0" json:"duplicates"`
}

func (*EventsIngestResponse) GetDuplicates ¶ added in v0.12.0

func (e *EventsIngestResponse) GetDuplicates() *int64

func (*EventsIngestResponse) GetInserted ¶ added in v0.1.8

func (e *EventsIngestResponse) GetInserted() int64

func (EventsIngestResponse) MarshalJSON ¶ added in v0.12.0

func (e EventsIngestResponse) MarshalJSON() ([]byte, error)

func (*EventsIngestResponse) UnmarshalJSON ¶ added in v0.12.0

func (e *EventsIngestResponse) UnmarshalJSON(data []byte) error

type EventsType ¶ added in v0.1.8

type EventsType string
const (
	EventsTypeEventCreateCustomer         EventsType = "EventCreateCustomer"
	EventsTypeEventCreateExternalCustomer EventsType = "EventCreateExternalCustomer"
)

type ExistingProductPrice ¶

type ExistingProductPrice struct {
	ID string `json:"id"`
}

ExistingProductPrice - A price that already exists for this product.

Useful when updating a product if you want to keep an existing price.

func (*ExistingProductPrice) GetID ¶

func (e *ExistingProductPrice) GetID() string

func (ExistingProductPrice) MarshalJSON ¶ added in v0.8.4

func (e ExistingProductPrice) MarshalJSON() ([]byte, error)

func (*ExistingProductPrice) UnmarshalJSON ¶ added in v0.8.4

func (e *ExistingProductPrice) UnmarshalJSON(data []byte) error

type FileCreate ¶

type FileCreate struct {
	DownloadableFileCreate       *DownloadableFileCreate       `queryParam:"inline" union:"member"`
	ProductMediaFileCreate       *ProductMediaFileCreate       `queryParam:"inline" union:"member"`
	OrganizationAvatarFileCreate *OrganizationAvatarFileCreate `queryParam:"inline" union:"member"`

	Type FileCreateType
}

func CreateFileCreateDownloadable ¶

func CreateFileCreateDownloadable(downloadable DownloadableFileCreate) FileCreate

func CreateFileCreateOrganizationAvatar ¶

func CreateFileCreateOrganizationAvatar(organizationAvatar OrganizationAvatarFileCreate) FileCreate

func CreateFileCreateProductMedia ¶

func CreateFileCreateProductMedia(productMedia ProductMediaFileCreate) FileCreate

func (FileCreate) MarshalJSON ¶

func (u FileCreate) MarshalJSON() ([]byte, error)

func (*FileCreate) UnmarshalJSON ¶

func (u *FileCreate) UnmarshalJSON(data []byte) error

type FileCreateType ¶

type FileCreateType string
const (
	FileCreateTypeDownloadable       FileCreateType = "downloadable"
	FileCreateTypeOrganizationAvatar FileCreateType = "organization_avatar"
	FileCreateTypeProductMedia       FileCreateType = "product_media"
)

type FileDownload ¶

type FileDownload struct {
	// The ID of the object.
	ID                   string           `json:"id"`
	OrganizationID       string           `json:"organization_id"`
	Name                 string           `json:"name"`
	Path                 string           `json:"path"`
	MimeType             string           `json:"mime_type"`
	Size                 int64            `json:"size"`
	StorageVersion       *string          `json:"storage_version"`
	ChecksumEtag         *string          `json:"checksum_etag"`
	ChecksumSha256Base64 *string          `json:"checksum_sha256_base64"`
	ChecksumSha256Hex    *string          `json:"checksum_sha256_hex"`
	LastModifiedAt       *time.Time       `json:"last_modified_at"`
	Download             S3DownloadURL    `json:"download"`
	Version              *string          `json:"version"`
	IsUploaded           bool             `json:"is_uploaded"`
	Service              FileServiceTypes `json:"service"`
	SizeReadable         string           `json:"size_readable"`
}

func (*FileDownload) GetChecksumEtag ¶

func (f *FileDownload) GetChecksumEtag() *string

func (*FileDownload) GetChecksumSha256Base64 ¶

func (f *FileDownload) GetChecksumSha256Base64() *string

func (*FileDownload) GetChecksumSha256Hex ¶

func (f *FileDownload) GetChecksumSha256Hex() *string

func (*FileDownload) GetDownload ¶

func (f *FileDownload) GetDownload() S3DownloadURL

func (*FileDownload) GetID ¶

func (f *FileDownload) GetID() string

func (*FileDownload) GetIsUploaded ¶

func (f *FileDownload) GetIsUploaded() bool

func (*FileDownload) GetLastModifiedAt ¶

func (f *FileDownload) GetLastModifiedAt() *time.Time

func (*FileDownload) GetMimeType ¶

func (f *FileDownload) GetMimeType() string

func (*FileDownload) GetName ¶

func (f *FileDownload) GetName() string

func (*FileDownload) GetOrganizationID ¶

func (f *FileDownload) GetOrganizationID() string

func (*FileDownload) GetPath ¶

func (f *FileDownload) GetPath() string

func (*FileDownload) GetService ¶

func (f *FileDownload) GetService() FileServiceTypes

func (*FileDownload) GetSize ¶

func (f *FileDownload) GetSize() int64

func (*FileDownload) GetSizeReadable ¶

func (f *FileDownload) GetSizeReadable() string

func (*FileDownload) GetStorageVersion ¶

func (f *FileDownload) GetStorageVersion() *string

func (*FileDownload) GetVersion ¶

func (f *FileDownload) GetVersion() *string

func (FileDownload) MarshalJSON ¶

func (f FileDownload) MarshalJSON() ([]byte, error)

func (*FileDownload) UnmarshalJSON ¶

func (f *FileDownload) UnmarshalJSON(data []byte) error

type FilePatch ¶

type FilePatch struct {
	Name    *string `json:"name,omitempty"`
	Version *string `json:"version,omitempty"`
}

func (*FilePatch) GetName ¶

func (f *FilePatch) GetName() *string

func (*FilePatch) GetVersion ¶

func (f *FilePatch) GetVersion() *string

type FileRead ¶

type FileRead struct {
	DownloadableFileRead       *DownloadableFileRead       `queryParam:"inline" union:"member"`
	ProductMediaFileRead       *ProductMediaFileRead       `queryParam:"inline" union:"member"`
	OrganizationAvatarFileRead *OrganizationAvatarFileRead `queryParam:"inline" union:"member"`

	Type FileReadType
}

func CreateFileReadDownloadable ¶

func CreateFileReadDownloadable(downloadable DownloadableFileRead) FileRead

func CreateFileReadOrganizationAvatar ¶

func CreateFileReadOrganizationAvatar(organizationAvatar OrganizationAvatarFileRead) FileRead

func CreateFileReadProductMedia ¶

func CreateFileReadProductMedia(productMedia ProductMediaFileRead) FileRead

func (FileRead) MarshalJSON ¶

func (u FileRead) MarshalJSON() ([]byte, error)

func (*FileRead) UnmarshalJSON ¶

func (u *FileRead) UnmarshalJSON(data []byte) error

type FileReadType ¶

type FileReadType string
const (
	FileReadTypeDownloadable       FileReadType = "downloadable"
	FileReadTypeOrganizationAvatar FileReadType = "organization_avatar"
	FileReadTypeProductMedia       FileReadType = "product_media"
)

type FileServiceTypes ¶

type FileServiceTypes string
const (
	FileServiceTypesDownloadable       FileServiceTypes = "downloadable"
	FileServiceTypesProductMedia       FileServiceTypes = "product_media"
	FileServiceTypesOrganizationAvatar FileServiceTypes = "organization_avatar"
)

func (FileServiceTypes) ToPointer ¶

func (e FileServiceTypes) ToPointer() *FileServiceTypes

func (*FileServiceTypes) UnmarshalJSON ¶

func (e *FileServiceTypes) UnmarshalJSON(data []byte) error

type FileUpload ¶

type FileUpload struct {
	// The ID of the object.
	ID                   string                `json:"id"`
	OrganizationID       string                `json:"organization_id"`
	Name                 string                `json:"name"`
	Path                 string                `json:"path"`
	MimeType             string                `json:"mime_type"`
	Size                 int64                 `json:"size"`
	StorageVersion       *string               `json:"storage_version"`
	ChecksumEtag         *string               `json:"checksum_etag"`
	ChecksumSha256Base64 *string               `json:"checksum_sha256_base64"`
	ChecksumSha256Hex    *string               `json:"checksum_sha256_hex"`
	LastModifiedAt       *time.Time            `json:"last_modified_at"`
	Upload               S3FileUploadMultipart `json:"upload"`
	Version              *string               `json:"version"`
	IsUploaded           *bool                 `default:"false" json:"is_uploaded"`
	Service              FileServiceTypes      `json:"service"`
	SizeReadable         string                `json:"size_readable"`
}

func (*FileUpload) GetChecksumEtag ¶

func (f *FileUpload) GetChecksumEtag() *string

func (*FileUpload) GetChecksumSha256Base64 ¶

func (f *FileUpload) GetChecksumSha256Base64() *string

func (*FileUpload) GetChecksumSha256Hex ¶

func (f *FileUpload) GetChecksumSha256Hex() *string

func (*FileUpload) GetID ¶

func (f *FileUpload) GetID() string

func (*FileUpload) GetIsUploaded ¶

func (f *FileUpload) GetIsUploaded() *bool

func (*FileUpload) GetLastModifiedAt ¶

func (f *FileUpload) GetLastModifiedAt() *time.Time

func (*FileUpload) GetMimeType ¶

func (f *FileUpload) GetMimeType() string

func (*FileUpload) GetName ¶

func (f *FileUpload) GetName() string

func (*FileUpload) GetOrganizationID ¶

func (f *FileUpload) GetOrganizationID() string

func (*FileUpload) GetPath ¶

func (f *FileUpload) GetPath() string

func (*FileUpload) GetService ¶

func (f *FileUpload) GetService() FileServiceTypes

func (*FileUpload) GetSize ¶

func (f *FileUpload) GetSize() int64

func (*FileUpload) GetSizeReadable ¶

func (f *FileUpload) GetSizeReadable() string

func (*FileUpload) GetStorageVersion ¶

func (f *FileUpload) GetStorageVersion() *string

func (*FileUpload) GetUpload ¶

func (f *FileUpload) GetUpload() S3FileUploadMultipart

func (*FileUpload) GetVersion ¶

func (f *FileUpload) GetVersion() *string

func (FileUpload) MarshalJSON ¶

func (f FileUpload) MarshalJSON() ([]byte, error)

func (*FileUpload) UnmarshalJSON ¶

func (f *FileUpload) UnmarshalJSON(data []byte) error

type FileUploadCompleted ¶

type FileUploadCompleted struct {
	ID    string                      `json:"id"`
	Path  string                      `json:"path"`
	Parts []S3FileUploadCompletedPart `json:"parts"`
}

func (*FileUploadCompleted) GetID ¶

func (f *FileUploadCompleted) GetID() string

func (*FileUploadCompleted) GetParts ¶

func (*FileUploadCompleted) GetPath ¶

func (f *FileUploadCompleted) GetPath() string

type Filter ¶ added in v0.1.8

type Filter struct {
	Conjunction FilterConjunction `json:"conjunction"`
	Clauses     []Clauses         `json:"clauses"`
}

func (*Filter) GetClauses ¶ added in v0.1.8

func (f *Filter) GetClauses() []Clauses

func (*Filter) GetConjunction ¶ added in v0.1.8

func (f *Filter) GetConjunction() FilterConjunction

type FilterClause ¶ added in v0.1.8

type FilterClause struct {
	Property string         `json:"property"`
	Operator FilterOperator `json:"operator"`
	Value    Value          `json:"value"`
}

func (*FilterClause) GetOperator ¶ added in v0.1.8

func (f *FilterClause) GetOperator() FilterOperator

func (*FilterClause) GetProperty ¶ added in v0.1.8

func (f *FilterClause) GetProperty() string

func (*FilterClause) GetValue ¶ added in v0.1.8

func (f *FilterClause) GetValue() Value

func (FilterClause) MarshalJSON ¶ added in v0.8.4

func (f FilterClause) MarshalJSON() ([]byte, error)

func (*FilterClause) UnmarshalJSON ¶ added in v0.8.4

func (f *FilterClause) UnmarshalJSON(data []byte) error

type FilterConjunction ¶ added in v0.1.8

type FilterConjunction string
const (
	FilterConjunctionAnd FilterConjunction = "and"
	FilterConjunctionOr  FilterConjunction = "or"
)

func (FilterConjunction) ToPointer ¶ added in v0.1.8

func (e FilterConjunction) ToPointer() *FilterConjunction

func (*FilterConjunction) UnmarshalJSON ¶ added in v0.1.8

func (e *FilterConjunction) UnmarshalJSON(data []byte) error

type FilterOperator ¶ added in v0.1.8

type FilterOperator string
const (
	FilterOperatorEq      FilterOperator = "eq"
	FilterOperatorNe      FilterOperator = "ne"
	FilterOperatorGt      FilterOperator = "gt"
	FilterOperatorGte     FilterOperator = "gte"
	FilterOperatorLt      FilterOperator = "lt"
	FilterOperatorLte     FilterOperator = "lte"
	FilterOperatorLike    FilterOperator = "like"
	FilterOperatorNotLike FilterOperator = "not_like"
)

func (FilterOperator) ToPointer ¶ added in v0.1.8

func (e FilterOperator) ToPointer() *FilterOperator

func (*FilterOperator) UnmarshalJSON ¶ added in v0.1.8

func (e *FilterOperator) UnmarshalJSON(data []byte) error

type Func ¶ added in v0.1.8

type Func string
const (
	FuncSum Func = "sum"
	FuncMax Func = "max"
	FuncMin Func = "min"
	FuncAvg Func = "avg"
)

func (Func) ToPointer ¶ added in v0.1.8

func (e Func) ToPointer() *Func

func (*Func) UnmarshalJSON ¶ added in v0.1.8

func (e *Func) UnmarshalJSON(data []byte) error

type GenericPayment ¶ added in v0.4.17

type GenericPayment struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID        string           `json:"id"`
	Processor PaymentProcessor `json:"processor"`
	Status    PaymentStatus    `json:"status"`
	// The payment amount in cents.
	Amount int64 `json:"amount"`
	// The payment currency. Currently, only `usd` is supported.
	Currency string `json:"currency"`
	// The payment method used.
	Method string `json:"method"`
	// Error code, if the payment was declined.
	DeclineReason *string `json:"decline_reason"`
	// Human-readable error message, if the payment was declined.
	DeclineMessage *string `json:"decline_message"`
	// The ID of the organization that owns the payment.
	OrganizationID string `json:"organization_id"`
	// The ID of the checkout session associated with this payment.
	CheckoutID *string `json:"checkout_id"`
	// The ID of the order associated with this payment.
	OrderID *string `json:"order_id"`
	// Additional metadata from the payment processor for internal use.
	ProcessorMetadata map[string]any `json:"processor_metadata,omitempty"`
}

GenericPayment - Schema of a payment with a generic payment method.

func (*GenericPayment) GetAmount ¶ added in v0.4.17

func (g *GenericPayment) GetAmount() int64

func (*GenericPayment) GetCheckoutID ¶ added in v0.4.17

func (g *GenericPayment) GetCheckoutID() *string

func (*GenericPayment) GetCreatedAt ¶ added in v0.4.17

func (g *GenericPayment) GetCreatedAt() time.Time

func (*GenericPayment) GetCurrency ¶ added in v0.4.17

func (g *GenericPayment) GetCurrency() string

func (*GenericPayment) GetDeclineMessage ¶ added in v0.4.17

func (g *GenericPayment) GetDeclineMessage() *string

func (*GenericPayment) GetDeclineReason ¶ added in v0.4.17

func (g *GenericPayment) GetDeclineReason() *string

func (*GenericPayment) GetID ¶ added in v0.4.17

func (g *GenericPayment) GetID() string

func (*GenericPayment) GetMethod ¶ added in v0.4.17

func (g *GenericPayment) GetMethod() string

func (*GenericPayment) GetModifiedAt ¶ added in v0.4.17

func (g *GenericPayment) GetModifiedAt() *time.Time

func (*GenericPayment) GetOrderID ¶ added in v0.4.17

func (g *GenericPayment) GetOrderID() *string

func (*GenericPayment) GetOrganizationID ¶ added in v0.4.17

func (g *GenericPayment) GetOrganizationID() string

func (*GenericPayment) GetProcessor ¶ added in v0.4.17

func (g *GenericPayment) GetProcessor() PaymentProcessor

func (*GenericPayment) GetProcessorMetadata ¶ added in v0.8.1

func (g *GenericPayment) GetProcessorMetadata() map[string]any

func (*GenericPayment) GetStatus ¶ added in v0.4.17

func (g *GenericPayment) GetStatus() PaymentStatus

func (GenericPayment) MarshalJSON ¶ added in v0.4.17

func (g GenericPayment) MarshalJSON() ([]byte, error)

func (*GenericPayment) UnmarshalJSON ¶ added in v0.4.17

func (g *GenericPayment) UnmarshalJSON(data []byte) error

type GrantTypes ¶

type GrantTypes string
const (
	GrantTypesAuthorizationCode GrantTypes = "authorization_code"
	GrantTypesRefreshToken      GrantTypes = "refresh_token"
)

func (GrantTypes) ToPointer ¶

func (e GrantTypes) ToPointer() *GrantTypes

func (*GrantTypes) UnmarshalJSON ¶

func (e *GrantTypes) UnmarshalJSON(data []byte) error

type GrossMargin ¶ added in v0.12.0

type GrossMargin struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type GrossMarginType
}

func CreateGrossMarginInteger ¶ added in v0.12.0

func CreateGrossMarginInteger(integer int64) GrossMargin

func CreateGrossMarginNumber ¶ added in v0.12.0

func CreateGrossMarginNumber(number float64) GrossMargin

func (GrossMargin) MarshalJSON ¶ added in v0.12.0

func (u GrossMargin) MarshalJSON() ([]byte, error)

func (*GrossMargin) UnmarshalJSON ¶ added in v0.12.0

func (u *GrossMargin) UnmarshalJSON(data []byte) error

type GrossMarginPercentage ¶ added in v0.12.0

type GrossMarginPercentage struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type GrossMarginPercentageType
}

func CreateGrossMarginPercentageInteger ¶ added in v0.12.0

func CreateGrossMarginPercentageInteger(integer int64) GrossMarginPercentage

func CreateGrossMarginPercentageNumber ¶ added in v0.12.0

func CreateGrossMarginPercentageNumber(number float64) GrossMarginPercentage

func (GrossMarginPercentage) MarshalJSON ¶ added in v0.12.0

func (u GrossMarginPercentage) MarshalJSON() ([]byte, error)

func (*GrossMarginPercentage) UnmarshalJSON ¶ added in v0.12.0

func (u *GrossMarginPercentage) UnmarshalJSON(data []byte) error

type GrossMarginPercentageType ¶ added in v0.12.0

type GrossMarginPercentageType string
const (
	GrossMarginPercentageTypeInteger GrossMarginPercentageType = "integer"
	GrossMarginPercentageTypeNumber  GrossMarginPercentageType = "number"
)

type GrossMarginType ¶ added in v0.12.0

type GrossMarginType string
const (
	GrossMarginTypeInteger GrossMarginType = "integer"
	GrossMarginTypeNumber  GrossMarginType = "number"
)

type HTTPMetadata ¶

type HTTPMetadata struct {
	// Raw HTTP response; suitable for custom response parsing
	Response *http.Response `json:"-"`
	// Raw HTTP request; suitable for debugging
	Request *http.Request `json:"-"`
}

func (*HTTPMetadata) GetRequest ¶

func (h *HTTPMetadata) GetRequest() *http.Request

func (*HTTPMetadata) GetResponse ¶

func (h *HTTPMetadata) GetResponse() *http.Response

type IntrospectTokenRequest ¶ added in v0.3.0

type IntrospectTokenRequest struct {
	Token         string                               `form:"name=token"`
	TokenTypeHint *IntrospectTokenRequestTokenTypeHint `form:"name=token_type_hint"`
	ClientID      string                               `form:"name=client_id"`
	ClientSecret  string                               `form:"name=client_secret"`
}

func (*IntrospectTokenRequest) GetClientID ¶ added in v0.3.0

func (i *IntrospectTokenRequest) GetClientID() string

func (*IntrospectTokenRequest) GetClientSecret ¶ added in v0.3.0

func (i *IntrospectTokenRequest) GetClientSecret() string

func (*IntrospectTokenRequest) GetToken ¶ added in v0.3.0

func (i *IntrospectTokenRequest) GetToken() string

func (*IntrospectTokenRequest) GetTokenTypeHint ¶ added in v0.3.0

type IntrospectTokenRequestTokenTypeHint ¶ added in v0.3.0

type IntrospectTokenRequestTokenTypeHint string
const (
	IntrospectTokenRequestTokenTypeHintAccessToken  IntrospectTokenRequestTokenTypeHint = "access_token"
	IntrospectTokenRequestTokenTypeHintRefreshToken IntrospectTokenRequestTokenTypeHint = "refresh_token"
)

func (IntrospectTokenRequestTokenTypeHint) ToPointer ¶ added in v0.3.0

func (*IntrospectTokenRequestTokenTypeHint) UnmarshalJSON ¶ added in v0.3.0

func (e *IntrospectTokenRequestTokenTypeHint) UnmarshalJSON(data []byte) error

type IntrospectTokenResponse ¶

type IntrospectTokenResponse struct {
	Active    bool      `json:"active"`
	ClientID  string    `json:"client_id"`
	TokenType TokenType `json:"token_type"`
	Scope     string    `json:"scope"`
	SubType   SubType   `json:"sub_type"`
	Sub       string    `json:"sub"`
	Aud       string    `json:"aud"`
	Iss       string    `json:"iss"`
	Exp       int64     `json:"exp"`
	Iat       int64     `json:"iat"`
}

func (*IntrospectTokenResponse) GetActive ¶

func (i *IntrospectTokenResponse) GetActive() bool

func (*IntrospectTokenResponse) GetAud ¶

func (i *IntrospectTokenResponse) GetAud() string

func (*IntrospectTokenResponse) GetClientID ¶

func (i *IntrospectTokenResponse) GetClientID() string

func (*IntrospectTokenResponse) GetExp ¶

func (i *IntrospectTokenResponse) GetExp() int64

func (*IntrospectTokenResponse) GetIat ¶

func (i *IntrospectTokenResponse) GetIat() int64

func (*IntrospectTokenResponse) GetIss ¶

func (i *IntrospectTokenResponse) GetIss() string

func (*IntrospectTokenResponse) GetScope ¶

func (i *IntrospectTokenResponse) GetScope() string

func (*IntrospectTokenResponse) GetSub ¶

func (i *IntrospectTokenResponse) GetSub() string

func (*IntrospectTokenResponse) GetSubType ¶

func (i *IntrospectTokenResponse) GetSubType() SubType

func (*IntrospectTokenResponse) GetTokenType ¶

func (i *IntrospectTokenResponse) GetTokenType() TokenType

type LLMMetadata ¶ added in v0.12.0

type LLMMetadata struct {
	// The vendor of the event.
	Vendor string `json:"vendor"`
	// The model used for the event.
	Model string `json:"model"`
	// The LLM prompt used for the event.
	Prompt *string `json:"prompt,omitempty"`
	// The LLM response used for the event.
	Response *string `json:"response,omitempty"`
	// The number of LLM input tokens used for the event.
	InputTokens int64 `json:"input_tokens"`
	// The number of LLM cached tokens that were used for the event.
	CachedInputTokens *int64 `json:"cached_input_tokens,omitempty"`
	// The number of LLM output tokens used for the event.
	OutputTokens int64 `json:"output_tokens"`
	// The total number of LLM tokens used for the event.
	TotalTokens int64 `json:"total_tokens"`
}

func (*LLMMetadata) GetCachedInputTokens ¶ added in v0.12.0

func (l *LLMMetadata) GetCachedInputTokens() *int64

func (*LLMMetadata) GetInputTokens ¶ added in v0.12.0

func (l *LLMMetadata) GetInputTokens() int64

func (*LLMMetadata) GetModel ¶ added in v0.12.0

func (l *LLMMetadata) GetModel() string

func (*LLMMetadata) GetOutputTokens ¶ added in v0.12.0

func (l *LLMMetadata) GetOutputTokens() int64

func (*LLMMetadata) GetPrompt ¶ added in v0.12.0

func (l *LLMMetadata) GetPrompt() *string

func (*LLMMetadata) GetResponse ¶ added in v0.12.0

func (l *LLMMetadata) GetResponse() *string

func (*LLMMetadata) GetTotalTokens ¶ added in v0.12.0

func (l *LLMMetadata) GetTotalTokens() int64

func (*LLMMetadata) GetVendor ¶ added in v0.12.0

func (l *LLMMetadata) GetVendor() string

func (LLMMetadata) MarshalJSON ¶ added in v0.12.0

func (l LLMMetadata) MarshalJSON() ([]byte, error)

func (*LLMMetadata) UnmarshalJSON ¶ added in v0.12.0

func (l *LLMMetadata) UnmarshalJSON(data []byte) error

type LegacyRecurringProductPrice ¶ added in v0.3.0

type LegacyRecurringProductPrice struct {
	LegacyRecurringProductPriceFixed  *LegacyRecurringProductPriceFixed  `queryParam:"inline" union:"member"`
	LegacyRecurringProductPriceCustom *LegacyRecurringProductPriceCustom `queryParam:"inline" union:"member"`
	LegacyRecurringProductPriceFree   *LegacyRecurringProductPriceFree   `queryParam:"inline" union:"member"`

	Type LegacyRecurringProductPriceType
}

func CreateLegacyRecurringProductPriceCustom ¶ added in v0.3.0

func CreateLegacyRecurringProductPriceCustom(custom LegacyRecurringProductPriceCustom) LegacyRecurringProductPrice

func CreateLegacyRecurringProductPriceFixed ¶ added in v0.3.0

func CreateLegacyRecurringProductPriceFixed(fixed LegacyRecurringProductPriceFixed) LegacyRecurringProductPrice

func CreateLegacyRecurringProductPriceFree ¶ added in v0.3.0

func CreateLegacyRecurringProductPriceFree(free LegacyRecurringProductPriceFree) LegacyRecurringProductPrice

func (LegacyRecurringProductPrice) MarshalJSON ¶ added in v0.3.0

func (u LegacyRecurringProductPrice) MarshalJSON() ([]byte, error)

func (*LegacyRecurringProductPrice) UnmarshalJSON ¶ added in v0.3.0

func (u *LegacyRecurringProductPrice) UnmarshalJSON(data []byte) error

type LegacyRecurringProductPriceCustom ¶ added in v0.3.0

type LegacyRecurringProductPriceCustom struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the price.
	ID     string             `json:"id"`
	Source ProductPriceSource `json:"source"`

	// The currency in which the customer will be charged.
	PriceCurrency string `json:"price_currency"`
	// The tax behavior of the price. If null, it defaults to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior"`
	// Whether the price is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the product owning the price.
	ProductID string `json:"product_id"`

	RecurringInterval SubscriptionRecurringInterval `json:"recurring_interval"`
	// The minimum amount the customer can pay. If 0, the price is 'free or pay what you want'. Defaults to 50 cents.
	MinimumAmount int64 `json:"minimum_amount"`
	// The maximum amount the customer can pay.
	MaximumAmount *int64 `json:"maximum_amount"`
	// The initial amount shown to the customer.
	PresetAmount *int64 `json:"preset_amount"`
	// contains filtered or unexported fields
}

LegacyRecurringProductPriceCustom - A pay-what-you-want recurring price for a product, i.e. a subscription.

**Deprecated**: The recurring interval should be set on the product itself.

func (*LegacyRecurringProductPriceCustom) GetAmountType ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceCustom) GetAmountType() string

func (*LegacyRecurringProductPriceCustom) GetCreatedAt ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceCustom) GetCreatedAt() time.Time

func (*LegacyRecurringProductPriceCustom) GetID ¶ added in v0.3.0

func (*LegacyRecurringProductPriceCustom) GetIsArchived ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceCustom) GetIsArchived() bool

func (*LegacyRecurringProductPriceCustom) GetLegacy ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceCustom) GetLegacy() bool

func (*LegacyRecurringProductPriceCustom) GetMaximumAmount ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceCustom) GetMaximumAmount() *int64

func (*LegacyRecurringProductPriceCustom) GetMinimumAmount ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceCustom) GetMinimumAmount() int64

func (*LegacyRecurringProductPriceCustom) GetModifiedAt ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceCustom) GetModifiedAt() *time.Time

func (*LegacyRecurringProductPriceCustom) GetPresetAmount ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceCustom) GetPresetAmount() *int64

func (*LegacyRecurringProductPriceCustom) GetPriceCurrency ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceCustom) GetPriceCurrency() string

func (*LegacyRecurringProductPriceCustom) GetProductID ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceCustom) GetProductID() string

func (*LegacyRecurringProductPriceCustom) GetRecurringInterval ¶ added in v0.3.0

func (*LegacyRecurringProductPriceCustom) GetSource ¶ added in v0.13.0

func (*LegacyRecurringProductPriceCustom) GetTaxBehavior ¶ added in v0.15.1

func (*LegacyRecurringProductPriceCustom) GetType ¶ added in v0.3.0

func (LegacyRecurringProductPriceCustom) MarshalJSON ¶ added in v0.3.0

func (l LegacyRecurringProductPriceCustom) MarshalJSON() ([]byte, error)

func (*LegacyRecurringProductPriceCustom) UnmarshalJSON ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceCustom) UnmarshalJSON(data []byte) error

type LegacyRecurringProductPriceFixed ¶ added in v0.3.0

type LegacyRecurringProductPriceFixed struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the price.
	ID     string             `json:"id"`
	Source ProductPriceSource `json:"source"`

	// The currency in which the customer will be charged.
	PriceCurrency string `json:"price_currency"`
	// The tax behavior of the price. If null, it defaults to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior"`
	// Whether the price is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the product owning the price.
	ProductID string `json:"product_id"`

	RecurringInterval SubscriptionRecurringInterval `json:"recurring_interval"`
	// The price in cents.
	PriceAmount int64 `json:"price_amount"`
	// contains filtered or unexported fields
}

LegacyRecurringProductPriceFixed - A recurring price for a product, i.e. a subscription.

**Deprecated**: The recurring interval should be set on the product itself.

func (*LegacyRecurringProductPriceFixed) GetAmountType ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFixed) GetAmountType() string

func (*LegacyRecurringProductPriceFixed) GetCreatedAt ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFixed) GetCreatedAt() time.Time

func (*LegacyRecurringProductPriceFixed) GetID ¶ added in v0.3.0

func (*LegacyRecurringProductPriceFixed) GetIsArchived ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFixed) GetIsArchived() bool

func (*LegacyRecurringProductPriceFixed) GetLegacy ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFixed) GetLegacy() bool

func (*LegacyRecurringProductPriceFixed) GetModifiedAt ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFixed) GetModifiedAt() *time.Time

func (*LegacyRecurringProductPriceFixed) GetPriceAmount ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFixed) GetPriceAmount() int64

func (*LegacyRecurringProductPriceFixed) GetPriceCurrency ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFixed) GetPriceCurrency() string

func (*LegacyRecurringProductPriceFixed) GetProductID ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFixed) GetProductID() string

func (*LegacyRecurringProductPriceFixed) GetRecurringInterval ¶ added in v0.3.0

func (*LegacyRecurringProductPriceFixed) GetSource ¶ added in v0.13.0

func (*LegacyRecurringProductPriceFixed) GetTaxBehavior ¶ added in v0.15.1

func (*LegacyRecurringProductPriceFixed) GetType ¶ added in v0.3.0

func (LegacyRecurringProductPriceFixed) MarshalJSON ¶ added in v0.3.0

func (l LegacyRecurringProductPriceFixed) MarshalJSON() ([]byte, error)

func (*LegacyRecurringProductPriceFixed) UnmarshalJSON ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFixed) UnmarshalJSON(data []byte) error

type LegacyRecurringProductPriceFree ¶ added in v0.3.0

type LegacyRecurringProductPriceFree struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the price.
	ID     string             `json:"id"`
	Source ProductPriceSource `json:"source"`

	// The currency in which the customer will be charged.
	PriceCurrency string `json:"price_currency"`
	// The tax behavior of the price. If null, it defaults to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior"`
	// Whether the price is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the product owning the price.
	ProductID string `json:"product_id"`

	RecurringInterval SubscriptionRecurringInterval `json:"recurring_interval"`
	// contains filtered or unexported fields
}

LegacyRecurringProductPriceFree - A free recurring price for a product, i.e. a subscription.

**Deprecated**: The recurring interval should be set on the product itself.

func (*LegacyRecurringProductPriceFree) GetAmountType ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFree) GetAmountType() string

func (*LegacyRecurringProductPriceFree) GetCreatedAt ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFree) GetCreatedAt() time.Time

func (*LegacyRecurringProductPriceFree) GetID ¶ added in v0.3.0

func (*LegacyRecurringProductPriceFree) GetIsArchived ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFree) GetIsArchived() bool

func (*LegacyRecurringProductPriceFree) GetLegacy ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFree) GetLegacy() bool

func (*LegacyRecurringProductPriceFree) GetModifiedAt ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFree) GetModifiedAt() *time.Time

func (*LegacyRecurringProductPriceFree) GetPriceCurrency ¶ added in v0.13.0

func (l *LegacyRecurringProductPriceFree) GetPriceCurrency() string

func (*LegacyRecurringProductPriceFree) GetProductID ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFree) GetProductID() string

func (*LegacyRecurringProductPriceFree) GetRecurringInterval ¶ added in v0.3.0

func (*LegacyRecurringProductPriceFree) GetSource ¶ added in v0.13.0

func (*LegacyRecurringProductPriceFree) GetTaxBehavior ¶ added in v0.15.1

func (*LegacyRecurringProductPriceFree) GetType ¶ added in v0.3.0

func (LegacyRecurringProductPriceFree) MarshalJSON ¶ added in v0.3.0

func (l LegacyRecurringProductPriceFree) MarshalJSON() ([]byte, error)

func (*LegacyRecurringProductPriceFree) UnmarshalJSON ¶ added in v0.3.0

func (l *LegacyRecurringProductPriceFree) UnmarshalJSON(data []byte) error

type LegacyRecurringProductPriceType ¶ added in v0.3.0

type LegacyRecurringProductPriceType string
const (
	LegacyRecurringProductPriceTypeCustom LegacyRecurringProductPriceType = "custom"
	LegacyRecurringProductPriceTypeFixed  LegacyRecurringProductPriceType = "fixed"
	LegacyRecurringProductPriceTypeFree   LegacyRecurringProductPriceType = "free"
)

type LegalEntity ¶ added in v0.15.1

type LegalEntity struct {
	OrganizationIndividualLegalEntitySchema *OrganizationIndividualLegalEntitySchema `queryParam:"inline" union:"member"`
	OrganizationCompanyLegalEntitySchema    *OrganizationCompanyLegalEntitySchema    `queryParam:"inline" union:"member"`

	Type LegalEntityType
}

func CreateLegalEntityCompany ¶ added in v0.15.1

func CreateLegalEntityCompany(company OrganizationCompanyLegalEntitySchema) LegalEntity

func CreateLegalEntityIndividual ¶ added in v0.15.1

func CreateLegalEntityIndividual(individual OrganizationIndividualLegalEntitySchema) LegalEntity

func (LegalEntity) MarshalJSON ¶ added in v0.15.1

func (u LegalEntity) MarshalJSON() ([]byte, error)

func (*LegalEntity) UnmarshalJSON ¶ added in v0.15.1

func (u *LegalEntity) UnmarshalJSON(data []byte) error

type LegalEntityType ¶ added in v0.15.1

type LegalEntityType string
const (
	LegalEntityTypeCompany    LegalEntityType = "company"
	LegalEntityTypeIndividual LegalEntityType = "individual"
)

type LicenseKeyActivate ¶

type LicenseKeyActivate struct {
	Key            string `json:"key"`
	OrganizationID string `json:"organization_id"`
	Label          string `json:"label"`
	// Key-value object allowing you to set conditions that must match when validating the license key.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Conditions map[string]LicenseKeyActivateConditions `json:"conditions,omitempty"`
	// Key-value object allowing you to store additional information about the activation
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Meta map[string]LicenseKeyActivateMeta `json:"meta,omitempty"`
}

func (*LicenseKeyActivate) GetConditions ¶

func (*LicenseKeyActivate) GetKey ¶

func (l *LicenseKeyActivate) GetKey() string

func (*LicenseKeyActivate) GetLabel ¶

func (l *LicenseKeyActivate) GetLabel() string

func (*LicenseKeyActivate) GetMeta ¶

func (*LicenseKeyActivate) GetOrganizationID ¶

func (l *LicenseKeyActivate) GetOrganizationID() string

type LicenseKeyActivateConditions ¶

type LicenseKeyActivateConditions struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type LicenseKeyActivateConditionsType
}

func CreateLicenseKeyActivateConditionsBoolean ¶ added in v0.4.15

func CreateLicenseKeyActivateConditionsBoolean(boolean bool) LicenseKeyActivateConditions

func CreateLicenseKeyActivateConditionsInteger ¶ added in v0.4.15

func CreateLicenseKeyActivateConditionsInteger(integer int64) LicenseKeyActivateConditions

func CreateLicenseKeyActivateConditionsNumber ¶ added in v0.4.15

func CreateLicenseKeyActivateConditionsNumber(number float64) LicenseKeyActivateConditions

func CreateLicenseKeyActivateConditionsStr ¶ added in v0.4.15

func CreateLicenseKeyActivateConditionsStr(str string) LicenseKeyActivateConditions

func (LicenseKeyActivateConditions) MarshalJSON ¶ added in v0.4.15

func (u LicenseKeyActivateConditions) MarshalJSON() ([]byte, error)

func (*LicenseKeyActivateConditions) UnmarshalJSON ¶ added in v0.4.15

func (u *LicenseKeyActivateConditions) UnmarshalJSON(data []byte) error

type LicenseKeyActivateConditionsType ¶ added in v0.4.15

type LicenseKeyActivateConditionsType string
const (
	LicenseKeyActivateConditionsTypeStr     LicenseKeyActivateConditionsType = "str"
	LicenseKeyActivateConditionsTypeInteger LicenseKeyActivateConditionsType = "integer"
	LicenseKeyActivateConditionsTypeNumber  LicenseKeyActivateConditionsType = "number"
	LicenseKeyActivateConditionsTypeBoolean LicenseKeyActivateConditionsType = "boolean"
)

type LicenseKeyActivateMeta ¶

type LicenseKeyActivateMeta struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type LicenseKeyActivateMetaType
}

func CreateLicenseKeyActivateMetaBoolean ¶ added in v0.4.15

func CreateLicenseKeyActivateMetaBoolean(boolean bool) LicenseKeyActivateMeta

func CreateLicenseKeyActivateMetaInteger ¶ added in v0.4.15

func CreateLicenseKeyActivateMetaInteger(integer int64) LicenseKeyActivateMeta

func CreateLicenseKeyActivateMetaNumber ¶ added in v0.4.15

func CreateLicenseKeyActivateMetaNumber(number float64) LicenseKeyActivateMeta

func CreateLicenseKeyActivateMetaStr ¶ added in v0.4.15

func CreateLicenseKeyActivateMetaStr(str string) LicenseKeyActivateMeta

func (LicenseKeyActivateMeta) MarshalJSON ¶ added in v0.4.15

func (u LicenseKeyActivateMeta) MarshalJSON() ([]byte, error)

func (*LicenseKeyActivateMeta) UnmarshalJSON ¶ added in v0.4.15

func (u *LicenseKeyActivateMeta) UnmarshalJSON(data []byte) error

type LicenseKeyActivateMetaType ¶ added in v0.4.15

type LicenseKeyActivateMetaType string
const (
	LicenseKeyActivateMetaTypeStr     LicenseKeyActivateMetaType = "str"
	LicenseKeyActivateMetaTypeInteger LicenseKeyActivateMetaType = "integer"
	LicenseKeyActivateMetaTypeNumber  LicenseKeyActivateMetaType = "number"
	LicenseKeyActivateMetaTypeBoolean LicenseKeyActivateMetaType = "boolean"
)

type LicenseKeyActivationBase ¶

type LicenseKeyActivationBase struct {
	ID           string          `json:"id"`
	LicenseKeyID string          `json:"license_key_id"`
	Label        string          `json:"label"`
	Meta         map[string]Meta `json:"meta"`
	CreatedAt    time.Time       `json:"created_at"`
	ModifiedAt   *time.Time      `json:"modified_at"`
}

func (*LicenseKeyActivationBase) GetCreatedAt ¶

func (l *LicenseKeyActivationBase) GetCreatedAt() time.Time

func (*LicenseKeyActivationBase) GetID ¶

func (l *LicenseKeyActivationBase) GetID() string

func (*LicenseKeyActivationBase) GetLabel ¶

func (l *LicenseKeyActivationBase) GetLabel() string

func (*LicenseKeyActivationBase) GetLicenseKeyID ¶

func (l *LicenseKeyActivationBase) GetLicenseKeyID() string

func (*LicenseKeyActivationBase) GetMeta ¶

func (l *LicenseKeyActivationBase) GetMeta() map[string]Meta

func (*LicenseKeyActivationBase) GetModifiedAt ¶

func (l *LicenseKeyActivationBase) GetModifiedAt() *time.Time

func (LicenseKeyActivationBase) MarshalJSON ¶

func (l LicenseKeyActivationBase) MarshalJSON() ([]byte, error)

func (*LicenseKeyActivationBase) UnmarshalJSON ¶

func (l *LicenseKeyActivationBase) UnmarshalJSON(data []byte) error

type LicenseKeyActivationRead ¶

type LicenseKeyActivationRead struct {
	ID           string                                  `json:"id"`
	LicenseKeyID string                                  `json:"license_key_id"`
	Label        string                                  `json:"label"`
	Meta         map[string]LicenseKeyActivationReadMeta `json:"meta"`
	CreatedAt    time.Time                               `json:"created_at"`
	ModifiedAt   *time.Time                              `json:"modified_at"`
	LicenseKey   LicenseKeyRead                          `json:"license_key"`
}

func (*LicenseKeyActivationRead) GetCreatedAt ¶

func (l *LicenseKeyActivationRead) GetCreatedAt() time.Time

func (*LicenseKeyActivationRead) GetID ¶

func (l *LicenseKeyActivationRead) GetID() string

func (*LicenseKeyActivationRead) GetLabel ¶

func (l *LicenseKeyActivationRead) GetLabel() string

func (*LicenseKeyActivationRead) GetLicenseKey ¶

func (l *LicenseKeyActivationRead) GetLicenseKey() LicenseKeyRead

func (*LicenseKeyActivationRead) GetLicenseKeyID ¶

func (l *LicenseKeyActivationRead) GetLicenseKeyID() string

func (*LicenseKeyActivationRead) GetMeta ¶

func (*LicenseKeyActivationRead) GetModifiedAt ¶

func (l *LicenseKeyActivationRead) GetModifiedAt() *time.Time

func (LicenseKeyActivationRead) MarshalJSON ¶

func (l LicenseKeyActivationRead) MarshalJSON() ([]byte, error)

func (*LicenseKeyActivationRead) UnmarshalJSON ¶

func (l *LicenseKeyActivationRead) UnmarshalJSON(data []byte) error

type LicenseKeyActivationReadMeta ¶

type LicenseKeyActivationReadMeta struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type LicenseKeyActivationReadMetaType
}

func CreateLicenseKeyActivationReadMetaBoolean ¶ added in v0.4.15

func CreateLicenseKeyActivationReadMetaBoolean(boolean bool) LicenseKeyActivationReadMeta

func CreateLicenseKeyActivationReadMetaInteger ¶ added in v0.4.15

func CreateLicenseKeyActivationReadMetaInteger(integer int64) LicenseKeyActivationReadMeta

func CreateLicenseKeyActivationReadMetaNumber ¶ added in v0.4.15

func CreateLicenseKeyActivationReadMetaNumber(number float64) LicenseKeyActivationReadMeta

func CreateLicenseKeyActivationReadMetaStr ¶ added in v0.4.15

func CreateLicenseKeyActivationReadMetaStr(str string) LicenseKeyActivationReadMeta

func (LicenseKeyActivationReadMeta) MarshalJSON ¶ added in v0.4.15

func (u LicenseKeyActivationReadMeta) MarshalJSON() ([]byte, error)

func (*LicenseKeyActivationReadMeta) UnmarshalJSON ¶ added in v0.4.15

func (u *LicenseKeyActivationReadMeta) UnmarshalJSON(data []byte) error

type LicenseKeyActivationReadMetaType ¶ added in v0.4.15

type LicenseKeyActivationReadMetaType string
const (
	LicenseKeyActivationReadMetaTypeStr     LicenseKeyActivationReadMetaType = "str"
	LicenseKeyActivationReadMetaTypeInteger LicenseKeyActivationReadMetaType = "integer"
	LicenseKeyActivationReadMetaTypeNumber  LicenseKeyActivationReadMetaType = "number"
	LicenseKeyActivationReadMetaTypeBoolean LicenseKeyActivationReadMetaType = "boolean"
)

type LicenseKeyCustomer ¶

type LicenseKeyCustomer struct {
	// The ID of the customer.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time                    `json:"modified_at"`
	Metadata   map[string]MetadataOutputType `json:"metadata"`
	// The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
	ExternalID *string `json:"external_id,omitempty"`
	// The email address of the customer. This must be unique within the organization.
	Email *string `json:"email,omitempty"`
	// Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.
	EmailVerified bool         `json:"email_verified"`
	Type          CustomerType `json:"type"`
	// The name of the customer.
	Name           *string                    `json:"name"`
	BillingAddress *Address                   `json:"billing_address"`
	TaxID          []*LicenseKeyCustomerTaxID `json:"tax_id"`
	Locale         *string                    `json:"locale,omitempty"`
	// The ID of the organization owning the customer.
	OrganizationID string `json:"organization_id"`
	// Timestamp for when the customer was soft deleted.
	DeletedAt *time.Time `json:"deleted_at"`
	AvatarURL string     `json:"avatar_url"`
}

func (*LicenseKeyCustomer) GetAvatarURL ¶

func (l *LicenseKeyCustomer) GetAvatarURL() string

func (*LicenseKeyCustomer) GetBillingAddress ¶

func (l *LicenseKeyCustomer) GetBillingAddress() *Address

func (*LicenseKeyCustomer) GetCreatedAt ¶

func (l *LicenseKeyCustomer) GetCreatedAt() time.Time

func (*LicenseKeyCustomer) GetDeletedAt ¶ added in v0.4.6

func (l *LicenseKeyCustomer) GetDeletedAt() *time.Time

func (*LicenseKeyCustomer) GetEmail ¶

func (l *LicenseKeyCustomer) GetEmail() *string

func (*LicenseKeyCustomer) GetEmailVerified ¶

func (l *LicenseKeyCustomer) GetEmailVerified() bool

func (*LicenseKeyCustomer) GetExternalID ¶ added in v0.4.1

func (l *LicenseKeyCustomer) GetExternalID() *string

func (*LicenseKeyCustomer) GetID ¶

func (l *LicenseKeyCustomer) GetID() string

func (*LicenseKeyCustomer) GetLocale ¶ added in v0.13.0

func (l *LicenseKeyCustomer) GetLocale() *string

func (*LicenseKeyCustomer) GetMetadata ¶

func (l *LicenseKeyCustomer) GetMetadata() map[string]MetadataOutputType

func (*LicenseKeyCustomer) GetModifiedAt ¶

func (l *LicenseKeyCustomer) GetModifiedAt() *time.Time

func (*LicenseKeyCustomer) GetName ¶

func (l *LicenseKeyCustomer) GetName() *string

func (*LicenseKeyCustomer) GetOrganizationID ¶

func (l *LicenseKeyCustomer) GetOrganizationID() string

func (*LicenseKeyCustomer) GetTaxID ¶

func (*LicenseKeyCustomer) GetType ¶ added in v0.13.0

func (l *LicenseKeyCustomer) GetType() CustomerType

func (LicenseKeyCustomer) MarshalJSON ¶

func (l LicenseKeyCustomer) MarshalJSON() ([]byte, error)

func (*LicenseKeyCustomer) UnmarshalJSON ¶

func (l *LicenseKeyCustomer) UnmarshalJSON(data []byte) error

type LicenseKeyCustomerTaxID ¶

type LicenseKeyCustomerTaxID struct {
	Str         *string      `queryParam:"inline" union:"member"`
	TaxIDFormat *TaxIDFormat `queryParam:"inline" union:"member"`

	Type LicenseKeyCustomerTaxIDType
}

func CreateLicenseKeyCustomerTaxIDStr ¶

func CreateLicenseKeyCustomerTaxIDStr(str string) LicenseKeyCustomerTaxID

func CreateLicenseKeyCustomerTaxIDTaxIDFormat ¶

func CreateLicenseKeyCustomerTaxIDTaxIDFormat(taxIDFormat TaxIDFormat) LicenseKeyCustomerTaxID

func (LicenseKeyCustomerTaxID) MarshalJSON ¶

func (u LicenseKeyCustomerTaxID) MarshalJSON() ([]byte, error)

func (*LicenseKeyCustomerTaxID) UnmarshalJSON ¶

func (u *LicenseKeyCustomerTaxID) UnmarshalJSON(data []byte) error

type LicenseKeyCustomerTaxIDType ¶

type LicenseKeyCustomerTaxIDType string
const (
	LicenseKeyCustomerTaxIDTypeStr         LicenseKeyCustomerTaxIDType = "str"
	LicenseKeyCustomerTaxIDTypeTaxIDFormat LicenseKeyCustomerTaxIDType = "TaxIDFormat"
)

type LicenseKeyDeactivate ¶

type LicenseKeyDeactivate struct {
	Key            string `json:"key"`
	OrganizationID string `json:"organization_id"`
	ActivationID   string `json:"activation_id"`
}

func (*LicenseKeyDeactivate) GetActivationID ¶

func (l *LicenseKeyDeactivate) GetActivationID() string

func (*LicenseKeyDeactivate) GetKey ¶

func (l *LicenseKeyDeactivate) GetKey() string

func (*LicenseKeyDeactivate) GetOrganizationID ¶

func (l *LicenseKeyDeactivate) GetOrganizationID() string

type LicenseKeyRead ¶

type LicenseKeyRead struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt     *time.Time         `json:"modified_at"`
	OrganizationID string             `json:"organization_id"`
	CustomerID     string             `json:"customer_id"`
	Customer       LicenseKeyCustomer `json:"customer"`
	// The benefit ID.
	BenefitID        string           `json:"benefit_id"`
	Key              string           `json:"key"`
	DisplayKey       string           `json:"display_key"`
	Status           LicenseKeyStatus `json:"status"`
	LimitActivations *int64           `json:"limit_activations"`
	Usage            int64            `json:"usage"`
	LimitUsage       *int64           `json:"limit_usage"`
	Validations      int64            `json:"validations"`
	LastValidatedAt  *time.Time       `json:"last_validated_at"`
	ExpiresAt        *time.Time       `json:"expires_at"`
}

func (*LicenseKeyRead) GetBenefitID ¶

func (l *LicenseKeyRead) GetBenefitID() string

func (*LicenseKeyRead) GetCreatedAt ¶ added in v0.4.16

func (l *LicenseKeyRead) GetCreatedAt() time.Time

func (*LicenseKeyRead) GetCustomer ¶

func (l *LicenseKeyRead) GetCustomer() LicenseKeyCustomer

func (*LicenseKeyRead) GetCustomerID ¶

func (l *LicenseKeyRead) GetCustomerID() string

func (*LicenseKeyRead) GetDisplayKey ¶

func (l *LicenseKeyRead) GetDisplayKey() string

func (*LicenseKeyRead) GetExpiresAt ¶

func (l *LicenseKeyRead) GetExpiresAt() *time.Time

func (*LicenseKeyRead) GetID ¶

func (l *LicenseKeyRead) GetID() string

func (*LicenseKeyRead) GetKey ¶

func (l *LicenseKeyRead) GetKey() string

func (*LicenseKeyRead) GetLastValidatedAt ¶

func (l *LicenseKeyRead) GetLastValidatedAt() *time.Time

func (*LicenseKeyRead) GetLimitActivations ¶

func (l *LicenseKeyRead) GetLimitActivations() *int64

func (*LicenseKeyRead) GetLimitUsage ¶

func (l *LicenseKeyRead) GetLimitUsage() *int64

func (*LicenseKeyRead) GetModifiedAt ¶ added in v0.4.16

func (l *LicenseKeyRead) GetModifiedAt() *time.Time

func (*LicenseKeyRead) GetOrganizationID ¶

func (l *LicenseKeyRead) GetOrganizationID() string

func (*LicenseKeyRead) GetStatus ¶

func (l *LicenseKeyRead) GetStatus() LicenseKeyStatus

func (*LicenseKeyRead) GetUsage ¶

func (l *LicenseKeyRead) GetUsage() int64

func (*LicenseKeyRead) GetValidations ¶

func (l *LicenseKeyRead) GetValidations() int64

func (LicenseKeyRead) MarshalJSON ¶

func (l LicenseKeyRead) MarshalJSON() ([]byte, error)

func (*LicenseKeyRead) UnmarshalJSON ¶

func (l *LicenseKeyRead) UnmarshalJSON(data []byte) error

type LicenseKeyStatus ¶

type LicenseKeyStatus string
const (
	LicenseKeyStatusGranted  LicenseKeyStatus = "granted"
	LicenseKeyStatusRevoked  LicenseKeyStatus = "revoked"
	LicenseKeyStatusDisabled LicenseKeyStatus = "disabled"
)

func (LicenseKeyStatus) ToPointer ¶

func (e LicenseKeyStatus) ToPointer() *LicenseKeyStatus

func (*LicenseKeyStatus) UnmarshalJSON ¶

func (e *LicenseKeyStatus) UnmarshalJSON(data []byte) error

type LicenseKeyUpdate ¶

type LicenseKeyUpdate struct {
	Status           *LicenseKeyStatus `json:"status,omitempty"`
	Usage            *int64            `default:"0" json:"usage"`
	LimitActivations *int64            `json:"limit_activations,omitempty"`
	LimitUsage       *int64            `json:"limit_usage,omitempty"`
	ExpiresAt        *time.Time        `json:"expires_at,omitempty"`
}

func (*LicenseKeyUpdate) GetExpiresAt ¶

func (l *LicenseKeyUpdate) GetExpiresAt() *time.Time

func (*LicenseKeyUpdate) GetLimitActivations ¶

func (l *LicenseKeyUpdate) GetLimitActivations() *int64

func (*LicenseKeyUpdate) GetLimitUsage ¶

func (l *LicenseKeyUpdate) GetLimitUsage() *int64

func (*LicenseKeyUpdate) GetStatus ¶

func (l *LicenseKeyUpdate) GetStatus() *LicenseKeyStatus

func (*LicenseKeyUpdate) GetUsage ¶

func (l *LicenseKeyUpdate) GetUsage() *int64

func (LicenseKeyUpdate) MarshalJSON ¶

func (l LicenseKeyUpdate) MarshalJSON() ([]byte, error)

func (*LicenseKeyUpdate) UnmarshalJSON ¶

func (l *LicenseKeyUpdate) UnmarshalJSON(data []byte) error

type LicenseKeyValidate ¶

type LicenseKeyValidate struct {
	Key            string  `json:"key"`
	OrganizationID string  `json:"organization_id"`
	ActivationID   *string `json:"activation_id,omitempty"`
	BenefitID      *string `json:"benefit_id,omitempty"`
	CustomerID     *string `json:"customer_id,omitempty"`
	IncrementUsage *int64  `json:"increment_usage,omitempty"`
	// Key-value object allowing you to set conditions that must match when validating the license key.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Conditions map[string]Conditions `json:"conditions,omitempty"`
}

func (*LicenseKeyValidate) GetActivationID ¶

func (l *LicenseKeyValidate) GetActivationID() *string

func (*LicenseKeyValidate) GetBenefitID ¶

func (l *LicenseKeyValidate) GetBenefitID() *string

func (*LicenseKeyValidate) GetConditions ¶

func (l *LicenseKeyValidate) GetConditions() map[string]Conditions

func (*LicenseKeyValidate) GetCustomerID ¶

func (l *LicenseKeyValidate) GetCustomerID() *string

func (*LicenseKeyValidate) GetIncrementUsage ¶

func (l *LicenseKeyValidate) GetIncrementUsage() *int64

func (*LicenseKeyValidate) GetKey ¶

func (l *LicenseKeyValidate) GetKey() string

func (*LicenseKeyValidate) GetOrganizationID ¶

func (l *LicenseKeyValidate) GetOrganizationID() string

type LicenseKeyWithActivations ¶

type LicenseKeyWithActivations struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt     *time.Time         `json:"modified_at"`
	OrganizationID string             `json:"organization_id"`
	CustomerID     string             `json:"customer_id"`
	Customer       LicenseKeyCustomer `json:"customer"`
	// The benefit ID.
	BenefitID        string                     `json:"benefit_id"`
	Key              string                     `json:"key"`
	DisplayKey       string                     `json:"display_key"`
	Status           LicenseKeyStatus           `json:"status"`
	LimitActivations *int64                     `json:"limit_activations"`
	Usage            int64                      `json:"usage"`
	LimitUsage       *int64                     `json:"limit_usage"`
	Validations      int64                      `json:"validations"`
	LastValidatedAt  *time.Time                 `json:"last_validated_at"`
	ExpiresAt        *time.Time                 `json:"expires_at"`
	Activations      []LicenseKeyActivationBase `json:"activations"`
}

func (*LicenseKeyWithActivations) GetActivations ¶

func (*LicenseKeyWithActivations) GetBenefitID ¶

func (l *LicenseKeyWithActivations) GetBenefitID() string

func (*LicenseKeyWithActivations) GetCreatedAt ¶ added in v0.4.16

func (l *LicenseKeyWithActivations) GetCreatedAt() time.Time

func (*LicenseKeyWithActivations) GetCustomer ¶

func (*LicenseKeyWithActivations) GetCustomerID ¶

func (l *LicenseKeyWithActivations) GetCustomerID() string

func (*LicenseKeyWithActivations) GetDisplayKey ¶

func (l *LicenseKeyWithActivations) GetDisplayKey() string

func (*LicenseKeyWithActivations) GetExpiresAt ¶

func (l *LicenseKeyWithActivations) GetExpiresAt() *time.Time

func (*LicenseKeyWithActivations) GetID ¶

func (l *LicenseKeyWithActivations) GetID() string

func (*LicenseKeyWithActivations) GetKey ¶

func (l *LicenseKeyWithActivations) GetKey() string

func (*LicenseKeyWithActivations) GetLastValidatedAt ¶

func (l *LicenseKeyWithActivations) GetLastValidatedAt() *time.Time

func (*LicenseKeyWithActivations) GetLimitActivations ¶

func (l *LicenseKeyWithActivations) GetLimitActivations() *int64

func (*LicenseKeyWithActivations) GetLimitUsage ¶

func (l *LicenseKeyWithActivations) GetLimitUsage() *int64

func (*LicenseKeyWithActivations) GetModifiedAt ¶ added in v0.4.16

func (l *LicenseKeyWithActivations) GetModifiedAt() *time.Time

func (*LicenseKeyWithActivations) GetOrganizationID ¶

func (l *LicenseKeyWithActivations) GetOrganizationID() string

func (*LicenseKeyWithActivations) GetStatus ¶

func (*LicenseKeyWithActivations) GetUsage ¶

func (l *LicenseKeyWithActivations) GetUsage() int64

func (*LicenseKeyWithActivations) GetValidations ¶

func (l *LicenseKeyWithActivations) GetValidations() int64

func (LicenseKeyWithActivations) MarshalJSON ¶

func (l LicenseKeyWithActivations) MarshalJSON() ([]byte, error)

func (*LicenseKeyWithActivations) UnmarshalJSON ¶

func (l *LicenseKeyWithActivations) UnmarshalJSON(data []byte) error

type ListResourceBenefit ¶

type ListResourceBenefit struct {
	Items      []Benefit  `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceBenefit) GetItems ¶

func (l *ListResourceBenefit) GetItems() []Benefit

func (*ListResourceBenefit) GetPagination ¶

func (l *ListResourceBenefit) GetPagination() Pagination

type ListResourceBenefitGrant ¶

type ListResourceBenefitGrant struct {
	Items      []BenefitGrant `json:"items"`
	Pagination Pagination     `json:"pagination"`
}

func (*ListResourceBenefitGrant) GetItems ¶

func (l *ListResourceBenefitGrant) GetItems() []BenefitGrant

func (*ListResourceBenefitGrant) GetPagination ¶

func (l *ListResourceBenefitGrant) GetPagination() Pagination

type ListResourceCheckout ¶

type ListResourceCheckout struct {
	Items      []Checkout `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceCheckout) GetItems ¶

func (l *ListResourceCheckout) GetItems() []Checkout

func (*ListResourceCheckout) GetPagination ¶

func (l *ListResourceCheckout) GetPagination() Pagination
type ListResourceCheckoutLink struct {
	Items      []CheckoutLink `json:"items"`
	Pagination Pagination     `json:"pagination"`
}

func (*ListResourceCheckoutLink) GetItems ¶

func (l *ListResourceCheckoutLink) GetItems() []CheckoutLink

func (*ListResourceCheckoutLink) GetPagination ¶

func (l *ListResourceCheckoutLink) GetPagination() Pagination

type ListResourceCustomField ¶

type ListResourceCustomField struct {
	Items      []CustomField `json:"items"`
	Pagination Pagination    `json:"pagination"`
}

func (*ListResourceCustomField) GetItems ¶

func (l *ListResourceCustomField) GetItems() []CustomField

func (*ListResourceCustomField) GetPagination ¶

func (l *ListResourceCustomField) GetPagination() Pagination

type ListResourceCustomer ¶

type ListResourceCustomer struct {
	Items      []Customer `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceCustomer) GetItems ¶

func (l *ListResourceCustomer) GetItems() []Customer

func (*ListResourceCustomer) GetPagination ¶

func (l *ListResourceCustomer) GetPagination() Pagination

type ListResourceCustomerBenefitGrant ¶

type ListResourceCustomerBenefitGrant struct {
	Items      []CustomerBenefitGrant `json:"items"`
	Pagination Pagination             `json:"pagination"`
}

func (*ListResourceCustomerBenefitGrant) GetItems ¶

func (*ListResourceCustomerBenefitGrant) GetPagination ¶

func (l *ListResourceCustomerBenefitGrant) GetPagination() Pagination

type ListResourceCustomerCustomerMeter ¶ added in v0.4.10

type ListResourceCustomerCustomerMeter struct {
	Items      []CustomerCustomerMeter `json:"items"`
	Pagination Pagination              `json:"pagination"`
}

func (*ListResourceCustomerCustomerMeter) GetItems ¶ added in v0.4.10

func (*ListResourceCustomerCustomerMeter) GetPagination ¶ added in v0.4.10

func (l *ListResourceCustomerCustomerMeter) GetPagination() Pagination

type ListResourceCustomerMeter ¶ added in v0.4.10

type ListResourceCustomerMeter struct {
	Items      []CustomerMeter `json:"items"`
	Pagination Pagination      `json:"pagination"`
}

func (*ListResourceCustomerMeter) GetItems ¶ added in v0.4.10

func (l *ListResourceCustomerMeter) GetItems() []CustomerMeter

func (*ListResourceCustomerMeter) GetPagination ¶ added in v0.4.10

func (l *ListResourceCustomerMeter) GetPagination() Pagination

type ListResourceCustomerOrder ¶

type ListResourceCustomerOrder struct {
	Items      []CustomerOrder `json:"items"`
	Pagination Pagination      `json:"pagination"`
}

func (*ListResourceCustomerOrder) GetItems ¶

func (l *ListResourceCustomerOrder) GetItems() []CustomerOrder

func (*ListResourceCustomerOrder) GetPagination ¶

func (l *ListResourceCustomerOrder) GetPagination() Pagination

type ListResourceCustomerPaymentMethod ¶ added in v0.7.3

type ListResourceCustomerPaymentMethod struct {
	Items      []CustomerPaymentMethod `json:"items"`
	Pagination Pagination              `json:"pagination"`
}

func (*ListResourceCustomerPaymentMethod) GetItems ¶ added in v0.7.3

func (*ListResourceCustomerPaymentMethod) GetPagination ¶ added in v0.7.3

func (l *ListResourceCustomerPaymentMethod) GetPagination() Pagination

type ListResourceCustomerPortalMember ¶ added in v0.13.0

type ListResourceCustomerPortalMember struct {
	Items      []CustomerPortalMember `json:"items"`
	Pagination Pagination             `json:"pagination"`
}

func (*ListResourceCustomerPortalMember) GetItems ¶ added in v0.13.0

func (*ListResourceCustomerPortalMember) GetPagination ¶ added in v0.13.0

func (l *ListResourceCustomerPortalMember) GetPagination() Pagination

type ListResourceCustomerSubscription ¶

type ListResourceCustomerSubscription struct {
	Items      []CustomerSubscription `json:"items"`
	Pagination Pagination             `json:"pagination"`
}

func (*ListResourceCustomerSubscription) GetItems ¶

func (*ListResourceCustomerSubscription) GetPagination ¶

func (l *ListResourceCustomerSubscription) GetPagination() Pagination

type ListResourceCustomerWallet ¶ added in v0.12.0

type ListResourceCustomerWallet struct {
	Items      []CustomerWallet `json:"items"`
	Pagination Pagination       `json:"pagination"`
}

func (*ListResourceCustomerWallet) GetItems ¶ added in v0.12.0

func (*ListResourceCustomerWallet) GetPagination ¶ added in v0.12.0

func (l *ListResourceCustomerWallet) GetPagination() Pagination

type ListResourceDiscount ¶

type ListResourceDiscount struct {
	Items      []Discount `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceDiscount) GetItems ¶

func (l *ListResourceDiscount) GetItems() []Discount

func (*ListResourceDiscount) GetPagination ¶

func (l *ListResourceDiscount) GetPagination() Pagination

type ListResourceDispute ¶ added in v0.13.0

type ListResourceDispute struct {
	Items      []Dispute  `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceDispute) GetItems ¶ added in v0.13.0

func (l *ListResourceDispute) GetItems() []Dispute

func (*ListResourceDispute) GetPagination ¶ added in v0.13.0

func (l *ListResourceDispute) GetPagination() Pagination

type ListResourceDownloadableRead ¶

type ListResourceDownloadableRead struct {
	Items      []DownloadableRead `json:"items"`
	Pagination Pagination         `json:"pagination"`
}

func (*ListResourceDownloadableRead) GetItems ¶

func (*ListResourceDownloadableRead) GetPagination ¶

func (l *ListResourceDownloadableRead) GetPagination() Pagination

type ListResourceEvent ¶ added in v0.1.8

type ListResourceEvent struct {
	Items      []Event    `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceEvent) GetItems ¶ added in v0.1.8

func (l *ListResourceEvent) GetItems() []Event

func (*ListResourceEvent) GetPagination ¶ added in v0.1.8

func (l *ListResourceEvent) GetPagination() Pagination

func (ListResourceEvent) MarshalJSON ¶ added in v0.13.0

func (l ListResourceEvent) MarshalJSON() ([]byte, error)

func (*ListResourceEvent) UnmarshalJSON ¶ added in v0.13.0

func (l *ListResourceEvent) UnmarshalJSON(data []byte) error

type ListResourceEventName ¶ added in v0.4.10

type ListResourceEventName struct {
	Items      []EventName `json:"items"`
	Pagination Pagination  `json:"pagination"`
}

func (*ListResourceEventName) GetItems ¶ added in v0.4.10

func (l *ListResourceEventName) GetItems() []EventName

func (*ListResourceEventName) GetPagination ¶ added in v0.4.10

func (l *ListResourceEventName) GetPagination() Pagination

type ListResourceEventTypeWithStats ¶ added in v0.13.0

type ListResourceEventTypeWithStats struct {
	Items      []EventTypeWithStats `json:"items"`
	Pagination Pagination           `json:"pagination"`
}

func (*ListResourceEventTypeWithStats) GetItems ¶ added in v0.13.0

func (*ListResourceEventTypeWithStats) GetPagination ¶ added in v0.13.0

func (l *ListResourceEventTypeWithStats) GetPagination() Pagination

type ListResourceFileRead ¶

type ListResourceFileRead struct {
	Items      []FileRead `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceFileRead) GetItems ¶

func (l *ListResourceFileRead) GetItems() []FileRead

func (*ListResourceFileRead) GetPagination ¶

func (l *ListResourceFileRead) GetPagination() Pagination

type ListResourceLicenseKeyRead ¶

type ListResourceLicenseKeyRead struct {
	Items      []LicenseKeyRead `json:"items"`
	Pagination Pagination       `json:"pagination"`
}

func (*ListResourceLicenseKeyRead) GetItems ¶

func (*ListResourceLicenseKeyRead) GetPagination ¶

func (l *ListResourceLicenseKeyRead) GetPagination() Pagination

type ListResourceMember ¶ added in v0.13.0

type ListResourceMember struct {
	Items      []Member   `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceMember) GetItems ¶ added in v0.13.0

func (l *ListResourceMember) GetItems() []Member

func (*ListResourceMember) GetPagination ¶ added in v0.13.0

func (l *ListResourceMember) GetPagination() Pagination

type ListResourceMeter ¶ added in v0.1.8

type ListResourceMeter struct {
	Items      []Meter    `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceMeter) GetItems ¶ added in v0.1.8

func (l *ListResourceMeter) GetItems() []Meter

func (*ListResourceMeter) GetPagination ¶ added in v0.1.8

func (l *ListResourceMeter) GetPagination() Pagination

type ListResourceOrder ¶

type ListResourceOrder struct {
	Items      []Order    `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceOrder) GetItems ¶

func (l *ListResourceOrder) GetItems() []Order

func (*ListResourceOrder) GetPagination ¶

func (l *ListResourceOrder) GetPagination() Pagination

type ListResourceOrganization ¶

type ListResourceOrganization struct {
	Items      []Organization `json:"items"`
	Pagination Pagination     `json:"pagination"`
}

func (*ListResourceOrganization) GetItems ¶

func (l *ListResourceOrganization) GetItems() []Organization

func (*ListResourceOrganization) GetPagination ¶

func (l *ListResourceOrganization) GetPagination() Pagination

type ListResourceOrganizationAccessToken ¶ added in v0.13.0

type ListResourceOrganizationAccessToken struct {
	Items      []OrganizationAccessToken `json:"items"`
	Pagination Pagination                `json:"pagination"`
}

func (*ListResourceOrganizationAccessToken) GetItems ¶ added in v0.13.0

func (*ListResourceOrganizationAccessToken) GetPagination ¶ added in v0.13.0

type ListResourcePayment ¶ added in v0.16.0

type ListResourcePayment struct {
	Items      []Payment  `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourcePayment) GetItems ¶ added in v0.16.0

func (l *ListResourcePayment) GetItems() []Payment

func (*ListResourcePayment) GetPagination ¶ added in v0.16.0

func (l *ListResourcePayment) GetPagination() Pagination

type ListResourceProduct ¶

type ListResourceProduct struct {
	Items      []Product  `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceProduct) GetItems ¶

func (l *ListResourceProduct) GetItems() []Product

func (*ListResourceProduct) GetPagination ¶

func (l *ListResourceProduct) GetPagination() Pagination

type ListResourceRefund ¶ added in v0.1.5

type ListResourceRefund struct {
	Items      []Refund   `json:"items"`
	Pagination Pagination `json:"pagination"`
}

func (*ListResourceRefund) GetItems ¶ added in v0.1.5

func (l *ListResourceRefund) GetItems() []Refund

func (*ListResourceRefund) GetPagination ¶ added in v0.1.5

func (l *ListResourceRefund) GetPagination() Pagination

type ListResourceSubscription ¶

type ListResourceSubscription struct {
	Items      []Subscription `json:"items"`
	Pagination Pagination     `json:"pagination"`
}

func (*ListResourceSubscription) GetItems ¶

func (l *ListResourceSubscription) GetItems() []Subscription

func (*ListResourceSubscription) GetPagination ¶

func (l *ListResourceSubscription) GetPagination() Pagination

type ListResourceWebhookDelivery ¶ added in v0.6.1

type ListResourceWebhookDelivery struct {
	Items      []WebhookDelivery `json:"items"`
	Pagination Pagination        `json:"pagination"`
}

func (*ListResourceWebhookDelivery) GetItems ¶ added in v0.6.1

func (*ListResourceWebhookDelivery) GetPagination ¶ added in v0.6.1

func (l *ListResourceWebhookDelivery) GetPagination() Pagination

type ListResourceWebhookEndpoint ¶ added in v0.6.1

type ListResourceWebhookEndpoint struct {
	Items      []WebhookEndpoint `json:"items"`
	Pagination Pagination        `json:"pagination"`
}

func (*ListResourceWebhookEndpoint) GetItems ¶ added in v0.6.1

func (*ListResourceWebhookEndpoint) GetPagination ¶ added in v0.6.1

func (l *ListResourceWebhookEndpoint) GetPagination() Pagination

type ListResourceWithCursorPaginationEvent ¶ added in v0.13.0

type ListResourceWithCursorPaginationEvent struct {
	Items      []Event          `json:"items"`
	Pagination CursorPagination `json:"pagination"`
}

func (*ListResourceWithCursorPaginationEvent) GetItems ¶ added in v0.13.0

func (*ListResourceWithCursorPaginationEvent) GetPagination ¶ added in v0.13.0

func (ListResourceWithCursorPaginationEvent) MarshalJSON ¶ added in v0.13.0

func (l ListResourceWithCursorPaginationEvent) MarshalJSON() ([]byte, error)

func (*ListResourceWithCursorPaginationEvent) UnmarshalJSON ¶ added in v0.13.0

func (l *ListResourceWithCursorPaginationEvent) UnmarshalJSON(data []byte) error

type Loc ¶

type Loc struct {
	Str     *string `queryParam:"inline" union:"member"`
	Integer *int64  `queryParam:"inline" union:"member"`

	Type LocType
}

func CreateLocInteger ¶

func CreateLocInteger(integer int64) Loc

func CreateLocStr ¶

func CreateLocStr(str string) Loc

func (Loc) MarshalJSON ¶

func (u Loc) MarshalJSON() ([]byte, error)

func (*Loc) UnmarshalJSON ¶

func (u *Loc) UnmarshalJSON(data []byte) error

type LocType ¶

type LocType string
const (
	LocTypeStr     LocType = "str"
	LocTypeInteger LocType = "integer"
)

type Ltv ¶ added in v0.13.0

type Ltv struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type LtvType
}

func CreateLtvInteger ¶ added in v0.13.0

func CreateLtvInteger(integer int64) Ltv

func CreateLtvNumber ¶ added in v0.13.0

func CreateLtvNumber(number float64) Ltv

func (Ltv) MarshalJSON ¶ added in v0.13.0

func (u Ltv) MarshalJSON() ([]byte, error)

func (*Ltv) UnmarshalJSON ¶ added in v0.13.0

func (u *Ltv) UnmarshalJSON(data []byte) error

type LtvType ¶ added in v0.13.0

type LtvType string
const (
	LtvTypeInteger LtvType = "integer"
	LtvTypeNumber  LtvType = "number"
)

type Member ¶ added in v0.13.0

type Member struct {
	// The ID of the member.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the customer this member belongs to.
	CustomerID string `json:"customer_id"`
	// The email address of the member.
	Email string `json:"email"`
	// The name of the member.
	Name *string `json:"name"`
	// The ID of the member in your system. This must be unique within the customer.
	ExternalID *string    `json:"external_id"`
	Role       MemberRole `json:"role"`
}

Member - A member of a customer.

func (*Member) GetCreatedAt ¶ added in v0.13.0

func (m *Member) GetCreatedAt() time.Time

func (*Member) GetCustomerID ¶ added in v0.13.0

func (m *Member) GetCustomerID() string

func (*Member) GetEmail ¶ added in v0.13.0

func (m *Member) GetEmail() string

func (*Member) GetExternalID ¶ added in v0.13.0

func (m *Member) GetExternalID() *string

func (*Member) GetID ¶ added in v0.13.0

func (m *Member) GetID() string

func (*Member) GetModifiedAt ¶ added in v0.13.0

func (m *Member) GetModifiedAt() *time.Time

func (*Member) GetName ¶ added in v0.13.0

func (m *Member) GetName() *string

func (*Member) GetRole ¶ added in v0.13.0

func (m *Member) GetRole() MemberRole

func (Member) MarshalJSON ¶ added in v0.13.0

func (m Member) MarshalJSON() ([]byte, error)

func (*Member) UnmarshalJSON ¶ added in v0.13.0

func (m *Member) UnmarshalJSON(data []byte) error

type MemberCreate ¶ added in v0.13.0

type MemberCreate struct {
	// The ID of the customer this member belongs to.
	CustomerID string `json:"customer_id"`
	// The email address of the member.
	Email string  `json:"email"`
	Name  *string `json:"name,omitempty"`
	// The ID of the member in your system. This must be unique within the customer.
	ExternalID *string     `json:"external_id,omitempty"`
	Role       *MemberRole `json:"role,omitempty"`
}

MemberCreate - Schema for creating a new member.

func (*MemberCreate) GetCustomerID ¶ added in v0.13.0

func (m *MemberCreate) GetCustomerID() string

func (*MemberCreate) GetEmail ¶ added in v0.13.0

func (m *MemberCreate) GetEmail() string

func (*MemberCreate) GetExternalID ¶ added in v0.13.0

func (m *MemberCreate) GetExternalID() *string

func (*MemberCreate) GetName ¶ added in v0.13.0

func (m *MemberCreate) GetName() *string

func (*MemberCreate) GetRole ¶ added in v0.13.0

func (m *MemberCreate) GetRole() *MemberRole

type MemberOwnerCreate ¶ added in v0.16.0

type MemberOwnerCreate struct {
	// The email address of the member.
	Email string  `json:"email"`
	Name  *string `json:"name,omitempty"`
	// The ID of the member in your system. This must be unique within the customer.
	ExternalID *string `json:"external_id,omitempty"`
}

MemberOwnerCreate - Schema for creating an owner member during customer creation.

func (*MemberOwnerCreate) GetEmail ¶ added in v0.16.0

func (m *MemberOwnerCreate) GetEmail() string

func (*MemberOwnerCreate) GetExternalID ¶ added in v0.16.0

func (m *MemberOwnerCreate) GetExternalID() *string

func (*MemberOwnerCreate) GetName ¶ added in v0.16.0

func (m *MemberOwnerCreate) GetName() *string

func (MemberOwnerCreate) MarshalJSON ¶ added in v0.16.0

func (m MemberOwnerCreate) MarshalJSON() ([]byte, error)

func (*MemberOwnerCreate) UnmarshalJSON ¶ added in v0.16.0

func (m *MemberOwnerCreate) UnmarshalJSON(data []byte) error

type MemberRole ¶ added in v0.13.0

type MemberRole string
const (
	MemberRoleOwner          MemberRole = "owner"
	MemberRoleBillingManager MemberRole = "billing_manager"
	MemberRoleMember         MemberRole = "member"
)

func (MemberRole) ToPointer ¶ added in v0.13.0

func (e MemberRole) ToPointer() *MemberRole

func (*MemberRole) UnmarshalJSON ¶ added in v0.13.0

func (e *MemberRole) UnmarshalJSON(data []byte) error

type MemberSortProperty ¶ added in v0.13.0

type MemberSortProperty string
const (
	MemberSortPropertyCreatedAt      MemberSortProperty = "created_at"
	MemberSortPropertyMinusCreatedAt MemberSortProperty = "-created_at"
)

func (MemberSortProperty) ToPointer ¶ added in v0.13.0

func (e MemberSortProperty) ToPointer() *MemberSortProperty

func (*MemberSortProperty) UnmarshalJSON ¶ added in v0.13.0

func (e *MemberSortProperty) UnmarshalJSON(data []byte) error

type MemberUpdate ¶ added in v0.13.0

type MemberUpdate struct {
	Name *string `json:"name,omitempty"`
	// The role of the member within the customer.
	Role *MemberRole `json:"role,omitempty"`
}

MemberUpdate - Schema for updating a member.

func (*MemberUpdate) GetName ¶ added in v0.13.0

func (m *MemberUpdate) GetName() *string

func (*MemberUpdate) GetRole ¶ added in v0.13.0

func (m *MemberUpdate) GetRole() *MemberRole

type Meta ¶

type Meta struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type MetaType
}

func CreateMetaBoolean ¶ added in v0.4.15

func CreateMetaBoolean(boolean bool) Meta

func CreateMetaInteger ¶ added in v0.4.15

func CreateMetaInteger(integer int64) Meta

func CreateMetaNumber ¶ added in v0.4.15

func CreateMetaNumber(number float64) Meta

func CreateMetaStr ¶ added in v0.4.15

func CreateMetaStr(str string) Meta

func (Meta) MarshalJSON ¶ added in v0.4.15

func (u Meta) MarshalJSON() ([]byte, error)

func (*Meta) UnmarshalJSON ¶ added in v0.4.15

func (u *Meta) UnmarshalJSON(data []byte) error

type MetaType ¶ added in v0.4.15

type MetaType string
const (
	MetaTypeStr     MetaType = "str"
	MetaTypeInteger MetaType = "integer"
	MetaTypeNumber  MetaType = "number"
	MetaTypeBoolean MetaType = "boolean"
)

type Metadata ¶

type Metadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type MetadataType
}

func CreateMetadataBoolean ¶

func CreateMetadataBoolean(boolean bool) Metadata

func CreateMetadataInteger ¶

func CreateMetadataInteger(integer int64) Metadata

func CreateMetadataNumber ¶ added in v0.4.12

func CreateMetadataNumber(number float64) Metadata

func CreateMetadataStr ¶

func CreateMetadataStr(str string) Metadata

func (Metadata) MarshalJSON ¶

func (u Metadata) MarshalJSON() ([]byte, error)

func (*Metadata) UnmarshalJSON ¶

func (u *Metadata) UnmarshalJSON(data []byte) error

type MetadataOutputType ¶ added in v0.13.0

type MetadataOutputType struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type MetadataOutputTypeType
}

func CreateMetadataOutputTypeBoolean ¶ added in v0.13.0

func CreateMetadataOutputTypeBoolean(boolean bool) MetadataOutputType

func CreateMetadataOutputTypeInteger ¶ added in v0.13.0

func CreateMetadataOutputTypeInteger(integer int64) MetadataOutputType

func CreateMetadataOutputTypeNumber ¶ added in v0.13.0

func CreateMetadataOutputTypeNumber(number float64) MetadataOutputType

func CreateMetadataOutputTypeStr ¶ added in v0.13.0

func CreateMetadataOutputTypeStr(str string) MetadataOutputType

func (MetadataOutputType) MarshalJSON ¶ added in v0.13.0

func (u MetadataOutputType) MarshalJSON() ([]byte, error)

func (*MetadataOutputType) UnmarshalJSON ¶ added in v0.13.0

func (u *MetadataOutputType) UnmarshalJSON(data []byte) error

type MetadataOutputTypeType ¶ added in v0.13.0

type MetadataOutputTypeType string
const (
	MetadataOutputTypeTypeStr     MetadataOutputTypeType = "str"
	MetadataOutputTypeTypeInteger MetadataOutputTypeType = "integer"
	MetadataOutputTypeTypeNumber  MetadataOutputTypeType = "number"
	MetadataOutputTypeTypeBoolean MetadataOutputTypeType = "boolean"
)

type MetadataQuery ¶ added in v0.1.4

type MetadataQuery struct {
	Str            *string  `queryParam:"inline" union:"member"`
	Integer        *int64   `queryParam:"inline" union:"member"`
	Boolean        *bool    `queryParam:"inline" union:"member"`
	ArrayOfStr     []string `queryParam:"inline" union:"member"`
	ArrayOfInteger []int64  `queryParam:"inline" union:"member"`
	ArrayOfBoolean []bool   `queryParam:"inline" union:"member"`

	Type MetadataQueryType
}

func CreateMetadataQueryArrayOfBoolean ¶ added in v0.1.4

func CreateMetadataQueryArrayOfBoolean(arrayOfBoolean []bool) MetadataQuery

func CreateMetadataQueryArrayOfInteger ¶ added in v0.1.4

func CreateMetadataQueryArrayOfInteger(arrayOfInteger []int64) MetadataQuery

func CreateMetadataQueryArrayOfStr ¶ added in v0.1.4

func CreateMetadataQueryArrayOfStr(arrayOfStr []string) MetadataQuery

func CreateMetadataQueryBoolean ¶ added in v0.1.4

func CreateMetadataQueryBoolean(boolean bool) MetadataQuery

func CreateMetadataQueryInteger ¶ added in v0.1.4

func CreateMetadataQueryInteger(integer int64) MetadataQuery

func CreateMetadataQueryStr ¶ added in v0.1.4

func CreateMetadataQueryStr(str string) MetadataQuery

func (MetadataQuery) MarshalJSON ¶ added in v0.1.4

func (u MetadataQuery) MarshalJSON() ([]byte, error)

func (*MetadataQuery) UnmarshalJSON ¶ added in v0.1.4

func (u *MetadataQuery) UnmarshalJSON(data []byte) error

type MetadataQueryType ¶ added in v0.1.4

type MetadataQueryType string
const (
	MetadataQueryTypeStr            MetadataQueryType = "str"
	MetadataQueryTypeInteger        MetadataQueryType = "integer"
	MetadataQueryTypeBoolean        MetadataQueryType = "boolean"
	MetadataQueryTypeArrayOfStr     MetadataQueryType = "arrayOfStr"
	MetadataQueryTypeArrayOfInteger MetadataQueryType = "arrayOfInteger"
	MetadataQueryTypeArrayOfBoolean MetadataQueryType = "arrayOfBoolean"
)

type MetadataType ¶

type MetadataType string
const (
	MetadataTypeStr     MetadataType = "str"
	MetadataTypeInteger MetadataType = "integer"
	MetadataTypeNumber  MetadataType = "number"
	MetadataTypeBoolean MetadataType = "boolean"
)

type Meter ¶ added in v0.1.8

type Meter struct {
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The name of the meter. Will be shown on customer's invoices and usage.
	Name   string `json:"name"`
	Filter Filter `json:"filter"`
	// The aggregation to apply on the filtered events to calculate the meter.
	Aggregation MeterAggregation `json:"aggregation"`
	// The ID of the organization owning the meter.
	OrganizationID string `json:"organization_id"`
	// Whether the meter is archived and the time it was archived.
	ArchivedAt *time.Time `json:"archived_at,omitempty"`
}

func (*Meter) GetAggregation ¶ added in v0.1.8

func (m *Meter) GetAggregation() MeterAggregation

func (*Meter) GetAggregationAvg ¶ added in v0.1.8

func (m *Meter) GetAggregationAvg() *PropertyAggregation

func (*Meter) GetAggregationCount ¶ added in v0.1.8

func (m *Meter) GetAggregationCount() *CountAggregation

func (*Meter) GetAggregationMax ¶ added in v0.1.8

func (m *Meter) GetAggregationMax() *PropertyAggregation

func (*Meter) GetAggregationMin ¶ added in v0.1.8

func (m *Meter) GetAggregationMin() *PropertyAggregation

func (*Meter) GetAggregationSum ¶ added in v0.1.8

func (m *Meter) GetAggregationSum() *PropertyAggregation

func (*Meter) GetAggregationUnique ¶ added in v0.8.3

func (m *Meter) GetAggregationUnique() *UniqueAggregation

func (*Meter) GetArchivedAt ¶ added in v0.8.4

func (m *Meter) GetArchivedAt() *time.Time

func (*Meter) GetCreatedAt ¶ added in v0.1.8

func (m *Meter) GetCreatedAt() time.Time

func (*Meter) GetFilter ¶ added in v0.1.8

func (m *Meter) GetFilter() Filter

func (*Meter) GetID ¶ added in v0.1.8

func (m *Meter) GetID() string

func (*Meter) GetMetadata ¶ added in v0.1.8

func (m *Meter) GetMetadata() map[string]MetadataOutputType

func (*Meter) GetModifiedAt ¶ added in v0.1.8

func (m *Meter) GetModifiedAt() *time.Time

func (*Meter) GetName ¶ added in v0.1.8

func (m *Meter) GetName() string

func (*Meter) GetOrganizationID ¶ added in v0.1.8

func (m *Meter) GetOrganizationID() string

func (Meter) MarshalJSON ¶ added in v0.1.8

func (m Meter) MarshalJSON() ([]byte, error)

func (*Meter) UnmarshalJSON ¶ added in v0.1.8

func (m *Meter) UnmarshalJSON(data []byte) error

type MeterAggregation ¶ added in v0.1.8

type MeterAggregation struct {
	CountAggregation    *CountAggregation    `queryParam:"inline" union:"member"`
	PropertyAggregation *PropertyAggregation `queryParam:"inline" union:"member"`
	UniqueAggregation   *UniqueAggregation   `queryParam:"inline" union:"member"`

	Type MeterAggregationType
}

MeterAggregation - The aggregation to apply on the filtered events to calculate the meter.

func CreateMeterAggregationAvg ¶ added in v0.1.8

func CreateMeterAggregationAvg(avg PropertyAggregation) MeterAggregation

func CreateMeterAggregationCount ¶ added in v0.1.8

func CreateMeterAggregationCount(count CountAggregation) MeterAggregation

func CreateMeterAggregationMax ¶ added in v0.1.8

func CreateMeterAggregationMax(max PropertyAggregation) MeterAggregation

func CreateMeterAggregationMin ¶ added in v0.1.8

func CreateMeterAggregationMin(min PropertyAggregation) MeterAggregation

func CreateMeterAggregationSum ¶ added in v0.1.8

func CreateMeterAggregationSum(sum PropertyAggregation) MeterAggregation

func CreateMeterAggregationUnique ¶ added in v0.8.3

func CreateMeterAggregationUnique(unique UniqueAggregation) MeterAggregation

func (MeterAggregation) MarshalJSON ¶ added in v0.1.8

func (u MeterAggregation) MarshalJSON() ([]byte, error)

func (*MeterAggregation) UnmarshalJSON ¶ added in v0.1.8

func (u *MeterAggregation) UnmarshalJSON(data []byte) error

type MeterAggregationType ¶ added in v0.1.8

type MeterAggregationType string
const (
	MeterAggregationTypeAvg    MeterAggregationType = "avg"
	MeterAggregationTypeCount  MeterAggregationType = "count"
	MeterAggregationTypeMax    MeterAggregationType = "max"
	MeterAggregationTypeMin    MeterAggregationType = "min"
	MeterAggregationTypeSum    MeterAggregationType = "sum"
	MeterAggregationTypeUnique MeterAggregationType = "unique"
)

type MeterCreate ¶ added in v0.1.8

type MeterCreate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]MeterCreateMetadata `json:"metadata,omitempty"`
	// The name of the meter. Will be shown on customer's invoices and usage.
	Name   string `json:"name"`
	Filter Filter `json:"filter"`
	// The aggregation to apply on the filtered events to calculate the meter.
	Aggregation MeterCreateAggregation `json:"aggregation"`
	// The ID of the organization owning the meter. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
}

func (*MeterCreate) GetAggregation ¶ added in v0.1.8

func (m *MeterCreate) GetAggregation() MeterCreateAggregation

func (*MeterCreate) GetAggregationAvg ¶ added in v0.1.8

func (m *MeterCreate) GetAggregationAvg() *PropertyAggregation

func (*MeterCreate) GetAggregationCount ¶ added in v0.1.8

func (m *MeterCreate) GetAggregationCount() *CountAggregation

func (*MeterCreate) GetAggregationMax ¶ added in v0.1.8

func (m *MeterCreate) GetAggregationMax() *PropertyAggregation

func (*MeterCreate) GetAggregationMin ¶ added in v0.1.8

func (m *MeterCreate) GetAggregationMin() *PropertyAggregation

func (*MeterCreate) GetAggregationSum ¶ added in v0.1.8

func (m *MeterCreate) GetAggregationSum() *PropertyAggregation

func (*MeterCreate) GetAggregationUnique ¶ added in v0.8.3

func (m *MeterCreate) GetAggregationUnique() *UniqueAggregation

func (*MeterCreate) GetFilter ¶ added in v0.1.8

func (m *MeterCreate) GetFilter() Filter

func (*MeterCreate) GetMetadata ¶ added in v0.1.8

func (m *MeterCreate) GetMetadata() map[string]MeterCreateMetadata

func (*MeterCreate) GetName ¶ added in v0.1.8

func (m *MeterCreate) GetName() string

func (*MeterCreate) GetOrganizationID ¶ added in v0.1.8

func (m *MeterCreate) GetOrganizationID() *string

type MeterCreateAggregation ¶ added in v0.1.8

type MeterCreateAggregation struct {
	CountAggregation    *CountAggregation    `queryParam:"inline" union:"member"`
	PropertyAggregation *PropertyAggregation `queryParam:"inline" union:"member"`
	UniqueAggregation   *UniqueAggregation   `queryParam:"inline" union:"member"`

	Type MeterCreateAggregationType
}

MeterCreateAggregation - The aggregation to apply on the filtered events to calculate the meter.

func CreateMeterCreateAggregationAvg ¶ added in v0.1.8

func CreateMeterCreateAggregationAvg(avg PropertyAggregation) MeterCreateAggregation

func CreateMeterCreateAggregationCount ¶ added in v0.1.8

func CreateMeterCreateAggregationCount(count CountAggregation) MeterCreateAggregation

func CreateMeterCreateAggregationMax ¶ added in v0.1.8

func CreateMeterCreateAggregationMax(max PropertyAggregation) MeterCreateAggregation

func CreateMeterCreateAggregationMin ¶ added in v0.1.8

func CreateMeterCreateAggregationMin(min PropertyAggregation) MeterCreateAggregation

func CreateMeterCreateAggregationSum ¶ added in v0.1.8

func CreateMeterCreateAggregationSum(sum PropertyAggregation) MeterCreateAggregation

func CreateMeterCreateAggregationUnique ¶ added in v0.8.3

func CreateMeterCreateAggregationUnique(unique UniqueAggregation) MeterCreateAggregation

func (MeterCreateAggregation) MarshalJSON ¶ added in v0.1.8

func (u MeterCreateAggregation) MarshalJSON() ([]byte, error)

func (*MeterCreateAggregation) UnmarshalJSON ¶ added in v0.1.8

func (u *MeterCreateAggregation) UnmarshalJSON(data []byte) error

type MeterCreateAggregationType ¶ added in v0.1.8

type MeterCreateAggregationType string
const (
	MeterCreateAggregationTypeAvg    MeterCreateAggregationType = "avg"
	MeterCreateAggregationTypeCount  MeterCreateAggregationType = "count"
	MeterCreateAggregationTypeMax    MeterCreateAggregationType = "max"
	MeterCreateAggregationTypeMin    MeterCreateAggregationType = "min"
	MeterCreateAggregationTypeSum    MeterCreateAggregationType = "sum"
	MeterCreateAggregationTypeUnique MeterCreateAggregationType = "unique"
)

type MeterCreateMetadata ¶ added in v0.1.8

type MeterCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type MeterCreateMetadataType
}

func CreateMeterCreateMetadataBoolean ¶ added in v0.1.8

func CreateMeterCreateMetadataBoolean(boolean bool) MeterCreateMetadata

func CreateMeterCreateMetadataInteger ¶ added in v0.1.8

func CreateMeterCreateMetadataInteger(integer int64) MeterCreateMetadata

func CreateMeterCreateMetadataNumber ¶ added in v0.4.12

func CreateMeterCreateMetadataNumber(number float64) MeterCreateMetadata

func CreateMeterCreateMetadataStr ¶ added in v0.1.8

func CreateMeterCreateMetadataStr(str string) MeterCreateMetadata

func (MeterCreateMetadata) MarshalJSON ¶ added in v0.1.8

func (u MeterCreateMetadata) MarshalJSON() ([]byte, error)

func (*MeterCreateMetadata) UnmarshalJSON ¶ added in v0.1.8

func (u *MeterCreateMetadata) UnmarshalJSON(data []byte) error

type MeterCreateMetadataType ¶ added in v0.1.8

type MeterCreateMetadataType string
const (
	MeterCreateMetadataTypeStr     MeterCreateMetadataType = "str"
	MeterCreateMetadataTypeInteger MeterCreateMetadataType = "integer"
	MeterCreateMetadataTypeNumber  MeterCreateMetadataType = "number"
	MeterCreateMetadataTypeBoolean MeterCreateMetadataType = "boolean"
)

type MeterCreditEvent ¶ added in v0.4.20

type MeterCreditEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata MeterCreditedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

MeterCreditEvent - An event created by Polar when credits are added to a customer meter.

func (*MeterCreditEvent) GetChildCount ¶ added in v0.12.0

func (m *MeterCreditEvent) GetChildCount() *int64

func (*MeterCreditEvent) GetCustomer ¶ added in v0.4.20

func (m *MeterCreditEvent) GetCustomer() *Customer

func (*MeterCreditEvent) GetCustomerID ¶ added in v0.4.20

func (m *MeterCreditEvent) GetCustomerID() *string

func (*MeterCreditEvent) GetCustomerIndividual ¶ added in v0.16.0

func (m *MeterCreditEvent) GetCustomerIndividual() *CustomerIndividual

func (*MeterCreditEvent) GetCustomerTeam ¶ added in v0.16.0

func (m *MeterCreditEvent) GetCustomerTeam() *CustomerTeam

func (*MeterCreditEvent) GetExternalCustomerID ¶ added in v0.4.20

func (m *MeterCreditEvent) GetExternalCustomerID() *string

func (*MeterCreditEvent) GetExternalMemberID ¶ added in v0.13.0

func (m *MeterCreditEvent) GetExternalMemberID() *string

func (*MeterCreditEvent) GetID ¶ added in v0.4.20

func (m *MeterCreditEvent) GetID() string

func (*MeterCreditEvent) GetLabel ¶ added in v0.13.0

func (m *MeterCreditEvent) GetLabel() string

func (*MeterCreditEvent) GetMemberID ¶ added in v0.13.0

func (m *MeterCreditEvent) GetMemberID() *string

func (*MeterCreditEvent) GetMetadata ¶ added in v0.4.20

func (m *MeterCreditEvent) GetMetadata() MeterCreditedMetadata

func (*MeterCreditEvent) GetName ¶ added in v0.4.20

func (m *MeterCreditEvent) GetName() string

func (*MeterCreditEvent) GetOrganizationID ¶ added in v0.4.20

func (m *MeterCreditEvent) GetOrganizationID() string

func (*MeterCreditEvent) GetParentID ¶ added in v0.13.0

func (m *MeterCreditEvent) GetParentID() *string

func (*MeterCreditEvent) GetSource ¶ added in v0.4.20

func (m *MeterCreditEvent) GetSource() string

func (*MeterCreditEvent) GetTimestamp ¶ added in v0.4.20

func (m *MeterCreditEvent) GetTimestamp() time.Time

func (MeterCreditEvent) MarshalJSON ¶ added in v0.4.20

func (m MeterCreditEvent) MarshalJSON() ([]byte, error)

func (*MeterCreditEvent) UnmarshalJSON ¶ added in v0.4.20

func (m *MeterCreditEvent) UnmarshalJSON(data []byte) error

type MeterCreditedMetadata ¶ added in v0.4.20

type MeterCreditedMetadata struct {
	MeterID  string `json:"meter_id"`
	Units    int64  `json:"units"`
	Rollover bool   `json:"rollover"`
}

func (*MeterCreditedMetadata) GetMeterID ¶ added in v0.4.20

func (m *MeterCreditedMetadata) GetMeterID() string

func (*MeterCreditedMetadata) GetRollover ¶ added in v0.4.20

func (m *MeterCreditedMetadata) GetRollover() bool

func (*MeterCreditedMetadata) GetUnits ¶ added in v0.4.20

func (m *MeterCreditedMetadata) GetUnits() int64

func (MeterCreditedMetadata) MarshalJSON ¶ added in v0.8.4

func (m MeterCreditedMetadata) MarshalJSON() ([]byte, error)

func (*MeterCreditedMetadata) UnmarshalJSON ¶ added in v0.8.4

func (m *MeterCreditedMetadata) UnmarshalJSON(data []byte) error

type MeterQuantities ¶ added in v0.1.8

type MeterQuantities struct {
	Quantities []MeterQuantity `json:"quantities"`
	// The total quantity for the period.
	Total float64 `json:"total"`
}

func (*MeterQuantities) GetQuantities ¶ added in v0.1.8

func (m *MeterQuantities) GetQuantities() []MeterQuantity

func (*MeterQuantities) GetTotal ¶ added in v0.4.10

func (m *MeterQuantities) GetTotal() float64

type MeterQuantity ¶ added in v0.1.8

type MeterQuantity struct {
	// The timestamp for the current period.
	Timestamp time.Time `json:"timestamp"`
	// The quantity for the current period.
	Quantity float64 `json:"quantity"`
}

func (*MeterQuantity) GetQuantity ¶ added in v0.1.8

func (m *MeterQuantity) GetQuantity() float64

func (*MeterQuantity) GetTimestamp ¶ added in v0.1.8

func (m *MeterQuantity) GetTimestamp() time.Time

func (MeterQuantity) MarshalJSON ¶ added in v0.1.8

func (m MeterQuantity) MarshalJSON() ([]byte, error)

func (*MeterQuantity) UnmarshalJSON ¶ added in v0.1.8

func (m *MeterQuantity) UnmarshalJSON(data []byte) error

type MeterResetEvent ¶ added in v0.4.20

type MeterResetEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata MeterResetMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

MeterResetEvent - An event created by Polar when a customer meter is reset.

func (*MeterResetEvent) GetChildCount ¶ added in v0.12.0

func (m *MeterResetEvent) GetChildCount() *int64

func (*MeterResetEvent) GetCustomer ¶ added in v0.4.20

func (m *MeterResetEvent) GetCustomer() *Customer

func (*MeterResetEvent) GetCustomerID ¶ added in v0.4.20

func (m *MeterResetEvent) GetCustomerID() *string

func (*MeterResetEvent) GetCustomerIndividual ¶ added in v0.16.0

func (m *MeterResetEvent) GetCustomerIndividual() *CustomerIndividual

func (*MeterResetEvent) GetCustomerTeam ¶ added in v0.16.0

func (m *MeterResetEvent) GetCustomerTeam() *CustomerTeam

func (*MeterResetEvent) GetExternalCustomerID ¶ added in v0.4.20

func (m *MeterResetEvent) GetExternalCustomerID() *string

func (*MeterResetEvent) GetExternalMemberID ¶ added in v0.13.0

func (m *MeterResetEvent) GetExternalMemberID() *string

func (*MeterResetEvent) GetID ¶ added in v0.4.20

func (m *MeterResetEvent) GetID() string

func (*MeterResetEvent) GetLabel ¶ added in v0.13.0

func (m *MeterResetEvent) GetLabel() string

func (*MeterResetEvent) GetMemberID ¶ added in v0.13.0

func (m *MeterResetEvent) GetMemberID() *string

func (*MeterResetEvent) GetMetadata ¶ added in v0.4.20

func (m *MeterResetEvent) GetMetadata() MeterResetMetadata

func (*MeterResetEvent) GetName ¶ added in v0.4.20

func (m *MeterResetEvent) GetName() string

func (*MeterResetEvent) GetOrganizationID ¶ added in v0.4.20

func (m *MeterResetEvent) GetOrganizationID() string

func (*MeterResetEvent) GetParentID ¶ added in v0.13.0

func (m *MeterResetEvent) GetParentID() *string

func (*MeterResetEvent) GetSource ¶ added in v0.4.20

func (m *MeterResetEvent) GetSource() string

func (*MeterResetEvent) GetTimestamp ¶ added in v0.4.20

func (m *MeterResetEvent) GetTimestamp() time.Time

func (MeterResetEvent) MarshalJSON ¶ added in v0.4.20

func (m MeterResetEvent) MarshalJSON() ([]byte, error)

func (*MeterResetEvent) UnmarshalJSON ¶ added in v0.4.20

func (m *MeterResetEvent) UnmarshalJSON(data []byte) error

type MeterResetMetadata ¶ added in v0.4.20

type MeterResetMetadata struct {
	MeterID string `json:"meter_id"`
}

func (*MeterResetMetadata) GetMeterID ¶ added in v0.4.20

func (m *MeterResetMetadata) GetMeterID() string

func (MeterResetMetadata) MarshalJSON ¶ added in v0.8.4

func (m MeterResetMetadata) MarshalJSON() ([]byte, error)

func (*MeterResetMetadata) UnmarshalJSON ¶ added in v0.8.4

func (m *MeterResetMetadata) UnmarshalJSON(data []byte) error

type MeterSortProperty ¶ added in v0.1.8

type MeterSortProperty string
const (
	MeterSortPropertyCreatedAt      MeterSortProperty = "created_at"
	MeterSortPropertyMinusCreatedAt MeterSortProperty = "-created_at"
	MeterSortPropertyName           MeterSortProperty = "name"
	MeterSortPropertyMinusName      MeterSortProperty = "-name"
)

func (MeterSortProperty) ToPointer ¶ added in v0.1.8

func (e MeterSortProperty) ToPointer() *MeterSortProperty

func (*MeterSortProperty) UnmarshalJSON ¶ added in v0.1.8

func (e *MeterSortProperty) UnmarshalJSON(data []byte) error

type MeterUpdate ¶ added in v0.1.8

type MeterUpdate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]MeterUpdateMetadata `json:"metadata,omitempty"`
	// The name of the meter. Will be shown on customer's invoices and usage.
	Name *string `json:"name,omitempty"`
	// The filter to apply on events that'll be used to calculate the meter.
	Filter *Filter `json:"filter,omitempty"`
	// The aggregation to apply on the filtered events to calculate the meter.
	Aggregation *Aggregation `json:"aggregation,omitempty"`
	// Whether the meter is archived. Archived meters are no longer used for billing.
	IsArchived *bool `json:"is_archived,omitempty"`
}

func (*MeterUpdate) GetAggregation ¶ added in v0.1.8

func (m *MeterUpdate) GetAggregation() *Aggregation

func (*MeterUpdate) GetAggregationAvg ¶ added in v0.1.8

func (m *MeterUpdate) GetAggregationAvg() *PropertyAggregation

func (*MeterUpdate) GetAggregationCount ¶ added in v0.1.8

func (m *MeterUpdate) GetAggregationCount() *CountAggregation

func (*MeterUpdate) GetAggregationMax ¶ added in v0.1.8

func (m *MeterUpdate) GetAggregationMax() *PropertyAggregation

func (*MeterUpdate) GetAggregationMin ¶ added in v0.1.8

func (m *MeterUpdate) GetAggregationMin() *PropertyAggregation

func (*MeterUpdate) GetAggregationSum ¶ added in v0.1.8

func (m *MeterUpdate) GetAggregationSum() *PropertyAggregation

func (*MeterUpdate) GetAggregationUnique ¶ added in v0.8.3

func (m *MeterUpdate) GetAggregationUnique() *UniqueAggregation

func (*MeterUpdate) GetFilter ¶ added in v0.1.8

func (m *MeterUpdate) GetFilter() *Filter

func (*MeterUpdate) GetIsArchived ¶ added in v0.8.4

func (m *MeterUpdate) GetIsArchived() *bool

func (*MeterUpdate) GetMetadata ¶ added in v0.1.8

func (m *MeterUpdate) GetMetadata() map[string]MeterUpdateMetadata

func (*MeterUpdate) GetName ¶ added in v0.1.8

func (m *MeterUpdate) GetName() *string

type MeterUpdateMetadata ¶ added in v0.1.8

type MeterUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type MeterUpdateMetadataType
}

func CreateMeterUpdateMetadataBoolean ¶ added in v0.1.8

func CreateMeterUpdateMetadataBoolean(boolean bool) MeterUpdateMetadata

func CreateMeterUpdateMetadataInteger ¶ added in v0.1.8

func CreateMeterUpdateMetadataInteger(integer int64) MeterUpdateMetadata

func CreateMeterUpdateMetadataNumber ¶ added in v0.4.12

func CreateMeterUpdateMetadataNumber(number float64) MeterUpdateMetadata

func CreateMeterUpdateMetadataStr ¶ added in v0.1.8

func CreateMeterUpdateMetadataStr(str string) MeterUpdateMetadata

func (MeterUpdateMetadata) MarshalJSON ¶ added in v0.1.8

func (u MeterUpdateMetadata) MarshalJSON() ([]byte, error)

func (*MeterUpdateMetadata) UnmarshalJSON ¶ added in v0.1.8

func (u *MeterUpdateMetadata) UnmarshalJSON(data []byte) error

type MeterUpdateMetadataType ¶ added in v0.1.8

type MeterUpdateMetadataType string
const (
	MeterUpdateMetadataTypeStr     MeterUpdateMetadataType = "str"
	MeterUpdateMetadataTypeInteger MeterUpdateMetadataType = "integer"
	MeterUpdateMetadataTypeNumber  MeterUpdateMetadataType = "number"
	MeterUpdateMetadataTypeBoolean MeterUpdateMetadataType = "boolean"
)

type Metric ¶

type Metric struct {
	// Unique identifier for the metric.
	Slug string `json:"slug"`
	// Human-readable name for the metric.
	DisplayName string     `json:"display_name"`
	Type        MetricType `json:"type"`
}

Metric - Information about a metric.

func (*Metric) GetDisplayName ¶

func (m *Metric) GetDisplayName() string

func (*Metric) GetSlug ¶

func (m *Metric) GetSlug() string

func (*Metric) GetType ¶

func (m *Metric) GetType() MetricType

type MetricDashboardCreate ¶ added in v0.16.0

type MetricDashboardCreate struct {
	// Display name for the dashboard.
	Name string `json:"name"`
	// List of metric slugs to display in this dashboard.
	Metrics []string `json:"metrics,omitempty"`
	// The ID of the organization owning this dashboard. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
}

MetricDashboardCreate - Schema for creating a metrics dashboard.

func (*MetricDashboardCreate) GetMetrics ¶ added in v0.16.0

func (m *MetricDashboardCreate) GetMetrics() []string

func (*MetricDashboardCreate) GetName ¶ added in v0.16.0

func (m *MetricDashboardCreate) GetName() string

func (*MetricDashboardCreate) GetOrganizationID ¶ added in v0.16.0

func (m *MetricDashboardCreate) GetOrganizationID() *string

type MetricDashboardSchema ¶ added in v0.16.0

type MetricDashboardSchema struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// Display name for the dashboard.
	Name string `json:"name"`
	// List of metric slugs displayed in this dashboard.
	Metrics []string `json:"metrics"`
	// The ID of the organization owning this dashboard.
	OrganizationID string `json:"organization_id"`
}

MetricDashboardSchema - A user-defined metrics dashboard.

func (*MetricDashboardSchema) GetCreatedAt ¶ added in v0.16.0

func (m *MetricDashboardSchema) GetCreatedAt() time.Time

func (*MetricDashboardSchema) GetID ¶ added in v0.16.0

func (m *MetricDashboardSchema) GetID() string

func (*MetricDashboardSchema) GetMetrics ¶ added in v0.16.0

func (m *MetricDashboardSchema) GetMetrics() []string

func (*MetricDashboardSchema) GetModifiedAt ¶ added in v0.16.0

func (m *MetricDashboardSchema) GetModifiedAt() *time.Time

func (*MetricDashboardSchema) GetName ¶ added in v0.16.0

func (m *MetricDashboardSchema) GetName() string

func (*MetricDashboardSchema) GetOrganizationID ¶ added in v0.16.0

func (m *MetricDashboardSchema) GetOrganizationID() string

func (MetricDashboardSchema) MarshalJSON ¶ added in v0.16.0

func (m MetricDashboardSchema) MarshalJSON() ([]byte, error)

func (*MetricDashboardSchema) UnmarshalJSON ¶ added in v0.16.0

func (m *MetricDashboardSchema) UnmarshalJSON(data []byte) error

type MetricDashboardUpdate ¶ added in v0.16.0

type MetricDashboardUpdate struct {
	// Display name for the dashboard.
	Name *string `json:"name,omitempty"`
	// List of metric slugs to display in this dashboard.
	Metrics []string `json:"metrics,omitempty"`
}

MetricDashboardUpdate - Schema for updating a metrics dashboard.

func (*MetricDashboardUpdate) GetMetrics ¶ added in v0.16.0

func (m *MetricDashboardUpdate) GetMetrics() []string

func (*MetricDashboardUpdate) GetName ¶ added in v0.16.0

func (m *MetricDashboardUpdate) GetName() *string

type MetricPeriod ¶

type MetricPeriod struct {
	// Timestamp of this period data.
	Timestamp                            time.Time                             `json:"timestamp"`
	ActiveSubscriptions                  *ActiveSubscriptions                  `json:"active_subscriptions,omitempty"`
	CommittedSubscriptions               *CommittedSubscriptions               `json:"committed_subscriptions,omitempty"`
	MonthlyRecurringRevenue              *MonthlyRecurringRevenue              `json:"monthly_recurring_revenue,omitempty"`
	CommittedMonthlyRecurringRevenue     *CommittedMonthlyRecurringRevenue     `json:"committed_monthly_recurring_revenue,omitempty"`
	AverageRevenuePerUser                *AverageRevenuePerUser                `json:"average_revenue_per_user,omitempty"`
	Checkouts                            *Checkouts                            `json:"checkouts,omitempty"`
	SucceededCheckouts                   *SucceededCheckouts                   `json:"succeeded_checkouts,omitempty"`
	ChurnedSubscriptions                 *ChurnedSubscriptions                 `json:"churned_subscriptions,omitempty"`
	ChurnRate                            *ChurnRate                            `json:"churn_rate,omitempty"`
	Orders                               *Orders                               `json:"orders,omitempty"`
	Revenue                              *Revenue                              `json:"revenue,omitempty"`
	NetRevenue                           *NetRevenue                           `json:"net_revenue,omitempty"`
	CumulativeRevenue                    *CumulativeRevenue                    `json:"cumulative_revenue,omitempty"`
	NetCumulativeRevenue                 *NetCumulativeRevenue                 `json:"net_cumulative_revenue,omitempty"`
	Costs                                *Costs                                `json:"costs,omitempty"`
	CumulativeCosts                      *CumulativeCosts                      `json:"cumulative_costs,omitempty"`
	AverageOrderValue                    *AverageOrderValue                    `json:"average_order_value,omitempty"`
	NetAverageOrderValue                 *NetAverageOrderValue                 `json:"net_average_order_value,omitempty"`
	CostPerUser                          *CostPerUser                          `json:"cost_per_user,omitempty"`
	ActiveUserByEvent                    *ActiveUserByEvent                    `json:"active_user_by_event,omitempty"`
	OneTimeProducts                      *OneTimeProducts                      `json:"one_time_products,omitempty"`
	OneTimeProductsRevenue               *OneTimeProductsRevenue               `json:"one_time_products_revenue,omitempty"`
	OneTimeProductsNetRevenue            *OneTimeProductsNetRevenue            `json:"one_time_products_net_revenue,omitempty"`
	NewSubscriptions                     *NewSubscriptions                     `json:"new_subscriptions,omitempty"`
	NewSubscriptionsRevenue              *NewSubscriptionsRevenue              `json:"new_subscriptions_revenue,omitempty"`
	NewSubscriptionsNetRevenue           *NewSubscriptionsNetRevenue           `json:"new_subscriptions_net_revenue,omitempty"`
	RenewedSubscriptions                 *RenewedSubscriptions                 `json:"renewed_subscriptions,omitempty"`
	RenewedSubscriptionsRevenue          *RenewedSubscriptionsRevenue          `json:"renewed_subscriptions_revenue,omitempty"`
	RenewedSubscriptionsNetRevenue       *RenewedSubscriptionsNetRevenue       `json:"renewed_subscriptions_net_revenue,omitempty"`
	CanceledSubscriptions                *CanceledSubscriptions                `json:"canceled_subscriptions,omitempty"`
	CanceledSubscriptionsCustomerService *CanceledSubscriptionsCustomerService `json:"canceled_subscriptions_customer_service,omitempty"`
	CanceledSubscriptionsLowQuality      *CanceledSubscriptionsLowQuality      `json:"canceled_subscriptions_low_quality,omitempty"`
	CanceledSubscriptionsMissingFeatures *CanceledSubscriptionsMissingFeatures `json:"canceled_subscriptions_missing_features,omitempty"`
	CanceledSubscriptionsSwitchedService *CanceledSubscriptionsSwitchedService `json:"canceled_subscriptions_switched_service,omitempty"`
	CanceledSubscriptionsTooComplex      *CanceledSubscriptionsTooComplex      `json:"canceled_subscriptions_too_complex,omitempty"`
	CanceledSubscriptionsTooExpensive    *CanceledSubscriptionsTooExpensive    `json:"canceled_subscriptions_too_expensive,omitempty"`
	CanceledSubscriptionsUnused          *CanceledSubscriptionsUnused          `json:"canceled_subscriptions_unused,omitempty"`
	CanceledSubscriptionsOther           *CanceledSubscriptionsOther           `json:"canceled_subscriptions_other,omitempty"`
	CheckoutsConversion                  *CheckoutsConversion                  `json:"checkouts_conversion,omitempty"`
	Ltv                                  *Ltv                                  `json:"ltv,omitempty"`
	GrossMargin                          *GrossMargin                          `json:"gross_margin,omitempty"`
	GrossMarginPercentage                *GrossMarginPercentage                `json:"gross_margin_percentage,omitempty"`
	Cashflow                             *Cashflow                             `json:"cashflow,omitempty"`
}

func (*MetricPeriod) GetActiveSubscriptions ¶

func (m *MetricPeriod) GetActiveSubscriptions() *ActiveSubscriptions

func (*MetricPeriod) GetActiveUserByEvent ¶ added in v0.12.0

func (m *MetricPeriod) GetActiveUserByEvent() *ActiveUserByEvent

func (*MetricPeriod) GetAverageOrderValue ¶

func (m *MetricPeriod) GetAverageOrderValue() *AverageOrderValue

func (*MetricPeriod) GetAverageRevenuePerUser ¶ added in v0.12.0

func (m *MetricPeriod) GetAverageRevenuePerUser() *AverageRevenuePerUser

func (*MetricPeriod) GetCanceledSubscriptions ¶ added in v0.9.0

func (m *MetricPeriod) GetCanceledSubscriptions() *CanceledSubscriptions

func (*MetricPeriod) GetCanceledSubscriptionsCustomerService ¶ added in v0.9.0

func (m *MetricPeriod) GetCanceledSubscriptionsCustomerService() *CanceledSubscriptionsCustomerService

func (*MetricPeriod) GetCanceledSubscriptionsLowQuality ¶ added in v0.9.0

func (m *MetricPeriod) GetCanceledSubscriptionsLowQuality() *CanceledSubscriptionsLowQuality

func (*MetricPeriod) GetCanceledSubscriptionsMissingFeatures ¶ added in v0.9.0

func (m *MetricPeriod) GetCanceledSubscriptionsMissingFeatures() *CanceledSubscriptionsMissingFeatures

func (*MetricPeriod) GetCanceledSubscriptionsOther ¶ added in v0.9.0

func (m *MetricPeriod) GetCanceledSubscriptionsOther() *CanceledSubscriptionsOther

func (*MetricPeriod) GetCanceledSubscriptionsSwitchedService ¶ added in v0.9.0

func (m *MetricPeriod) GetCanceledSubscriptionsSwitchedService() *CanceledSubscriptionsSwitchedService

func (*MetricPeriod) GetCanceledSubscriptionsTooComplex ¶ added in v0.9.0

func (m *MetricPeriod) GetCanceledSubscriptionsTooComplex() *CanceledSubscriptionsTooComplex

func (*MetricPeriod) GetCanceledSubscriptionsTooExpensive ¶ added in v0.9.0

func (m *MetricPeriod) GetCanceledSubscriptionsTooExpensive() *CanceledSubscriptionsTooExpensive

func (*MetricPeriod) GetCanceledSubscriptionsUnused ¶ added in v0.9.0

func (m *MetricPeriod) GetCanceledSubscriptionsUnused() *CanceledSubscriptionsUnused

func (*MetricPeriod) GetCashflow ¶ added in v0.12.0

func (m *MetricPeriod) GetCashflow() *Cashflow

func (*MetricPeriod) GetCheckouts ¶ added in v0.4.17

func (m *MetricPeriod) GetCheckouts() *Checkouts

func (*MetricPeriod) GetCheckoutsConversion ¶ added in v0.4.17

func (m *MetricPeriod) GetCheckoutsConversion() *CheckoutsConversion

func (*MetricPeriod) GetChurnRate ¶ added in v0.12.0

func (m *MetricPeriod) GetChurnRate() *ChurnRate

func (*MetricPeriod) GetChurnedSubscriptions ¶ added in v0.13.0

func (m *MetricPeriod) GetChurnedSubscriptions() *ChurnedSubscriptions

func (*MetricPeriod) GetCommittedMonthlyRecurringRevenue ¶ added in v0.8.0

func (m *MetricPeriod) GetCommittedMonthlyRecurringRevenue() *CommittedMonthlyRecurringRevenue

func (*MetricPeriod) GetCommittedSubscriptions ¶ added in v0.13.0

func (m *MetricPeriod) GetCommittedSubscriptions() *CommittedSubscriptions

func (*MetricPeriod) GetCostPerUser ¶ added in v0.12.0

func (m *MetricPeriod) GetCostPerUser() *CostPerUser

func (*MetricPeriod) GetCosts ¶ added in v0.12.0

func (m *MetricPeriod) GetCosts() *Costs

func (*MetricPeriod) GetCumulativeCosts ¶ added in v0.12.0

func (m *MetricPeriod) GetCumulativeCosts() *CumulativeCosts

func (*MetricPeriod) GetCumulativeRevenue ¶ added in v0.1.5

func (m *MetricPeriod) GetCumulativeRevenue() *CumulativeRevenue

func (*MetricPeriod) GetGrossMargin ¶ added in v0.12.0

func (m *MetricPeriod) GetGrossMargin() *GrossMargin

func (*MetricPeriod) GetGrossMarginPercentage ¶ added in v0.12.0

func (m *MetricPeriod) GetGrossMarginPercentage() *GrossMarginPercentage

func (*MetricPeriod) GetLtv ¶ added in v0.13.0

func (m *MetricPeriod) GetLtv() *Ltv

func (*MetricPeriod) GetMonthlyRecurringRevenue ¶

func (m *MetricPeriod) GetMonthlyRecurringRevenue() *MonthlyRecurringRevenue

func (*MetricPeriod) GetNetAverageOrderValue ¶ added in v0.8.1

func (m *MetricPeriod) GetNetAverageOrderValue() *NetAverageOrderValue

func (*MetricPeriod) GetNetCumulativeRevenue ¶ added in v0.8.1

func (m *MetricPeriod) GetNetCumulativeRevenue() *NetCumulativeRevenue

func (*MetricPeriod) GetNetRevenue ¶ added in v0.8.1

func (m *MetricPeriod) GetNetRevenue() *NetRevenue

func (*MetricPeriod) GetNewSubscriptions ¶

func (m *MetricPeriod) GetNewSubscriptions() *NewSubscriptions

func (*MetricPeriod) GetNewSubscriptionsNetRevenue ¶ added in v0.8.1

func (m *MetricPeriod) GetNewSubscriptionsNetRevenue() *NewSubscriptionsNetRevenue

func (*MetricPeriod) GetNewSubscriptionsRevenue ¶

func (m *MetricPeriod) GetNewSubscriptionsRevenue() *NewSubscriptionsRevenue

func (*MetricPeriod) GetOneTimeProducts ¶

func (m *MetricPeriod) GetOneTimeProducts() *OneTimeProducts

func (*MetricPeriod) GetOneTimeProductsNetRevenue ¶ added in v0.8.1

func (m *MetricPeriod) GetOneTimeProductsNetRevenue() *OneTimeProductsNetRevenue

func (*MetricPeriod) GetOneTimeProductsRevenue ¶

func (m *MetricPeriod) GetOneTimeProductsRevenue() *OneTimeProductsRevenue

func (*MetricPeriod) GetOrders ¶

func (m *MetricPeriod) GetOrders() *Orders

func (*MetricPeriod) GetRenewedSubscriptions ¶

func (m *MetricPeriod) GetRenewedSubscriptions() *RenewedSubscriptions

func (*MetricPeriod) GetRenewedSubscriptionsNetRevenue ¶ added in v0.8.1

func (m *MetricPeriod) GetRenewedSubscriptionsNetRevenue() *RenewedSubscriptionsNetRevenue

func (*MetricPeriod) GetRenewedSubscriptionsRevenue ¶

func (m *MetricPeriod) GetRenewedSubscriptionsRevenue() *RenewedSubscriptionsRevenue

func (*MetricPeriod) GetRevenue ¶

func (m *MetricPeriod) GetRevenue() *Revenue

func (*MetricPeriod) GetSucceededCheckouts ¶ added in v0.4.17

func (m *MetricPeriod) GetSucceededCheckouts() *SucceededCheckouts

func (*MetricPeriod) GetTimestamp ¶

func (m *MetricPeriod) GetTimestamp() time.Time

func (MetricPeriod) MarshalJSON ¶

func (m MetricPeriod) MarshalJSON() ([]byte, error)

func (*MetricPeriod) UnmarshalJSON ¶

func (m *MetricPeriod) UnmarshalJSON(data []byte) error

type MetricType ¶

type MetricType string
const (
	MetricTypeScalar          MetricType = "scalar"
	MetricTypeCurrency        MetricType = "currency"
	MetricTypeCurrencySubCent MetricType = "currency_sub_cent"
	MetricTypePercentage      MetricType = "percentage"
)

func (MetricType) ToPointer ¶

func (e MetricType) ToPointer() *MetricType

func (*MetricType) UnmarshalJSON ¶

func (e *MetricType) UnmarshalJSON(data []byte) error

type Metrics ¶

type Metrics struct {
	ActiveSubscriptions                  *Metric `json:"active_subscriptions,omitempty"`
	CommittedSubscriptions               *Metric `json:"committed_subscriptions,omitempty"`
	MonthlyRecurringRevenue              *Metric `json:"monthly_recurring_revenue,omitempty"`
	CommittedMonthlyRecurringRevenue     *Metric `json:"committed_monthly_recurring_revenue,omitempty"`
	AverageRevenuePerUser                *Metric `json:"average_revenue_per_user,omitempty"`
	Checkouts                            *Metric `json:"checkouts,omitempty"`
	SucceededCheckouts                   *Metric `json:"succeeded_checkouts,omitempty"`
	ChurnedSubscriptions                 *Metric `json:"churned_subscriptions,omitempty"`
	ChurnRate                            *Metric `json:"churn_rate,omitempty"`
	Orders                               *Metric `json:"orders,omitempty"`
	Revenue                              *Metric `json:"revenue,omitempty"`
	NetRevenue                           *Metric `json:"net_revenue,omitempty"`
	CumulativeRevenue                    *Metric `json:"cumulative_revenue,omitempty"`
	NetCumulativeRevenue                 *Metric `json:"net_cumulative_revenue,omitempty"`
	Costs                                *Metric `json:"costs,omitempty"`
	CumulativeCosts                      *Metric `json:"cumulative_costs,omitempty"`
	AverageOrderValue                    *Metric `json:"average_order_value,omitempty"`
	NetAverageOrderValue                 *Metric `json:"net_average_order_value,omitempty"`
	CostPerUser                          *Metric `json:"cost_per_user,omitempty"`
	ActiveUserByEvent                    *Metric `json:"active_user_by_event,omitempty"`
	OneTimeProducts                      *Metric `json:"one_time_products,omitempty"`
	OneTimeProductsRevenue               *Metric `json:"one_time_products_revenue,omitempty"`
	OneTimeProductsNetRevenue            *Metric `json:"one_time_products_net_revenue,omitempty"`
	NewSubscriptions                     *Metric `json:"new_subscriptions,omitempty"`
	NewSubscriptionsRevenue              *Metric `json:"new_subscriptions_revenue,omitempty"`
	NewSubscriptionsNetRevenue           *Metric `json:"new_subscriptions_net_revenue,omitempty"`
	RenewedSubscriptions                 *Metric `json:"renewed_subscriptions,omitempty"`
	RenewedSubscriptionsRevenue          *Metric `json:"renewed_subscriptions_revenue,omitempty"`
	RenewedSubscriptionsNetRevenue       *Metric `json:"renewed_subscriptions_net_revenue,omitempty"`
	CanceledSubscriptions                *Metric `json:"canceled_subscriptions,omitempty"`
	CanceledSubscriptionsCustomerService *Metric `json:"canceled_subscriptions_customer_service,omitempty"`
	CanceledSubscriptionsLowQuality      *Metric `json:"canceled_subscriptions_low_quality,omitempty"`
	CanceledSubscriptionsMissingFeatures *Metric `json:"canceled_subscriptions_missing_features,omitempty"`
	CanceledSubscriptionsSwitchedService *Metric `json:"canceled_subscriptions_switched_service,omitempty"`
	CanceledSubscriptionsTooComplex      *Metric `json:"canceled_subscriptions_too_complex,omitempty"`
	CanceledSubscriptionsTooExpensive    *Metric `json:"canceled_subscriptions_too_expensive,omitempty"`
	CanceledSubscriptionsUnused          *Metric `json:"canceled_subscriptions_unused,omitempty"`
	CanceledSubscriptionsOther           *Metric `json:"canceled_subscriptions_other,omitempty"`
	CheckoutsConversion                  *Metric `json:"checkouts_conversion,omitempty"`
	Ltv                                  *Metric `json:"ltv,omitempty"`
	GrossMargin                          *Metric `json:"gross_margin,omitempty"`
	GrossMarginPercentage                *Metric `json:"gross_margin_percentage,omitempty"`
	Cashflow                             *Metric `json:"cashflow,omitempty"`
}

func (*Metrics) GetActiveSubscriptions ¶

func (m *Metrics) GetActiveSubscriptions() *Metric

func (*Metrics) GetActiveUserByEvent ¶ added in v0.12.0

func (m *Metrics) GetActiveUserByEvent() *Metric

func (*Metrics) GetAverageOrderValue ¶

func (m *Metrics) GetAverageOrderValue() *Metric

func (*Metrics) GetAverageRevenuePerUser ¶ added in v0.12.0

func (m *Metrics) GetAverageRevenuePerUser() *Metric

func (*Metrics) GetCanceledSubscriptions ¶ added in v0.9.0

func (m *Metrics) GetCanceledSubscriptions() *Metric

func (*Metrics) GetCanceledSubscriptionsCustomerService ¶ added in v0.9.0

func (m *Metrics) GetCanceledSubscriptionsCustomerService() *Metric

func (*Metrics) GetCanceledSubscriptionsLowQuality ¶ added in v0.9.0

func (m *Metrics) GetCanceledSubscriptionsLowQuality() *Metric

func (*Metrics) GetCanceledSubscriptionsMissingFeatures ¶ added in v0.9.0

func (m *Metrics) GetCanceledSubscriptionsMissingFeatures() *Metric

func (*Metrics) GetCanceledSubscriptionsOther ¶ added in v0.9.0

func (m *Metrics) GetCanceledSubscriptionsOther() *Metric

func (*Metrics) GetCanceledSubscriptionsSwitchedService ¶ added in v0.9.0

func (m *Metrics) GetCanceledSubscriptionsSwitchedService() *Metric

func (*Metrics) GetCanceledSubscriptionsTooComplex ¶ added in v0.9.0

func (m *Metrics) GetCanceledSubscriptionsTooComplex() *Metric

func (*Metrics) GetCanceledSubscriptionsTooExpensive ¶ added in v0.9.0

func (m *Metrics) GetCanceledSubscriptionsTooExpensive() *Metric

func (*Metrics) GetCanceledSubscriptionsUnused ¶ added in v0.9.0

func (m *Metrics) GetCanceledSubscriptionsUnused() *Metric

func (*Metrics) GetCashflow ¶ added in v0.12.0

func (m *Metrics) GetCashflow() *Metric

func (*Metrics) GetCheckouts ¶ added in v0.4.17

func (m *Metrics) GetCheckouts() *Metric

func (*Metrics) GetCheckoutsConversion ¶ added in v0.4.17

func (m *Metrics) GetCheckoutsConversion() *Metric

func (*Metrics) GetChurnRate ¶ added in v0.12.0

func (m *Metrics) GetChurnRate() *Metric

func (*Metrics) GetChurnedSubscriptions ¶ added in v0.13.0

func (m *Metrics) GetChurnedSubscriptions() *Metric

func (*Metrics) GetCommittedMonthlyRecurringRevenue ¶ added in v0.8.0

func (m *Metrics) GetCommittedMonthlyRecurringRevenue() *Metric

func (*Metrics) GetCommittedSubscriptions ¶ added in v0.13.0

func (m *Metrics) GetCommittedSubscriptions() *Metric

func (*Metrics) GetCostPerUser ¶ added in v0.12.0

func (m *Metrics) GetCostPerUser() *Metric

func (*Metrics) GetCosts ¶ added in v0.12.0

func (m *Metrics) GetCosts() *Metric

func (*Metrics) GetCumulativeCosts ¶ added in v0.12.0

func (m *Metrics) GetCumulativeCosts() *Metric

func (*Metrics) GetCumulativeRevenue ¶ added in v0.1.5

func (m *Metrics) GetCumulativeRevenue() *Metric

func (*Metrics) GetGrossMargin ¶ added in v0.12.0

func (m *Metrics) GetGrossMargin() *Metric

func (*Metrics) GetGrossMarginPercentage ¶ added in v0.12.0

func (m *Metrics) GetGrossMarginPercentage() *Metric

func (*Metrics) GetLtv ¶ added in v0.13.0

func (m *Metrics) GetLtv() *Metric

func (*Metrics) GetMonthlyRecurringRevenue ¶

func (m *Metrics) GetMonthlyRecurringRevenue() *Metric

func (*Metrics) GetNetAverageOrderValue ¶ added in v0.8.1

func (m *Metrics) GetNetAverageOrderValue() *Metric

func (*Metrics) GetNetCumulativeRevenue ¶ added in v0.8.1

func (m *Metrics) GetNetCumulativeRevenue() *Metric

func (*Metrics) GetNetRevenue ¶ added in v0.8.1

func (m *Metrics) GetNetRevenue() *Metric

func (*Metrics) GetNewSubscriptions ¶

func (m *Metrics) GetNewSubscriptions() *Metric

func (*Metrics) GetNewSubscriptionsNetRevenue ¶ added in v0.8.1

func (m *Metrics) GetNewSubscriptionsNetRevenue() *Metric

func (*Metrics) GetNewSubscriptionsRevenue ¶

func (m *Metrics) GetNewSubscriptionsRevenue() *Metric

func (*Metrics) GetOneTimeProducts ¶

func (m *Metrics) GetOneTimeProducts() *Metric

func (*Metrics) GetOneTimeProductsNetRevenue ¶ added in v0.8.1

func (m *Metrics) GetOneTimeProductsNetRevenue() *Metric

func (*Metrics) GetOneTimeProductsRevenue ¶

func (m *Metrics) GetOneTimeProductsRevenue() *Metric

func (*Metrics) GetOrders ¶

func (m *Metrics) GetOrders() *Metric

func (*Metrics) GetRenewedSubscriptions ¶

func (m *Metrics) GetRenewedSubscriptions() *Metric

func (*Metrics) GetRenewedSubscriptionsNetRevenue ¶ added in v0.8.1

func (m *Metrics) GetRenewedSubscriptionsNetRevenue() *Metric

func (*Metrics) GetRenewedSubscriptionsRevenue ¶

func (m *Metrics) GetRenewedSubscriptionsRevenue() *Metric

func (*Metrics) GetRevenue ¶

func (m *Metrics) GetRevenue() *Metric

func (*Metrics) GetSucceededCheckouts ¶ added in v0.4.17

func (m *Metrics) GetSucceededCheckouts() *Metric

type MetricsIntervalLimit ¶

type MetricsIntervalLimit struct {
	// Minimum number of days for this interval.
	MinDays int64 `json:"min_days"`
	// Maximum number of days for this interval.
	MaxDays int64 `json:"max_days"`
}

MetricsIntervalLimit - Date interval limit to get metrics for a given interval.

func (*MetricsIntervalLimit) GetMaxDays ¶

func (m *MetricsIntervalLimit) GetMaxDays() int64

func (*MetricsIntervalLimit) GetMinDays ¶ added in v0.13.0

func (m *MetricsIntervalLimit) GetMinDays() int64

type MetricsIntervalsLimits ¶

type MetricsIntervalsLimits struct {
	// Date interval limit to get metrics for a given interval.
	Hour MetricsIntervalLimit `json:"hour"`
	// Date interval limit to get metrics for a given interval.
	Day MetricsIntervalLimit `json:"day"`
	// Date interval limit to get metrics for a given interval.
	Week MetricsIntervalLimit `json:"week"`
	// Date interval limit to get metrics for a given interval.
	Month MetricsIntervalLimit `json:"month"`
	// Date interval limit to get metrics for a given interval.
	Year MetricsIntervalLimit `json:"year"`
}

MetricsIntervalsLimits - Date interval limits to get metrics for each interval.

func (*MetricsIntervalsLimits) GetDay ¶

func (*MetricsIntervalsLimits) GetHour ¶

func (*MetricsIntervalsLimits) GetMonth ¶

func (*MetricsIntervalsLimits) GetWeek ¶

func (*MetricsIntervalsLimits) GetYear ¶

type MetricsLimits ¶

type MetricsLimits struct {
	// Minimum date to get metrics.
	MinDate types.Date `json:"min_date"`
	// Date interval limits to get metrics for each interval.
	Intervals MetricsIntervalsLimits `json:"intervals"`
}

MetricsLimits - Date limits to get metrics.

func (*MetricsLimits) GetIntervals ¶

func (m *MetricsLimits) GetIntervals() MetricsIntervalsLimits

func (*MetricsLimits) GetMinDate ¶

func (m *MetricsLimits) GetMinDate() types.Date

func (MetricsLimits) MarshalJSON ¶

func (m MetricsLimits) MarshalJSON() ([]byte, error)

func (*MetricsLimits) UnmarshalJSON ¶

func (m *MetricsLimits) UnmarshalJSON(data []byte) error

type MetricsResponse ¶

type MetricsResponse struct {
	// List of data for each timestamp.
	Periods []MetricPeriod `json:"periods"`
	Totals  MetricsTotals  `json:"totals"`
	Metrics Metrics        `json:"metrics"`
}

MetricsResponse - Metrics response schema.

func (*MetricsResponse) GetMetrics ¶

func (m *MetricsResponse) GetMetrics() Metrics

func (*MetricsResponse) GetPeriods ¶

func (m *MetricsResponse) GetPeriods() []MetricPeriod

func (*MetricsResponse) GetTotals ¶ added in v0.4.17

func (m *MetricsResponse) GetTotals() MetricsTotals

type MetricsTotals ¶ added in v0.4.17

type MetricsTotals struct {
	ActiveSubscriptions                  *MetricsTotalsActiveSubscriptions                  `json:"active_subscriptions,omitempty"`
	CommittedSubscriptions               *MetricsTotalsCommittedSubscriptions               `json:"committed_subscriptions,omitempty"`
	MonthlyRecurringRevenue              *MetricsTotalsMonthlyRecurringRevenue              `json:"monthly_recurring_revenue,omitempty"`
	CommittedMonthlyRecurringRevenue     *MetricsTotalsCommittedMonthlyRecurringRevenue     `json:"committed_monthly_recurring_revenue,omitempty"`
	AverageRevenuePerUser                *MetricsTotalsAverageRevenuePerUser                `json:"average_revenue_per_user,omitempty"`
	Checkouts                            *MetricsTotalsCheckouts                            `json:"checkouts,omitempty"`
	SucceededCheckouts                   *MetricsTotalsSucceededCheckouts                   `json:"succeeded_checkouts,omitempty"`
	ChurnedSubscriptions                 *MetricsTotalsChurnedSubscriptions                 `json:"churned_subscriptions,omitempty"`
	ChurnRate                            *MetricsTotalsChurnRate                            `json:"churn_rate,omitempty"`
	Orders                               *MetricsTotalsOrders                               `json:"orders,omitempty"`
	Revenue                              *MetricsTotalsRevenue                              `json:"revenue,omitempty"`
	NetRevenue                           *MetricsTotalsNetRevenue                           `json:"net_revenue,omitempty"`
	CumulativeRevenue                    *MetricsTotalsCumulativeRevenue                    `json:"cumulative_revenue,omitempty"`
	NetCumulativeRevenue                 *MetricsTotalsNetCumulativeRevenue                 `json:"net_cumulative_revenue,omitempty"`
	Costs                                *MetricsTotalsCosts                                `json:"costs,omitempty"`
	CumulativeCosts                      *MetricsTotalsCumulativeCosts                      `json:"cumulative_costs,omitempty"`
	AverageOrderValue                    *MetricsTotalsAverageOrderValue                    `json:"average_order_value,omitempty"`
	NetAverageOrderValue                 *MetricsTotalsNetAverageOrderValue                 `json:"net_average_order_value,omitempty"`
	CostPerUser                          *MetricsTotalsCostPerUser                          `json:"cost_per_user,omitempty"`
	ActiveUserByEvent                    *MetricsTotalsActiveUserByEvent                    `json:"active_user_by_event,omitempty"`
	OneTimeProducts                      *MetricsTotalsOneTimeProducts                      `json:"one_time_products,omitempty"`
	OneTimeProductsRevenue               *MetricsTotalsOneTimeProductsRevenue               `json:"one_time_products_revenue,omitempty"`
	OneTimeProductsNetRevenue            *MetricsTotalsOneTimeProductsNetRevenue            `json:"one_time_products_net_revenue,omitempty"`
	NewSubscriptions                     *MetricsTotalsNewSubscriptions                     `json:"new_subscriptions,omitempty"`
	NewSubscriptionsRevenue              *MetricsTotalsNewSubscriptionsRevenue              `json:"new_subscriptions_revenue,omitempty"`
	NewSubscriptionsNetRevenue           *MetricsTotalsNewSubscriptionsNetRevenue           `json:"new_subscriptions_net_revenue,omitempty"`
	RenewedSubscriptions                 *MetricsTotalsRenewedSubscriptions                 `json:"renewed_subscriptions,omitempty"`
	RenewedSubscriptionsRevenue          *MetricsTotalsRenewedSubscriptionsRevenue          `json:"renewed_subscriptions_revenue,omitempty"`
	RenewedSubscriptionsNetRevenue       *MetricsTotalsRenewedSubscriptionsNetRevenue       `json:"renewed_subscriptions_net_revenue,omitempty"`
	CanceledSubscriptions                *MetricsTotalsCanceledSubscriptions                `json:"canceled_subscriptions,omitempty"`
	CanceledSubscriptionsCustomerService *MetricsTotalsCanceledSubscriptionsCustomerService `json:"canceled_subscriptions_customer_service,omitempty"`
	CanceledSubscriptionsLowQuality      *MetricsTotalsCanceledSubscriptionsLowQuality      `json:"canceled_subscriptions_low_quality,omitempty"`
	CanceledSubscriptionsMissingFeatures *MetricsTotalsCanceledSubscriptionsMissingFeatures `json:"canceled_subscriptions_missing_features,omitempty"`
	CanceledSubscriptionsSwitchedService *MetricsTotalsCanceledSubscriptionsSwitchedService `json:"canceled_subscriptions_switched_service,omitempty"`
	CanceledSubscriptionsTooComplex      *MetricsTotalsCanceledSubscriptionsTooComplex      `json:"canceled_subscriptions_too_complex,omitempty"`
	CanceledSubscriptionsTooExpensive    *MetricsTotalsCanceledSubscriptionsTooExpensive    `json:"canceled_subscriptions_too_expensive,omitempty"`
	CanceledSubscriptionsUnused          *MetricsTotalsCanceledSubscriptionsUnused          `json:"canceled_subscriptions_unused,omitempty"`
	CanceledSubscriptionsOther           *MetricsTotalsCanceledSubscriptionsOther           `json:"canceled_subscriptions_other,omitempty"`
	CheckoutsConversion                  *MetricsTotalsCheckoutsConversion                  `json:"checkouts_conversion,omitempty"`
	Ltv                                  *MetricsTotalsLtv                                  `json:"ltv,omitempty"`
	GrossMargin                          *MetricsTotalsGrossMargin                          `json:"gross_margin,omitempty"`
	GrossMarginPercentage                *MetricsTotalsGrossMarginPercentage                `json:"gross_margin_percentage,omitempty"`
	Cashflow                             *MetricsTotalsCashflow                             `json:"cashflow,omitempty"`
}

func (*MetricsTotals) GetActiveSubscriptions ¶ added in v0.4.17

func (m *MetricsTotals) GetActiveSubscriptions() *MetricsTotalsActiveSubscriptions

func (*MetricsTotals) GetActiveUserByEvent ¶ added in v0.12.0

func (m *MetricsTotals) GetActiveUserByEvent() *MetricsTotalsActiveUserByEvent

func (*MetricsTotals) GetAverageOrderValue ¶ added in v0.4.17

func (m *MetricsTotals) GetAverageOrderValue() *MetricsTotalsAverageOrderValue

func (*MetricsTotals) GetAverageRevenuePerUser ¶ added in v0.12.0

func (m *MetricsTotals) GetAverageRevenuePerUser() *MetricsTotalsAverageRevenuePerUser

func (*MetricsTotals) GetCanceledSubscriptions ¶ added in v0.9.0

func (m *MetricsTotals) GetCanceledSubscriptions() *MetricsTotalsCanceledSubscriptions

func (*MetricsTotals) GetCanceledSubscriptionsCustomerService ¶ added in v0.9.0

func (m *MetricsTotals) GetCanceledSubscriptionsCustomerService() *MetricsTotalsCanceledSubscriptionsCustomerService

func (*MetricsTotals) GetCanceledSubscriptionsLowQuality ¶ added in v0.9.0

func (m *MetricsTotals) GetCanceledSubscriptionsLowQuality() *MetricsTotalsCanceledSubscriptionsLowQuality

func (*MetricsTotals) GetCanceledSubscriptionsMissingFeatures ¶ added in v0.9.0

func (m *MetricsTotals) GetCanceledSubscriptionsMissingFeatures() *MetricsTotalsCanceledSubscriptionsMissingFeatures

func (*MetricsTotals) GetCanceledSubscriptionsOther ¶ added in v0.9.0

func (m *MetricsTotals) GetCanceledSubscriptionsOther() *MetricsTotalsCanceledSubscriptionsOther

func (*MetricsTotals) GetCanceledSubscriptionsSwitchedService ¶ added in v0.9.0

func (m *MetricsTotals) GetCanceledSubscriptionsSwitchedService() *MetricsTotalsCanceledSubscriptionsSwitchedService

func (*MetricsTotals) GetCanceledSubscriptionsTooComplex ¶ added in v0.9.0

func (m *MetricsTotals) GetCanceledSubscriptionsTooComplex() *MetricsTotalsCanceledSubscriptionsTooComplex

func (*MetricsTotals) GetCanceledSubscriptionsTooExpensive ¶ added in v0.9.0

func (m *MetricsTotals) GetCanceledSubscriptionsTooExpensive() *MetricsTotalsCanceledSubscriptionsTooExpensive

func (*MetricsTotals) GetCanceledSubscriptionsUnused ¶ added in v0.9.0

func (m *MetricsTotals) GetCanceledSubscriptionsUnused() *MetricsTotalsCanceledSubscriptionsUnused

func (*MetricsTotals) GetCashflow ¶ added in v0.12.0

func (m *MetricsTotals) GetCashflow() *MetricsTotalsCashflow

func (*MetricsTotals) GetCheckouts ¶ added in v0.4.17

func (m *MetricsTotals) GetCheckouts() *MetricsTotalsCheckouts

func (*MetricsTotals) GetCheckoutsConversion ¶ added in v0.4.17

func (m *MetricsTotals) GetCheckoutsConversion() *MetricsTotalsCheckoutsConversion

func (*MetricsTotals) GetChurnRate ¶ added in v0.12.0

func (m *MetricsTotals) GetChurnRate() *MetricsTotalsChurnRate

func (*MetricsTotals) GetChurnedSubscriptions ¶ added in v0.13.0

func (m *MetricsTotals) GetChurnedSubscriptions() *MetricsTotalsChurnedSubscriptions

func (*MetricsTotals) GetCommittedMonthlyRecurringRevenue ¶ added in v0.8.0

func (m *MetricsTotals) GetCommittedMonthlyRecurringRevenue() *MetricsTotalsCommittedMonthlyRecurringRevenue

func (*MetricsTotals) GetCommittedSubscriptions ¶ added in v0.13.0

func (m *MetricsTotals) GetCommittedSubscriptions() *MetricsTotalsCommittedSubscriptions

func (*MetricsTotals) GetCostPerUser ¶ added in v0.12.0

func (m *MetricsTotals) GetCostPerUser() *MetricsTotalsCostPerUser

func (*MetricsTotals) GetCosts ¶ added in v0.12.0

func (m *MetricsTotals) GetCosts() *MetricsTotalsCosts

func (*MetricsTotals) GetCumulativeCosts ¶ added in v0.12.0

func (m *MetricsTotals) GetCumulativeCosts() *MetricsTotalsCumulativeCosts

func (*MetricsTotals) GetCumulativeRevenue ¶ added in v0.4.17

func (m *MetricsTotals) GetCumulativeRevenue() *MetricsTotalsCumulativeRevenue

func (*MetricsTotals) GetGrossMargin ¶ added in v0.12.0

func (m *MetricsTotals) GetGrossMargin() *MetricsTotalsGrossMargin

func (*MetricsTotals) GetGrossMarginPercentage ¶ added in v0.12.0

func (m *MetricsTotals) GetGrossMarginPercentage() *MetricsTotalsGrossMarginPercentage

func (*MetricsTotals) GetLtv ¶ added in v0.13.0

func (m *MetricsTotals) GetLtv() *MetricsTotalsLtv

func (*MetricsTotals) GetMonthlyRecurringRevenue ¶ added in v0.4.17

func (m *MetricsTotals) GetMonthlyRecurringRevenue() *MetricsTotalsMonthlyRecurringRevenue

func (*MetricsTotals) GetNetAverageOrderValue ¶ added in v0.8.1

func (m *MetricsTotals) GetNetAverageOrderValue() *MetricsTotalsNetAverageOrderValue

func (*MetricsTotals) GetNetCumulativeRevenue ¶ added in v0.8.1

func (m *MetricsTotals) GetNetCumulativeRevenue() *MetricsTotalsNetCumulativeRevenue

func (*MetricsTotals) GetNetRevenue ¶ added in v0.8.1

func (m *MetricsTotals) GetNetRevenue() *MetricsTotalsNetRevenue

func (*MetricsTotals) GetNewSubscriptions ¶ added in v0.4.17

func (m *MetricsTotals) GetNewSubscriptions() *MetricsTotalsNewSubscriptions

func (*MetricsTotals) GetNewSubscriptionsNetRevenue ¶ added in v0.8.1

func (m *MetricsTotals) GetNewSubscriptionsNetRevenue() *MetricsTotalsNewSubscriptionsNetRevenue

func (*MetricsTotals) GetNewSubscriptionsRevenue ¶ added in v0.4.17

func (m *MetricsTotals) GetNewSubscriptionsRevenue() *MetricsTotalsNewSubscriptionsRevenue

func (*MetricsTotals) GetOneTimeProducts ¶ added in v0.4.17

func (m *MetricsTotals) GetOneTimeProducts() *MetricsTotalsOneTimeProducts

func (*MetricsTotals) GetOneTimeProductsNetRevenue ¶ added in v0.8.1

func (m *MetricsTotals) GetOneTimeProductsNetRevenue() *MetricsTotalsOneTimeProductsNetRevenue

func (*MetricsTotals) GetOneTimeProductsRevenue ¶ added in v0.4.17

func (m *MetricsTotals) GetOneTimeProductsRevenue() *MetricsTotalsOneTimeProductsRevenue

func (*MetricsTotals) GetOrders ¶ added in v0.4.17

func (m *MetricsTotals) GetOrders() *MetricsTotalsOrders

func (*MetricsTotals) GetRenewedSubscriptions ¶ added in v0.4.17

func (m *MetricsTotals) GetRenewedSubscriptions() *MetricsTotalsRenewedSubscriptions

func (*MetricsTotals) GetRenewedSubscriptionsNetRevenue ¶ added in v0.8.1

func (m *MetricsTotals) GetRenewedSubscriptionsNetRevenue() *MetricsTotalsRenewedSubscriptionsNetRevenue

func (*MetricsTotals) GetRenewedSubscriptionsRevenue ¶ added in v0.4.17

func (m *MetricsTotals) GetRenewedSubscriptionsRevenue() *MetricsTotalsRenewedSubscriptionsRevenue

func (*MetricsTotals) GetRevenue ¶ added in v0.4.17

func (m *MetricsTotals) GetRevenue() *MetricsTotalsRevenue

func (*MetricsTotals) GetSucceededCheckouts ¶ added in v0.4.17

func (m *MetricsTotals) GetSucceededCheckouts() *MetricsTotalsSucceededCheckouts

type MetricsTotalsActiveSubscriptions ¶ added in v0.4.17

type MetricsTotalsActiveSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsActiveSubscriptionsType
}

func CreateMetricsTotalsActiveSubscriptionsInteger ¶ added in v0.4.17

func CreateMetricsTotalsActiveSubscriptionsInteger(integer int64) MetricsTotalsActiveSubscriptions

func CreateMetricsTotalsActiveSubscriptionsNumber ¶ added in v0.4.17

func CreateMetricsTotalsActiveSubscriptionsNumber(number float64) MetricsTotalsActiveSubscriptions

func (MetricsTotalsActiveSubscriptions) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsActiveSubscriptions) MarshalJSON() ([]byte, error)

func (*MetricsTotalsActiveSubscriptions) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsActiveSubscriptions) UnmarshalJSON(data []byte) error

type MetricsTotalsActiveSubscriptionsType ¶ added in v0.4.17

type MetricsTotalsActiveSubscriptionsType string
const (
	MetricsTotalsActiveSubscriptionsTypeInteger MetricsTotalsActiveSubscriptionsType = "integer"
	MetricsTotalsActiveSubscriptionsTypeNumber  MetricsTotalsActiveSubscriptionsType = "number"
)

type MetricsTotalsActiveUserByEvent ¶ added in v0.12.0

type MetricsTotalsActiveUserByEvent struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsActiveUserByEventType
}

func CreateMetricsTotalsActiveUserByEventInteger ¶ added in v0.12.0

func CreateMetricsTotalsActiveUserByEventInteger(integer int64) MetricsTotalsActiveUserByEvent

func CreateMetricsTotalsActiveUserByEventNumber ¶ added in v0.12.0

func CreateMetricsTotalsActiveUserByEventNumber(number float64) MetricsTotalsActiveUserByEvent

func (MetricsTotalsActiveUserByEvent) MarshalJSON ¶ added in v0.12.0

func (u MetricsTotalsActiveUserByEvent) MarshalJSON() ([]byte, error)

func (*MetricsTotalsActiveUserByEvent) UnmarshalJSON ¶ added in v0.12.0

func (u *MetricsTotalsActiveUserByEvent) UnmarshalJSON(data []byte) error

type MetricsTotalsActiveUserByEventType ¶ added in v0.12.0

type MetricsTotalsActiveUserByEventType string
const (
	MetricsTotalsActiveUserByEventTypeInteger MetricsTotalsActiveUserByEventType = "integer"
	MetricsTotalsActiveUserByEventTypeNumber  MetricsTotalsActiveUserByEventType = "number"
)

type MetricsTotalsAverageOrderValue ¶ added in v0.4.17

type MetricsTotalsAverageOrderValue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsAverageOrderValueType
}

func CreateMetricsTotalsAverageOrderValueInteger ¶ added in v0.4.17

func CreateMetricsTotalsAverageOrderValueInteger(integer int64) MetricsTotalsAverageOrderValue

func CreateMetricsTotalsAverageOrderValueNumber ¶ added in v0.4.17

func CreateMetricsTotalsAverageOrderValueNumber(number float64) MetricsTotalsAverageOrderValue

func (MetricsTotalsAverageOrderValue) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsAverageOrderValue) MarshalJSON() ([]byte, error)

func (*MetricsTotalsAverageOrderValue) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsAverageOrderValue) UnmarshalJSON(data []byte) error

type MetricsTotalsAverageOrderValueType ¶ added in v0.4.17

type MetricsTotalsAverageOrderValueType string
const (
	MetricsTotalsAverageOrderValueTypeInteger MetricsTotalsAverageOrderValueType = "integer"
	MetricsTotalsAverageOrderValueTypeNumber  MetricsTotalsAverageOrderValueType = "number"
)

type MetricsTotalsAverageRevenuePerUser ¶ added in v0.12.0

type MetricsTotalsAverageRevenuePerUser struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsAverageRevenuePerUserType
}

func CreateMetricsTotalsAverageRevenuePerUserInteger ¶ added in v0.12.0

func CreateMetricsTotalsAverageRevenuePerUserInteger(integer int64) MetricsTotalsAverageRevenuePerUser

func CreateMetricsTotalsAverageRevenuePerUserNumber ¶ added in v0.12.0

func CreateMetricsTotalsAverageRevenuePerUserNumber(number float64) MetricsTotalsAverageRevenuePerUser

func (MetricsTotalsAverageRevenuePerUser) MarshalJSON ¶ added in v0.12.0

func (u MetricsTotalsAverageRevenuePerUser) MarshalJSON() ([]byte, error)

func (*MetricsTotalsAverageRevenuePerUser) UnmarshalJSON ¶ added in v0.12.0

func (u *MetricsTotalsAverageRevenuePerUser) UnmarshalJSON(data []byte) error

type MetricsTotalsAverageRevenuePerUserType ¶ added in v0.12.0

type MetricsTotalsAverageRevenuePerUserType string
const (
	MetricsTotalsAverageRevenuePerUserTypeInteger MetricsTotalsAverageRevenuePerUserType = "integer"
	MetricsTotalsAverageRevenuePerUserTypeNumber  MetricsTotalsAverageRevenuePerUserType = "number"
)

type MetricsTotalsCanceledSubscriptions ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCanceledSubscriptionsType
}

func CreateMetricsTotalsCanceledSubscriptionsInteger ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsInteger(integer int64) MetricsTotalsCanceledSubscriptions

func CreateMetricsTotalsCanceledSubscriptionsNumber ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsNumber(number float64) MetricsTotalsCanceledSubscriptions

func (MetricsTotalsCanceledSubscriptions) MarshalJSON ¶ added in v0.9.0

func (u MetricsTotalsCanceledSubscriptions) MarshalJSON() ([]byte, error)

func (*MetricsTotalsCanceledSubscriptions) UnmarshalJSON ¶ added in v0.9.0

func (u *MetricsTotalsCanceledSubscriptions) UnmarshalJSON(data []byte) error

type MetricsTotalsCanceledSubscriptionsCustomerService ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsCustomerService struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCanceledSubscriptionsCustomerServiceType
}

func CreateMetricsTotalsCanceledSubscriptionsCustomerServiceInteger ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsCustomerServiceInteger(integer int64) MetricsTotalsCanceledSubscriptionsCustomerService

func CreateMetricsTotalsCanceledSubscriptionsCustomerServiceNumber ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsCustomerServiceNumber(number float64) MetricsTotalsCanceledSubscriptionsCustomerService

func (MetricsTotalsCanceledSubscriptionsCustomerService) MarshalJSON ¶ added in v0.9.0

func (*MetricsTotalsCanceledSubscriptionsCustomerService) UnmarshalJSON ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsCustomerServiceType ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsCustomerServiceType string
const (
	MetricsTotalsCanceledSubscriptionsCustomerServiceTypeInteger MetricsTotalsCanceledSubscriptionsCustomerServiceType = "integer"
	MetricsTotalsCanceledSubscriptionsCustomerServiceTypeNumber  MetricsTotalsCanceledSubscriptionsCustomerServiceType = "number"
)

type MetricsTotalsCanceledSubscriptionsLowQuality ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsLowQuality struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCanceledSubscriptionsLowQualityType
}

func CreateMetricsTotalsCanceledSubscriptionsLowQualityInteger ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsLowQualityInteger(integer int64) MetricsTotalsCanceledSubscriptionsLowQuality

func CreateMetricsTotalsCanceledSubscriptionsLowQualityNumber ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsLowQualityNumber(number float64) MetricsTotalsCanceledSubscriptionsLowQuality

func (MetricsTotalsCanceledSubscriptionsLowQuality) MarshalJSON ¶ added in v0.9.0

func (*MetricsTotalsCanceledSubscriptionsLowQuality) UnmarshalJSON ¶ added in v0.9.0

func (u *MetricsTotalsCanceledSubscriptionsLowQuality) UnmarshalJSON(data []byte) error

type MetricsTotalsCanceledSubscriptionsLowQualityType ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsLowQualityType string
const (
	MetricsTotalsCanceledSubscriptionsLowQualityTypeInteger MetricsTotalsCanceledSubscriptionsLowQualityType = "integer"
	MetricsTotalsCanceledSubscriptionsLowQualityTypeNumber  MetricsTotalsCanceledSubscriptionsLowQualityType = "number"
)

type MetricsTotalsCanceledSubscriptionsMissingFeatures ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsMissingFeatures struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCanceledSubscriptionsMissingFeaturesType
}

func CreateMetricsTotalsCanceledSubscriptionsMissingFeaturesInteger ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsMissingFeaturesInteger(integer int64) MetricsTotalsCanceledSubscriptionsMissingFeatures

func CreateMetricsTotalsCanceledSubscriptionsMissingFeaturesNumber ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsMissingFeaturesNumber(number float64) MetricsTotalsCanceledSubscriptionsMissingFeatures

func (MetricsTotalsCanceledSubscriptionsMissingFeatures) MarshalJSON ¶ added in v0.9.0

func (*MetricsTotalsCanceledSubscriptionsMissingFeatures) UnmarshalJSON ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsMissingFeaturesType ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsMissingFeaturesType string
const (
	MetricsTotalsCanceledSubscriptionsMissingFeaturesTypeInteger MetricsTotalsCanceledSubscriptionsMissingFeaturesType = "integer"
	MetricsTotalsCanceledSubscriptionsMissingFeaturesTypeNumber  MetricsTotalsCanceledSubscriptionsMissingFeaturesType = "number"
)

type MetricsTotalsCanceledSubscriptionsOther ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsOther struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCanceledSubscriptionsOtherType
}

func CreateMetricsTotalsCanceledSubscriptionsOtherInteger ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsOtherInteger(integer int64) MetricsTotalsCanceledSubscriptionsOther

func CreateMetricsTotalsCanceledSubscriptionsOtherNumber ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsOtherNumber(number float64) MetricsTotalsCanceledSubscriptionsOther

func (MetricsTotalsCanceledSubscriptionsOther) MarshalJSON ¶ added in v0.9.0

func (u MetricsTotalsCanceledSubscriptionsOther) MarshalJSON() ([]byte, error)

func (*MetricsTotalsCanceledSubscriptionsOther) UnmarshalJSON ¶ added in v0.9.0

func (u *MetricsTotalsCanceledSubscriptionsOther) UnmarshalJSON(data []byte) error

type MetricsTotalsCanceledSubscriptionsOtherType ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsOtherType string
const (
	MetricsTotalsCanceledSubscriptionsOtherTypeInteger MetricsTotalsCanceledSubscriptionsOtherType = "integer"
	MetricsTotalsCanceledSubscriptionsOtherTypeNumber  MetricsTotalsCanceledSubscriptionsOtherType = "number"
)

type MetricsTotalsCanceledSubscriptionsSwitchedService ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsSwitchedService struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCanceledSubscriptionsSwitchedServiceType
}

func CreateMetricsTotalsCanceledSubscriptionsSwitchedServiceInteger ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsSwitchedServiceInteger(integer int64) MetricsTotalsCanceledSubscriptionsSwitchedService

func CreateMetricsTotalsCanceledSubscriptionsSwitchedServiceNumber ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsSwitchedServiceNumber(number float64) MetricsTotalsCanceledSubscriptionsSwitchedService

func (MetricsTotalsCanceledSubscriptionsSwitchedService) MarshalJSON ¶ added in v0.9.0

func (*MetricsTotalsCanceledSubscriptionsSwitchedService) UnmarshalJSON ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsSwitchedServiceType ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsSwitchedServiceType string
const (
	MetricsTotalsCanceledSubscriptionsSwitchedServiceTypeInteger MetricsTotalsCanceledSubscriptionsSwitchedServiceType = "integer"
	MetricsTotalsCanceledSubscriptionsSwitchedServiceTypeNumber  MetricsTotalsCanceledSubscriptionsSwitchedServiceType = "number"
)

type MetricsTotalsCanceledSubscriptionsTooComplex ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsTooComplex struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCanceledSubscriptionsTooComplexType
}

func CreateMetricsTotalsCanceledSubscriptionsTooComplexInteger ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsTooComplexInteger(integer int64) MetricsTotalsCanceledSubscriptionsTooComplex

func CreateMetricsTotalsCanceledSubscriptionsTooComplexNumber ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsTooComplexNumber(number float64) MetricsTotalsCanceledSubscriptionsTooComplex

func (MetricsTotalsCanceledSubscriptionsTooComplex) MarshalJSON ¶ added in v0.9.0

func (*MetricsTotalsCanceledSubscriptionsTooComplex) UnmarshalJSON ¶ added in v0.9.0

func (u *MetricsTotalsCanceledSubscriptionsTooComplex) UnmarshalJSON(data []byte) error

type MetricsTotalsCanceledSubscriptionsTooComplexType ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsTooComplexType string
const (
	MetricsTotalsCanceledSubscriptionsTooComplexTypeInteger MetricsTotalsCanceledSubscriptionsTooComplexType = "integer"
	MetricsTotalsCanceledSubscriptionsTooComplexTypeNumber  MetricsTotalsCanceledSubscriptionsTooComplexType = "number"
)

type MetricsTotalsCanceledSubscriptionsTooExpensive ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsTooExpensive struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCanceledSubscriptionsTooExpensiveType
}

func CreateMetricsTotalsCanceledSubscriptionsTooExpensiveInteger ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsTooExpensiveInteger(integer int64) MetricsTotalsCanceledSubscriptionsTooExpensive

func CreateMetricsTotalsCanceledSubscriptionsTooExpensiveNumber ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsTooExpensiveNumber(number float64) MetricsTotalsCanceledSubscriptionsTooExpensive

func (MetricsTotalsCanceledSubscriptionsTooExpensive) MarshalJSON ¶ added in v0.9.0

func (*MetricsTotalsCanceledSubscriptionsTooExpensive) UnmarshalJSON ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsTooExpensiveType ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsTooExpensiveType string
const (
	MetricsTotalsCanceledSubscriptionsTooExpensiveTypeInteger MetricsTotalsCanceledSubscriptionsTooExpensiveType = "integer"
	MetricsTotalsCanceledSubscriptionsTooExpensiveTypeNumber  MetricsTotalsCanceledSubscriptionsTooExpensiveType = "number"
)

type MetricsTotalsCanceledSubscriptionsType ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsType string
const (
	MetricsTotalsCanceledSubscriptionsTypeInteger MetricsTotalsCanceledSubscriptionsType = "integer"
	MetricsTotalsCanceledSubscriptionsTypeNumber  MetricsTotalsCanceledSubscriptionsType = "number"
)

type MetricsTotalsCanceledSubscriptionsUnused ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsUnused struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCanceledSubscriptionsUnusedType
}

func CreateMetricsTotalsCanceledSubscriptionsUnusedInteger ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsUnusedInteger(integer int64) MetricsTotalsCanceledSubscriptionsUnused

func CreateMetricsTotalsCanceledSubscriptionsUnusedNumber ¶ added in v0.9.0

func CreateMetricsTotalsCanceledSubscriptionsUnusedNumber(number float64) MetricsTotalsCanceledSubscriptionsUnused

func (MetricsTotalsCanceledSubscriptionsUnused) MarshalJSON ¶ added in v0.9.0

func (*MetricsTotalsCanceledSubscriptionsUnused) UnmarshalJSON ¶ added in v0.9.0

func (u *MetricsTotalsCanceledSubscriptionsUnused) UnmarshalJSON(data []byte) error

type MetricsTotalsCanceledSubscriptionsUnusedType ¶ added in v0.9.0

type MetricsTotalsCanceledSubscriptionsUnusedType string
const (
	MetricsTotalsCanceledSubscriptionsUnusedTypeInteger MetricsTotalsCanceledSubscriptionsUnusedType = "integer"
	MetricsTotalsCanceledSubscriptionsUnusedTypeNumber  MetricsTotalsCanceledSubscriptionsUnusedType = "number"
)

type MetricsTotalsCashflow ¶ added in v0.12.0

type MetricsTotalsCashflow struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCashflowType
}

func CreateMetricsTotalsCashflowInteger ¶ added in v0.12.0

func CreateMetricsTotalsCashflowInteger(integer int64) MetricsTotalsCashflow

func CreateMetricsTotalsCashflowNumber ¶ added in v0.12.0

func CreateMetricsTotalsCashflowNumber(number float64) MetricsTotalsCashflow

func (MetricsTotalsCashflow) MarshalJSON ¶ added in v0.12.0

func (u MetricsTotalsCashflow) MarshalJSON() ([]byte, error)

func (*MetricsTotalsCashflow) UnmarshalJSON ¶ added in v0.12.0

func (u *MetricsTotalsCashflow) UnmarshalJSON(data []byte) error

type MetricsTotalsCashflowType ¶ added in v0.12.0

type MetricsTotalsCashflowType string
const (
	MetricsTotalsCashflowTypeInteger MetricsTotalsCashflowType = "integer"
	MetricsTotalsCashflowTypeNumber  MetricsTotalsCashflowType = "number"
)

type MetricsTotalsCheckouts ¶ added in v0.4.17

type MetricsTotalsCheckouts struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCheckoutsType
}

func CreateMetricsTotalsCheckoutsInteger ¶ added in v0.4.17

func CreateMetricsTotalsCheckoutsInteger(integer int64) MetricsTotalsCheckouts

func CreateMetricsTotalsCheckoutsNumber ¶ added in v0.4.17

func CreateMetricsTotalsCheckoutsNumber(number float64) MetricsTotalsCheckouts

func (MetricsTotalsCheckouts) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsCheckouts) MarshalJSON() ([]byte, error)

func (*MetricsTotalsCheckouts) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsCheckouts) UnmarshalJSON(data []byte) error

type MetricsTotalsCheckoutsConversion ¶ added in v0.4.17

type MetricsTotalsCheckoutsConversion struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCheckoutsConversionType
}

func CreateMetricsTotalsCheckoutsConversionInteger ¶ added in v0.4.17

func CreateMetricsTotalsCheckoutsConversionInteger(integer int64) MetricsTotalsCheckoutsConversion

func CreateMetricsTotalsCheckoutsConversionNumber ¶ added in v0.4.17

func CreateMetricsTotalsCheckoutsConversionNumber(number float64) MetricsTotalsCheckoutsConversion

func (MetricsTotalsCheckoutsConversion) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsCheckoutsConversion) MarshalJSON() ([]byte, error)

func (*MetricsTotalsCheckoutsConversion) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsCheckoutsConversion) UnmarshalJSON(data []byte) error

type MetricsTotalsCheckoutsConversionType ¶ added in v0.4.17

type MetricsTotalsCheckoutsConversionType string
const (
	MetricsTotalsCheckoutsConversionTypeInteger MetricsTotalsCheckoutsConversionType = "integer"
	MetricsTotalsCheckoutsConversionTypeNumber  MetricsTotalsCheckoutsConversionType = "number"
)

type MetricsTotalsCheckoutsType ¶ added in v0.4.17

type MetricsTotalsCheckoutsType string
const (
	MetricsTotalsCheckoutsTypeInteger MetricsTotalsCheckoutsType = "integer"
	MetricsTotalsCheckoutsTypeNumber  MetricsTotalsCheckoutsType = "number"
)

type MetricsTotalsChurnRate ¶ added in v0.12.0

type MetricsTotalsChurnRate struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsChurnRateType
}

func CreateMetricsTotalsChurnRateInteger ¶ added in v0.12.0

func CreateMetricsTotalsChurnRateInteger(integer int64) MetricsTotalsChurnRate

func CreateMetricsTotalsChurnRateNumber ¶ added in v0.12.0

func CreateMetricsTotalsChurnRateNumber(number float64) MetricsTotalsChurnRate

func (MetricsTotalsChurnRate) MarshalJSON ¶ added in v0.12.0

func (u MetricsTotalsChurnRate) MarshalJSON() ([]byte, error)

func (*MetricsTotalsChurnRate) UnmarshalJSON ¶ added in v0.12.0

func (u *MetricsTotalsChurnRate) UnmarshalJSON(data []byte) error

type MetricsTotalsChurnRateType ¶ added in v0.12.0

type MetricsTotalsChurnRateType string
const (
	MetricsTotalsChurnRateTypeInteger MetricsTotalsChurnRateType = "integer"
	MetricsTotalsChurnRateTypeNumber  MetricsTotalsChurnRateType = "number"
)

type MetricsTotalsChurnedSubscriptions ¶ added in v0.13.0

type MetricsTotalsChurnedSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsChurnedSubscriptionsType
}

func CreateMetricsTotalsChurnedSubscriptionsInteger ¶ added in v0.13.0

func CreateMetricsTotalsChurnedSubscriptionsInteger(integer int64) MetricsTotalsChurnedSubscriptions

func CreateMetricsTotalsChurnedSubscriptionsNumber ¶ added in v0.13.0

func CreateMetricsTotalsChurnedSubscriptionsNumber(number float64) MetricsTotalsChurnedSubscriptions

func (MetricsTotalsChurnedSubscriptions) MarshalJSON ¶ added in v0.13.0

func (u MetricsTotalsChurnedSubscriptions) MarshalJSON() ([]byte, error)

func (*MetricsTotalsChurnedSubscriptions) UnmarshalJSON ¶ added in v0.13.0

func (u *MetricsTotalsChurnedSubscriptions) UnmarshalJSON(data []byte) error

type MetricsTotalsChurnedSubscriptionsType ¶ added in v0.13.0

type MetricsTotalsChurnedSubscriptionsType string
const (
	MetricsTotalsChurnedSubscriptionsTypeInteger MetricsTotalsChurnedSubscriptionsType = "integer"
	MetricsTotalsChurnedSubscriptionsTypeNumber  MetricsTotalsChurnedSubscriptionsType = "number"
)

type MetricsTotalsCommittedMonthlyRecurringRevenue ¶ added in v0.8.0

type MetricsTotalsCommittedMonthlyRecurringRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCommittedMonthlyRecurringRevenueType
}

func CreateMetricsTotalsCommittedMonthlyRecurringRevenueInteger ¶ added in v0.8.0

func CreateMetricsTotalsCommittedMonthlyRecurringRevenueInteger(integer int64) MetricsTotalsCommittedMonthlyRecurringRevenue

func CreateMetricsTotalsCommittedMonthlyRecurringRevenueNumber ¶ added in v0.8.0

func CreateMetricsTotalsCommittedMonthlyRecurringRevenueNumber(number float64) MetricsTotalsCommittedMonthlyRecurringRevenue

func (MetricsTotalsCommittedMonthlyRecurringRevenue) MarshalJSON ¶ added in v0.8.0

func (*MetricsTotalsCommittedMonthlyRecurringRevenue) UnmarshalJSON ¶ added in v0.8.0

func (u *MetricsTotalsCommittedMonthlyRecurringRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsCommittedMonthlyRecurringRevenueType ¶ added in v0.8.0

type MetricsTotalsCommittedMonthlyRecurringRevenueType string
const (
	MetricsTotalsCommittedMonthlyRecurringRevenueTypeInteger MetricsTotalsCommittedMonthlyRecurringRevenueType = "integer"
	MetricsTotalsCommittedMonthlyRecurringRevenueTypeNumber  MetricsTotalsCommittedMonthlyRecurringRevenueType = "number"
)

type MetricsTotalsCommittedSubscriptions ¶ added in v0.13.0

type MetricsTotalsCommittedSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCommittedSubscriptionsType
}

func CreateMetricsTotalsCommittedSubscriptionsInteger ¶ added in v0.13.0

func CreateMetricsTotalsCommittedSubscriptionsInteger(integer int64) MetricsTotalsCommittedSubscriptions

func CreateMetricsTotalsCommittedSubscriptionsNumber ¶ added in v0.13.0

func CreateMetricsTotalsCommittedSubscriptionsNumber(number float64) MetricsTotalsCommittedSubscriptions

func (MetricsTotalsCommittedSubscriptions) MarshalJSON ¶ added in v0.13.0

func (u MetricsTotalsCommittedSubscriptions) MarshalJSON() ([]byte, error)

func (*MetricsTotalsCommittedSubscriptions) UnmarshalJSON ¶ added in v0.13.0

func (u *MetricsTotalsCommittedSubscriptions) UnmarshalJSON(data []byte) error

type MetricsTotalsCommittedSubscriptionsType ¶ added in v0.13.0

type MetricsTotalsCommittedSubscriptionsType string
const (
	MetricsTotalsCommittedSubscriptionsTypeInteger MetricsTotalsCommittedSubscriptionsType = "integer"
	MetricsTotalsCommittedSubscriptionsTypeNumber  MetricsTotalsCommittedSubscriptionsType = "number"
)

type MetricsTotalsCostPerUser ¶ added in v0.12.0

type MetricsTotalsCostPerUser struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCostPerUserType
}

func CreateMetricsTotalsCostPerUserInteger ¶ added in v0.12.0

func CreateMetricsTotalsCostPerUserInteger(integer int64) MetricsTotalsCostPerUser

func CreateMetricsTotalsCostPerUserNumber ¶ added in v0.12.0

func CreateMetricsTotalsCostPerUserNumber(number float64) MetricsTotalsCostPerUser

func (MetricsTotalsCostPerUser) MarshalJSON ¶ added in v0.12.0

func (u MetricsTotalsCostPerUser) MarshalJSON() ([]byte, error)

func (*MetricsTotalsCostPerUser) UnmarshalJSON ¶ added in v0.12.0

func (u *MetricsTotalsCostPerUser) UnmarshalJSON(data []byte) error

type MetricsTotalsCostPerUserType ¶ added in v0.12.0

type MetricsTotalsCostPerUserType string
const (
	MetricsTotalsCostPerUserTypeInteger MetricsTotalsCostPerUserType = "integer"
	MetricsTotalsCostPerUserTypeNumber  MetricsTotalsCostPerUserType = "number"
)

type MetricsTotalsCosts ¶ added in v0.12.0

type MetricsTotalsCosts struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCostsType
}

func CreateMetricsTotalsCostsInteger ¶ added in v0.12.0

func CreateMetricsTotalsCostsInteger(integer int64) MetricsTotalsCosts

func CreateMetricsTotalsCostsNumber ¶ added in v0.12.0

func CreateMetricsTotalsCostsNumber(number float64) MetricsTotalsCosts

func (MetricsTotalsCosts) MarshalJSON ¶ added in v0.12.0

func (u MetricsTotalsCosts) MarshalJSON() ([]byte, error)

func (*MetricsTotalsCosts) UnmarshalJSON ¶ added in v0.12.0

func (u *MetricsTotalsCosts) UnmarshalJSON(data []byte) error

type MetricsTotalsCostsType ¶ added in v0.12.0

type MetricsTotalsCostsType string
const (
	MetricsTotalsCostsTypeInteger MetricsTotalsCostsType = "integer"
	MetricsTotalsCostsTypeNumber  MetricsTotalsCostsType = "number"
)

type MetricsTotalsCumulativeCosts ¶ added in v0.12.0

type MetricsTotalsCumulativeCosts struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCumulativeCostsType
}

func CreateMetricsTotalsCumulativeCostsInteger ¶ added in v0.12.0

func CreateMetricsTotalsCumulativeCostsInteger(integer int64) MetricsTotalsCumulativeCosts

func CreateMetricsTotalsCumulativeCostsNumber ¶ added in v0.12.0

func CreateMetricsTotalsCumulativeCostsNumber(number float64) MetricsTotalsCumulativeCosts

func (MetricsTotalsCumulativeCosts) MarshalJSON ¶ added in v0.12.0

func (u MetricsTotalsCumulativeCosts) MarshalJSON() ([]byte, error)

func (*MetricsTotalsCumulativeCosts) UnmarshalJSON ¶ added in v0.12.0

func (u *MetricsTotalsCumulativeCosts) UnmarshalJSON(data []byte) error

type MetricsTotalsCumulativeCostsType ¶ added in v0.12.0

type MetricsTotalsCumulativeCostsType string
const (
	MetricsTotalsCumulativeCostsTypeInteger MetricsTotalsCumulativeCostsType = "integer"
	MetricsTotalsCumulativeCostsTypeNumber  MetricsTotalsCumulativeCostsType = "number"
)

type MetricsTotalsCumulativeRevenue ¶ added in v0.4.17

type MetricsTotalsCumulativeRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsCumulativeRevenueType
}

func CreateMetricsTotalsCumulativeRevenueInteger ¶ added in v0.4.17

func CreateMetricsTotalsCumulativeRevenueInteger(integer int64) MetricsTotalsCumulativeRevenue

func CreateMetricsTotalsCumulativeRevenueNumber ¶ added in v0.4.17

func CreateMetricsTotalsCumulativeRevenueNumber(number float64) MetricsTotalsCumulativeRevenue

func (MetricsTotalsCumulativeRevenue) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsCumulativeRevenue) MarshalJSON() ([]byte, error)

func (*MetricsTotalsCumulativeRevenue) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsCumulativeRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsCumulativeRevenueType ¶ added in v0.4.17

type MetricsTotalsCumulativeRevenueType string
const (
	MetricsTotalsCumulativeRevenueTypeInteger MetricsTotalsCumulativeRevenueType = "integer"
	MetricsTotalsCumulativeRevenueTypeNumber  MetricsTotalsCumulativeRevenueType = "number"
)

type MetricsTotalsGrossMargin ¶ added in v0.12.0

type MetricsTotalsGrossMargin struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsGrossMarginType
}

func CreateMetricsTotalsGrossMarginInteger ¶ added in v0.12.0

func CreateMetricsTotalsGrossMarginInteger(integer int64) MetricsTotalsGrossMargin

func CreateMetricsTotalsGrossMarginNumber ¶ added in v0.12.0

func CreateMetricsTotalsGrossMarginNumber(number float64) MetricsTotalsGrossMargin

func (MetricsTotalsGrossMargin) MarshalJSON ¶ added in v0.12.0

func (u MetricsTotalsGrossMargin) MarshalJSON() ([]byte, error)

func (*MetricsTotalsGrossMargin) UnmarshalJSON ¶ added in v0.12.0

func (u *MetricsTotalsGrossMargin) UnmarshalJSON(data []byte) error

type MetricsTotalsGrossMarginPercentage ¶ added in v0.12.0

type MetricsTotalsGrossMarginPercentage struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsGrossMarginPercentageType
}

func CreateMetricsTotalsGrossMarginPercentageInteger ¶ added in v0.12.0

func CreateMetricsTotalsGrossMarginPercentageInteger(integer int64) MetricsTotalsGrossMarginPercentage

func CreateMetricsTotalsGrossMarginPercentageNumber ¶ added in v0.12.0

func CreateMetricsTotalsGrossMarginPercentageNumber(number float64) MetricsTotalsGrossMarginPercentage

func (MetricsTotalsGrossMarginPercentage) MarshalJSON ¶ added in v0.12.0

func (u MetricsTotalsGrossMarginPercentage) MarshalJSON() ([]byte, error)

func (*MetricsTotalsGrossMarginPercentage) UnmarshalJSON ¶ added in v0.12.0

func (u *MetricsTotalsGrossMarginPercentage) UnmarshalJSON(data []byte) error

type MetricsTotalsGrossMarginPercentageType ¶ added in v0.12.0

type MetricsTotalsGrossMarginPercentageType string
const (
	MetricsTotalsGrossMarginPercentageTypeInteger MetricsTotalsGrossMarginPercentageType = "integer"
	MetricsTotalsGrossMarginPercentageTypeNumber  MetricsTotalsGrossMarginPercentageType = "number"
)

type MetricsTotalsGrossMarginType ¶ added in v0.12.0

type MetricsTotalsGrossMarginType string
const (
	MetricsTotalsGrossMarginTypeInteger MetricsTotalsGrossMarginType = "integer"
	MetricsTotalsGrossMarginTypeNumber  MetricsTotalsGrossMarginType = "number"
)

type MetricsTotalsLtv ¶ added in v0.13.0

type MetricsTotalsLtv struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsLtvType
}

func CreateMetricsTotalsLtvInteger ¶ added in v0.13.0

func CreateMetricsTotalsLtvInteger(integer int64) MetricsTotalsLtv

func CreateMetricsTotalsLtvNumber ¶ added in v0.13.0

func CreateMetricsTotalsLtvNumber(number float64) MetricsTotalsLtv

func (MetricsTotalsLtv) MarshalJSON ¶ added in v0.13.0

func (u MetricsTotalsLtv) MarshalJSON() ([]byte, error)

func (*MetricsTotalsLtv) UnmarshalJSON ¶ added in v0.13.0

func (u *MetricsTotalsLtv) UnmarshalJSON(data []byte) error

type MetricsTotalsLtvType ¶ added in v0.13.0

type MetricsTotalsLtvType string
const (
	MetricsTotalsLtvTypeInteger MetricsTotalsLtvType = "integer"
	MetricsTotalsLtvTypeNumber  MetricsTotalsLtvType = "number"
)

type MetricsTotalsMonthlyRecurringRevenue ¶ added in v0.4.17

type MetricsTotalsMonthlyRecurringRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsMonthlyRecurringRevenueType
}

func CreateMetricsTotalsMonthlyRecurringRevenueInteger ¶ added in v0.4.17

func CreateMetricsTotalsMonthlyRecurringRevenueInteger(integer int64) MetricsTotalsMonthlyRecurringRevenue

func CreateMetricsTotalsMonthlyRecurringRevenueNumber ¶ added in v0.4.17

func CreateMetricsTotalsMonthlyRecurringRevenueNumber(number float64) MetricsTotalsMonthlyRecurringRevenue

func (MetricsTotalsMonthlyRecurringRevenue) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsMonthlyRecurringRevenue) MarshalJSON() ([]byte, error)

func (*MetricsTotalsMonthlyRecurringRevenue) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsMonthlyRecurringRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsMonthlyRecurringRevenueType ¶ added in v0.4.17

type MetricsTotalsMonthlyRecurringRevenueType string
const (
	MetricsTotalsMonthlyRecurringRevenueTypeInteger MetricsTotalsMonthlyRecurringRevenueType = "integer"
	MetricsTotalsMonthlyRecurringRevenueTypeNumber  MetricsTotalsMonthlyRecurringRevenueType = "number"
)

type MetricsTotalsNetAverageOrderValue ¶ added in v0.8.1

type MetricsTotalsNetAverageOrderValue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsNetAverageOrderValueType
}

func CreateMetricsTotalsNetAverageOrderValueInteger ¶ added in v0.8.1

func CreateMetricsTotalsNetAverageOrderValueInteger(integer int64) MetricsTotalsNetAverageOrderValue

func CreateMetricsTotalsNetAverageOrderValueNumber ¶ added in v0.8.1

func CreateMetricsTotalsNetAverageOrderValueNumber(number float64) MetricsTotalsNetAverageOrderValue

func (MetricsTotalsNetAverageOrderValue) MarshalJSON ¶ added in v0.8.1

func (u MetricsTotalsNetAverageOrderValue) MarshalJSON() ([]byte, error)

func (*MetricsTotalsNetAverageOrderValue) UnmarshalJSON ¶ added in v0.8.1

func (u *MetricsTotalsNetAverageOrderValue) UnmarshalJSON(data []byte) error

type MetricsTotalsNetAverageOrderValueType ¶ added in v0.8.1

type MetricsTotalsNetAverageOrderValueType string
const (
	MetricsTotalsNetAverageOrderValueTypeInteger MetricsTotalsNetAverageOrderValueType = "integer"
	MetricsTotalsNetAverageOrderValueTypeNumber  MetricsTotalsNetAverageOrderValueType = "number"
)

type MetricsTotalsNetCumulativeRevenue ¶ added in v0.8.1

type MetricsTotalsNetCumulativeRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsNetCumulativeRevenueType
}

func CreateMetricsTotalsNetCumulativeRevenueInteger ¶ added in v0.8.1

func CreateMetricsTotalsNetCumulativeRevenueInteger(integer int64) MetricsTotalsNetCumulativeRevenue

func CreateMetricsTotalsNetCumulativeRevenueNumber ¶ added in v0.8.1

func CreateMetricsTotalsNetCumulativeRevenueNumber(number float64) MetricsTotalsNetCumulativeRevenue

func (MetricsTotalsNetCumulativeRevenue) MarshalJSON ¶ added in v0.8.1

func (u MetricsTotalsNetCumulativeRevenue) MarshalJSON() ([]byte, error)

func (*MetricsTotalsNetCumulativeRevenue) UnmarshalJSON ¶ added in v0.8.1

func (u *MetricsTotalsNetCumulativeRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsNetCumulativeRevenueType ¶ added in v0.8.1

type MetricsTotalsNetCumulativeRevenueType string
const (
	MetricsTotalsNetCumulativeRevenueTypeInteger MetricsTotalsNetCumulativeRevenueType = "integer"
	MetricsTotalsNetCumulativeRevenueTypeNumber  MetricsTotalsNetCumulativeRevenueType = "number"
)

type MetricsTotalsNetRevenue ¶ added in v0.8.1

type MetricsTotalsNetRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsNetRevenueType
}

func CreateMetricsTotalsNetRevenueInteger ¶ added in v0.8.1

func CreateMetricsTotalsNetRevenueInteger(integer int64) MetricsTotalsNetRevenue

func CreateMetricsTotalsNetRevenueNumber ¶ added in v0.8.1

func CreateMetricsTotalsNetRevenueNumber(number float64) MetricsTotalsNetRevenue

func (MetricsTotalsNetRevenue) MarshalJSON ¶ added in v0.8.1

func (u MetricsTotalsNetRevenue) MarshalJSON() ([]byte, error)

func (*MetricsTotalsNetRevenue) UnmarshalJSON ¶ added in v0.8.1

func (u *MetricsTotalsNetRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsNetRevenueType ¶ added in v0.8.1

type MetricsTotalsNetRevenueType string
const (
	MetricsTotalsNetRevenueTypeInteger MetricsTotalsNetRevenueType = "integer"
	MetricsTotalsNetRevenueTypeNumber  MetricsTotalsNetRevenueType = "number"
)

type MetricsTotalsNewSubscriptions ¶ added in v0.4.17

type MetricsTotalsNewSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsNewSubscriptionsType
}

func CreateMetricsTotalsNewSubscriptionsInteger ¶ added in v0.4.17

func CreateMetricsTotalsNewSubscriptionsInteger(integer int64) MetricsTotalsNewSubscriptions

func CreateMetricsTotalsNewSubscriptionsNumber ¶ added in v0.4.17

func CreateMetricsTotalsNewSubscriptionsNumber(number float64) MetricsTotalsNewSubscriptions

func (MetricsTotalsNewSubscriptions) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsNewSubscriptions) MarshalJSON() ([]byte, error)

func (*MetricsTotalsNewSubscriptions) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsNewSubscriptions) UnmarshalJSON(data []byte) error

type MetricsTotalsNewSubscriptionsNetRevenue ¶ added in v0.8.1

type MetricsTotalsNewSubscriptionsNetRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsNewSubscriptionsNetRevenueType
}

func CreateMetricsTotalsNewSubscriptionsNetRevenueInteger ¶ added in v0.8.1

func CreateMetricsTotalsNewSubscriptionsNetRevenueInteger(integer int64) MetricsTotalsNewSubscriptionsNetRevenue

func CreateMetricsTotalsNewSubscriptionsNetRevenueNumber ¶ added in v0.8.1

func CreateMetricsTotalsNewSubscriptionsNetRevenueNumber(number float64) MetricsTotalsNewSubscriptionsNetRevenue

func (MetricsTotalsNewSubscriptionsNetRevenue) MarshalJSON ¶ added in v0.8.1

func (u MetricsTotalsNewSubscriptionsNetRevenue) MarshalJSON() ([]byte, error)

func (*MetricsTotalsNewSubscriptionsNetRevenue) UnmarshalJSON ¶ added in v0.8.1

func (u *MetricsTotalsNewSubscriptionsNetRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsNewSubscriptionsNetRevenueType ¶ added in v0.8.1

type MetricsTotalsNewSubscriptionsNetRevenueType string
const (
	MetricsTotalsNewSubscriptionsNetRevenueTypeInteger MetricsTotalsNewSubscriptionsNetRevenueType = "integer"
	MetricsTotalsNewSubscriptionsNetRevenueTypeNumber  MetricsTotalsNewSubscriptionsNetRevenueType = "number"
)

type MetricsTotalsNewSubscriptionsRevenue ¶ added in v0.4.17

type MetricsTotalsNewSubscriptionsRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsNewSubscriptionsRevenueType
}

func CreateMetricsTotalsNewSubscriptionsRevenueInteger ¶ added in v0.4.17

func CreateMetricsTotalsNewSubscriptionsRevenueInteger(integer int64) MetricsTotalsNewSubscriptionsRevenue

func CreateMetricsTotalsNewSubscriptionsRevenueNumber ¶ added in v0.4.17

func CreateMetricsTotalsNewSubscriptionsRevenueNumber(number float64) MetricsTotalsNewSubscriptionsRevenue

func (MetricsTotalsNewSubscriptionsRevenue) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsNewSubscriptionsRevenue) MarshalJSON() ([]byte, error)

func (*MetricsTotalsNewSubscriptionsRevenue) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsNewSubscriptionsRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsNewSubscriptionsRevenueType ¶ added in v0.4.17

type MetricsTotalsNewSubscriptionsRevenueType string
const (
	MetricsTotalsNewSubscriptionsRevenueTypeInteger MetricsTotalsNewSubscriptionsRevenueType = "integer"
	MetricsTotalsNewSubscriptionsRevenueTypeNumber  MetricsTotalsNewSubscriptionsRevenueType = "number"
)

type MetricsTotalsNewSubscriptionsType ¶ added in v0.4.17

type MetricsTotalsNewSubscriptionsType string
const (
	MetricsTotalsNewSubscriptionsTypeInteger MetricsTotalsNewSubscriptionsType = "integer"
	MetricsTotalsNewSubscriptionsTypeNumber  MetricsTotalsNewSubscriptionsType = "number"
)

type MetricsTotalsOneTimeProducts ¶ added in v0.4.17

type MetricsTotalsOneTimeProducts struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsOneTimeProductsType
}

func CreateMetricsTotalsOneTimeProductsInteger ¶ added in v0.4.17

func CreateMetricsTotalsOneTimeProductsInteger(integer int64) MetricsTotalsOneTimeProducts

func CreateMetricsTotalsOneTimeProductsNumber ¶ added in v0.4.17

func CreateMetricsTotalsOneTimeProductsNumber(number float64) MetricsTotalsOneTimeProducts

func (MetricsTotalsOneTimeProducts) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsOneTimeProducts) MarshalJSON() ([]byte, error)

func (*MetricsTotalsOneTimeProducts) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsOneTimeProducts) UnmarshalJSON(data []byte) error

type MetricsTotalsOneTimeProductsNetRevenue ¶ added in v0.8.1

type MetricsTotalsOneTimeProductsNetRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsOneTimeProductsNetRevenueType
}

func CreateMetricsTotalsOneTimeProductsNetRevenueInteger ¶ added in v0.8.1

func CreateMetricsTotalsOneTimeProductsNetRevenueInteger(integer int64) MetricsTotalsOneTimeProductsNetRevenue

func CreateMetricsTotalsOneTimeProductsNetRevenueNumber ¶ added in v0.8.1

func CreateMetricsTotalsOneTimeProductsNetRevenueNumber(number float64) MetricsTotalsOneTimeProductsNetRevenue

func (MetricsTotalsOneTimeProductsNetRevenue) MarshalJSON ¶ added in v0.8.1

func (u MetricsTotalsOneTimeProductsNetRevenue) MarshalJSON() ([]byte, error)

func (*MetricsTotalsOneTimeProductsNetRevenue) UnmarshalJSON ¶ added in v0.8.1

func (u *MetricsTotalsOneTimeProductsNetRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsOneTimeProductsNetRevenueType ¶ added in v0.8.1

type MetricsTotalsOneTimeProductsNetRevenueType string
const (
	MetricsTotalsOneTimeProductsNetRevenueTypeInteger MetricsTotalsOneTimeProductsNetRevenueType = "integer"
	MetricsTotalsOneTimeProductsNetRevenueTypeNumber  MetricsTotalsOneTimeProductsNetRevenueType = "number"
)

type MetricsTotalsOneTimeProductsRevenue ¶ added in v0.4.17

type MetricsTotalsOneTimeProductsRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsOneTimeProductsRevenueType
}

func CreateMetricsTotalsOneTimeProductsRevenueInteger ¶ added in v0.4.17

func CreateMetricsTotalsOneTimeProductsRevenueInteger(integer int64) MetricsTotalsOneTimeProductsRevenue

func CreateMetricsTotalsOneTimeProductsRevenueNumber ¶ added in v0.4.17

func CreateMetricsTotalsOneTimeProductsRevenueNumber(number float64) MetricsTotalsOneTimeProductsRevenue

func (MetricsTotalsOneTimeProductsRevenue) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsOneTimeProductsRevenue) MarshalJSON() ([]byte, error)

func (*MetricsTotalsOneTimeProductsRevenue) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsOneTimeProductsRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsOneTimeProductsRevenueType ¶ added in v0.4.17

type MetricsTotalsOneTimeProductsRevenueType string
const (
	MetricsTotalsOneTimeProductsRevenueTypeInteger MetricsTotalsOneTimeProductsRevenueType = "integer"
	MetricsTotalsOneTimeProductsRevenueTypeNumber  MetricsTotalsOneTimeProductsRevenueType = "number"
)

type MetricsTotalsOneTimeProductsType ¶ added in v0.4.17

type MetricsTotalsOneTimeProductsType string
const (
	MetricsTotalsOneTimeProductsTypeInteger MetricsTotalsOneTimeProductsType = "integer"
	MetricsTotalsOneTimeProductsTypeNumber  MetricsTotalsOneTimeProductsType = "number"
)

type MetricsTotalsOrders ¶ added in v0.4.17

type MetricsTotalsOrders struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsOrdersType
}

func CreateMetricsTotalsOrdersInteger ¶ added in v0.4.17

func CreateMetricsTotalsOrdersInteger(integer int64) MetricsTotalsOrders

func CreateMetricsTotalsOrdersNumber ¶ added in v0.4.17

func CreateMetricsTotalsOrdersNumber(number float64) MetricsTotalsOrders

func (MetricsTotalsOrders) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsOrders) MarshalJSON() ([]byte, error)

func (*MetricsTotalsOrders) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsOrders) UnmarshalJSON(data []byte) error

type MetricsTotalsOrdersType ¶ added in v0.4.17

type MetricsTotalsOrdersType string
const (
	MetricsTotalsOrdersTypeInteger MetricsTotalsOrdersType = "integer"
	MetricsTotalsOrdersTypeNumber  MetricsTotalsOrdersType = "number"
)

type MetricsTotalsRenewedSubscriptions ¶ added in v0.4.17

type MetricsTotalsRenewedSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsRenewedSubscriptionsType
}

func CreateMetricsTotalsRenewedSubscriptionsInteger ¶ added in v0.4.17

func CreateMetricsTotalsRenewedSubscriptionsInteger(integer int64) MetricsTotalsRenewedSubscriptions

func CreateMetricsTotalsRenewedSubscriptionsNumber ¶ added in v0.4.17

func CreateMetricsTotalsRenewedSubscriptionsNumber(number float64) MetricsTotalsRenewedSubscriptions

func (MetricsTotalsRenewedSubscriptions) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsRenewedSubscriptions) MarshalJSON() ([]byte, error)

func (*MetricsTotalsRenewedSubscriptions) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsRenewedSubscriptions) UnmarshalJSON(data []byte) error

type MetricsTotalsRenewedSubscriptionsNetRevenue ¶ added in v0.8.1

type MetricsTotalsRenewedSubscriptionsNetRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsRenewedSubscriptionsNetRevenueType
}

func CreateMetricsTotalsRenewedSubscriptionsNetRevenueInteger ¶ added in v0.8.1

func CreateMetricsTotalsRenewedSubscriptionsNetRevenueInteger(integer int64) MetricsTotalsRenewedSubscriptionsNetRevenue

func CreateMetricsTotalsRenewedSubscriptionsNetRevenueNumber ¶ added in v0.8.1

func CreateMetricsTotalsRenewedSubscriptionsNetRevenueNumber(number float64) MetricsTotalsRenewedSubscriptionsNetRevenue

func (MetricsTotalsRenewedSubscriptionsNetRevenue) MarshalJSON ¶ added in v0.8.1

func (*MetricsTotalsRenewedSubscriptionsNetRevenue) UnmarshalJSON ¶ added in v0.8.1

func (u *MetricsTotalsRenewedSubscriptionsNetRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsRenewedSubscriptionsNetRevenueType ¶ added in v0.8.1

type MetricsTotalsRenewedSubscriptionsNetRevenueType string
const (
	MetricsTotalsRenewedSubscriptionsNetRevenueTypeInteger MetricsTotalsRenewedSubscriptionsNetRevenueType = "integer"
	MetricsTotalsRenewedSubscriptionsNetRevenueTypeNumber  MetricsTotalsRenewedSubscriptionsNetRevenueType = "number"
)

type MetricsTotalsRenewedSubscriptionsRevenue ¶ added in v0.4.17

type MetricsTotalsRenewedSubscriptionsRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsRenewedSubscriptionsRevenueType
}

func CreateMetricsTotalsRenewedSubscriptionsRevenueInteger ¶ added in v0.4.17

func CreateMetricsTotalsRenewedSubscriptionsRevenueInteger(integer int64) MetricsTotalsRenewedSubscriptionsRevenue

func CreateMetricsTotalsRenewedSubscriptionsRevenueNumber ¶ added in v0.4.17

func CreateMetricsTotalsRenewedSubscriptionsRevenueNumber(number float64) MetricsTotalsRenewedSubscriptionsRevenue

func (MetricsTotalsRenewedSubscriptionsRevenue) MarshalJSON ¶ added in v0.4.17

func (*MetricsTotalsRenewedSubscriptionsRevenue) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsRenewedSubscriptionsRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsRenewedSubscriptionsRevenueType ¶ added in v0.4.17

type MetricsTotalsRenewedSubscriptionsRevenueType string
const (
	MetricsTotalsRenewedSubscriptionsRevenueTypeInteger MetricsTotalsRenewedSubscriptionsRevenueType = "integer"
	MetricsTotalsRenewedSubscriptionsRevenueTypeNumber  MetricsTotalsRenewedSubscriptionsRevenueType = "number"
)

type MetricsTotalsRenewedSubscriptionsType ¶ added in v0.4.17

type MetricsTotalsRenewedSubscriptionsType string
const (
	MetricsTotalsRenewedSubscriptionsTypeInteger MetricsTotalsRenewedSubscriptionsType = "integer"
	MetricsTotalsRenewedSubscriptionsTypeNumber  MetricsTotalsRenewedSubscriptionsType = "number"
)

type MetricsTotalsRevenue ¶ added in v0.4.17

type MetricsTotalsRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsRevenueType
}

func CreateMetricsTotalsRevenueInteger ¶ added in v0.4.17

func CreateMetricsTotalsRevenueInteger(integer int64) MetricsTotalsRevenue

func CreateMetricsTotalsRevenueNumber ¶ added in v0.4.17

func CreateMetricsTotalsRevenueNumber(number float64) MetricsTotalsRevenue

func (MetricsTotalsRevenue) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsRevenue) MarshalJSON() ([]byte, error)

func (*MetricsTotalsRevenue) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsRevenue) UnmarshalJSON(data []byte) error

type MetricsTotalsRevenueType ¶ added in v0.4.17

type MetricsTotalsRevenueType string
const (
	MetricsTotalsRevenueTypeInteger MetricsTotalsRevenueType = "integer"
	MetricsTotalsRevenueTypeNumber  MetricsTotalsRevenueType = "number"
)

type MetricsTotalsSucceededCheckouts ¶ added in v0.4.17

type MetricsTotalsSucceededCheckouts struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MetricsTotalsSucceededCheckoutsType
}

func CreateMetricsTotalsSucceededCheckoutsInteger ¶ added in v0.4.17

func CreateMetricsTotalsSucceededCheckoutsInteger(integer int64) MetricsTotalsSucceededCheckouts

func CreateMetricsTotalsSucceededCheckoutsNumber ¶ added in v0.4.17

func CreateMetricsTotalsSucceededCheckoutsNumber(number float64) MetricsTotalsSucceededCheckouts

func (MetricsTotalsSucceededCheckouts) MarshalJSON ¶ added in v0.4.17

func (u MetricsTotalsSucceededCheckouts) MarshalJSON() ([]byte, error)

func (*MetricsTotalsSucceededCheckouts) UnmarshalJSON ¶ added in v0.4.17

func (u *MetricsTotalsSucceededCheckouts) UnmarshalJSON(data []byte) error

type MetricsTotalsSucceededCheckoutsType ¶ added in v0.4.17

type MetricsTotalsSucceededCheckoutsType string
const (
	MetricsTotalsSucceededCheckoutsTypeInteger MetricsTotalsSucceededCheckoutsType = "integer"
	MetricsTotalsSucceededCheckoutsTypeNumber  MetricsTotalsSucceededCheckoutsType = "number"
)

type MissingInvoiceBillingDetails ¶ added in v0.5.0

type MissingInvoiceBillingDetails struct {
	Detail string `json:"detail"`
	// contains filtered or unexported fields
}

func (*MissingInvoiceBillingDetails) GetDetail ¶ added in v0.5.0

func (m *MissingInvoiceBillingDetails) GetDetail() string

func (*MissingInvoiceBillingDetails) GetError ¶ added in v0.5.0

func (m *MissingInvoiceBillingDetails) GetError() string

func (MissingInvoiceBillingDetails) MarshalJSON ¶ added in v0.5.0

func (m MissingInvoiceBillingDetails) MarshalJSON() ([]byte, error)

func (*MissingInvoiceBillingDetails) UnmarshalJSON ¶ added in v0.5.0

func (m *MissingInvoiceBillingDetails) UnmarshalJSON(data []byte) error

type MonthlyRecurringRevenue ¶ added in v0.4.17

type MonthlyRecurringRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type MonthlyRecurringRevenueType
}

func CreateMonthlyRecurringRevenueInteger ¶ added in v0.4.17

func CreateMonthlyRecurringRevenueInteger(integer int64) MonthlyRecurringRevenue

func CreateMonthlyRecurringRevenueNumber ¶ added in v0.4.17

func CreateMonthlyRecurringRevenueNumber(number float64) MonthlyRecurringRevenue

func (MonthlyRecurringRevenue) MarshalJSON ¶ added in v0.4.17

func (u MonthlyRecurringRevenue) MarshalJSON() ([]byte, error)

func (*MonthlyRecurringRevenue) UnmarshalJSON ¶ added in v0.4.17

func (u *MonthlyRecurringRevenue) UnmarshalJSON(data []byte) error

type MonthlyRecurringRevenueType ¶ added in v0.4.17

type MonthlyRecurringRevenueType string
const (
	MonthlyRecurringRevenueTypeInteger MonthlyRecurringRevenueType = "integer"
	MonthlyRecurringRevenueTypeNumber  MonthlyRecurringRevenueType = "number"
)

type NetAverageOrderValue ¶ added in v0.8.1

type NetAverageOrderValue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type NetAverageOrderValueType
}

func CreateNetAverageOrderValueInteger ¶ added in v0.8.1

func CreateNetAverageOrderValueInteger(integer int64) NetAverageOrderValue

func CreateNetAverageOrderValueNumber ¶ added in v0.8.1

func CreateNetAverageOrderValueNumber(number float64) NetAverageOrderValue

func (NetAverageOrderValue) MarshalJSON ¶ added in v0.8.1

func (u NetAverageOrderValue) MarshalJSON() ([]byte, error)

func (*NetAverageOrderValue) UnmarshalJSON ¶ added in v0.8.1

func (u *NetAverageOrderValue) UnmarshalJSON(data []byte) error

type NetAverageOrderValueType ¶ added in v0.8.1

type NetAverageOrderValueType string
const (
	NetAverageOrderValueTypeInteger NetAverageOrderValueType = "integer"
	NetAverageOrderValueTypeNumber  NetAverageOrderValueType = "number"
)

type NetCumulativeRevenue ¶ added in v0.8.1

type NetCumulativeRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type NetCumulativeRevenueType
}

func CreateNetCumulativeRevenueInteger ¶ added in v0.8.1

func CreateNetCumulativeRevenueInteger(integer int64) NetCumulativeRevenue

func CreateNetCumulativeRevenueNumber ¶ added in v0.8.1

func CreateNetCumulativeRevenueNumber(number float64) NetCumulativeRevenue

func (NetCumulativeRevenue) MarshalJSON ¶ added in v0.8.1

func (u NetCumulativeRevenue) MarshalJSON() ([]byte, error)

func (*NetCumulativeRevenue) UnmarshalJSON ¶ added in v0.8.1

func (u *NetCumulativeRevenue) UnmarshalJSON(data []byte) error

type NetCumulativeRevenueType ¶ added in v0.8.1

type NetCumulativeRevenueType string
const (
	NetCumulativeRevenueTypeInteger NetCumulativeRevenueType = "integer"
	NetCumulativeRevenueTypeNumber  NetCumulativeRevenueType = "number"
)

type NetRevenue ¶ added in v0.8.1

type NetRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type NetRevenueType
}

func CreateNetRevenueInteger ¶ added in v0.8.1

func CreateNetRevenueInteger(integer int64) NetRevenue

func CreateNetRevenueNumber ¶ added in v0.8.1

func CreateNetRevenueNumber(number float64) NetRevenue

func (NetRevenue) MarshalJSON ¶ added in v0.8.1

func (u NetRevenue) MarshalJSON() ([]byte, error)

func (*NetRevenue) UnmarshalJSON ¶ added in v0.8.1

func (u *NetRevenue) UnmarshalJSON(data []byte) error

type NetRevenueType ¶ added in v0.8.1

type NetRevenueType string
const (
	NetRevenueTypeInteger NetRevenueType = "integer"
	NetRevenueTypeNumber  NetRevenueType = "number"
)

type NewSubscriptions ¶ added in v0.4.17

type NewSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type NewSubscriptionsType
}

func CreateNewSubscriptionsInteger ¶ added in v0.4.17

func CreateNewSubscriptionsInteger(integer int64) NewSubscriptions

func CreateNewSubscriptionsNumber ¶ added in v0.4.17

func CreateNewSubscriptionsNumber(number float64) NewSubscriptions

func (NewSubscriptions) MarshalJSON ¶ added in v0.4.17

func (u NewSubscriptions) MarshalJSON() ([]byte, error)

func (*NewSubscriptions) UnmarshalJSON ¶ added in v0.4.17

func (u *NewSubscriptions) UnmarshalJSON(data []byte) error

type NewSubscriptionsNetRevenue ¶ added in v0.8.1

type NewSubscriptionsNetRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type NewSubscriptionsNetRevenueType
}

func CreateNewSubscriptionsNetRevenueInteger ¶ added in v0.8.1

func CreateNewSubscriptionsNetRevenueInteger(integer int64) NewSubscriptionsNetRevenue

func CreateNewSubscriptionsNetRevenueNumber ¶ added in v0.8.1

func CreateNewSubscriptionsNetRevenueNumber(number float64) NewSubscriptionsNetRevenue

func (NewSubscriptionsNetRevenue) MarshalJSON ¶ added in v0.8.1

func (u NewSubscriptionsNetRevenue) MarshalJSON() ([]byte, error)

func (*NewSubscriptionsNetRevenue) UnmarshalJSON ¶ added in v0.8.1

func (u *NewSubscriptionsNetRevenue) UnmarshalJSON(data []byte) error

type NewSubscriptionsNetRevenueType ¶ added in v0.8.1

type NewSubscriptionsNetRevenueType string
const (
	NewSubscriptionsNetRevenueTypeInteger NewSubscriptionsNetRevenueType = "integer"
	NewSubscriptionsNetRevenueTypeNumber  NewSubscriptionsNetRevenueType = "number"
)

type NewSubscriptionsRevenue ¶ added in v0.4.17

type NewSubscriptionsRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type NewSubscriptionsRevenueType
}

func CreateNewSubscriptionsRevenueInteger ¶ added in v0.4.17

func CreateNewSubscriptionsRevenueInteger(integer int64) NewSubscriptionsRevenue

func CreateNewSubscriptionsRevenueNumber ¶ added in v0.4.17

func CreateNewSubscriptionsRevenueNumber(number float64) NewSubscriptionsRevenue

func (NewSubscriptionsRevenue) MarshalJSON ¶ added in v0.4.17

func (u NewSubscriptionsRevenue) MarshalJSON() ([]byte, error)

func (*NewSubscriptionsRevenue) UnmarshalJSON ¶ added in v0.4.17

func (u *NewSubscriptionsRevenue) UnmarshalJSON(data []byte) error

type NewSubscriptionsRevenueType ¶ added in v0.4.17

type NewSubscriptionsRevenueType string
const (
	NewSubscriptionsRevenueTypeInteger NewSubscriptionsRevenueType = "integer"
	NewSubscriptionsRevenueTypeNumber  NewSubscriptionsRevenueType = "number"
)

type NewSubscriptionsType ¶ added in v0.4.17

type NewSubscriptionsType string
const (
	NewSubscriptionsTypeInteger NewSubscriptionsType = "integer"
	NewSubscriptionsTypeNumber  NewSubscriptionsType = "number"
)

type NotOpenCheckout ¶ added in v0.3.0

type NotOpenCheckout struct {
	Detail string `json:"detail"`
	// contains filtered or unexported fields
}

func (*NotOpenCheckout) GetDetail ¶ added in v0.3.0

func (n *NotOpenCheckout) GetDetail() string

func (*NotOpenCheckout) GetError ¶ added in v0.3.0

func (n *NotOpenCheckout) GetError() string

func (NotOpenCheckout) MarshalJSON ¶ added in v0.3.0

func (n NotOpenCheckout) MarshalJSON() ([]byte, error)

func (*NotOpenCheckout) UnmarshalJSON ¶ added in v0.3.0

func (n *NotOpenCheckout) UnmarshalJSON(data []byte) error

type NotPaidOrder ¶ added in v0.5.0

type NotPaidOrder struct {
	Detail string `json:"detail"`
	// contains filtered or unexported fields
}

func (*NotPaidOrder) GetDetail ¶ added in v0.5.0

func (n *NotPaidOrder) GetDetail() string

func (*NotPaidOrder) GetError ¶ added in v0.5.0

func (n *NotPaidOrder) GetError() string

func (NotPaidOrder) MarshalJSON ¶ added in v0.5.0

func (n NotPaidOrder) MarshalJSON() ([]byte, error)

func (*NotPaidOrder) UnmarshalJSON ¶ added in v0.5.0

func (n *NotPaidOrder) UnmarshalJSON(data []byte) error

type OAuth2ClientConfiguration ¶

type OAuth2ClientConfiguration struct {
	RedirectUris            []string                 `json:"redirect_uris"`
	TokenEndpointAuthMethod *TokenEndpointAuthMethod `default:"client_secret_post" json:"token_endpoint_auth_method"`
	GrantTypes              []GrantTypes             `json:"grant_types,omitempty"`
	ResponseTypes           []string                 `json:"response_types,omitempty"`
	Scope                   *string                  `` /* 1051-byte string literal not displayed */
	ClientName              string                   `json:"client_name"`
	ClientURI               *string                  `json:"client_uri,omitempty"`
	LogoURI                 *string                  `json:"logo_uri,omitempty"`
	TosURI                  *string                  `json:"tos_uri,omitempty"`
	PolicyURI               *string                  `json:"policy_uri,omitempty"`
	DefaultSubType          *SubType                 `json:"default_sub_type,omitempty"`
}

func (*OAuth2ClientConfiguration) GetClientName ¶

func (o *OAuth2ClientConfiguration) GetClientName() string

func (*OAuth2ClientConfiguration) GetClientURI ¶

func (o *OAuth2ClientConfiguration) GetClientURI() *string

func (*OAuth2ClientConfiguration) GetDefaultSubType ¶ added in v0.11.0

func (o *OAuth2ClientConfiguration) GetDefaultSubType() *SubType

func (*OAuth2ClientConfiguration) GetGrantTypes ¶

func (o *OAuth2ClientConfiguration) GetGrantTypes() []GrantTypes

func (*OAuth2ClientConfiguration) GetLogoURI ¶

func (o *OAuth2ClientConfiguration) GetLogoURI() *string

func (*OAuth2ClientConfiguration) GetPolicyURI ¶

func (o *OAuth2ClientConfiguration) GetPolicyURI() *string

func (*OAuth2ClientConfiguration) GetRedirectUris ¶

func (o *OAuth2ClientConfiguration) GetRedirectUris() []string

func (*OAuth2ClientConfiguration) GetResponseTypes ¶

func (o *OAuth2ClientConfiguration) GetResponseTypes() []string

func (*OAuth2ClientConfiguration) GetScope ¶

func (o *OAuth2ClientConfiguration) GetScope() *string

func (*OAuth2ClientConfiguration) GetTokenEndpointAuthMethod ¶

func (o *OAuth2ClientConfiguration) GetTokenEndpointAuthMethod() *TokenEndpointAuthMethod

func (*OAuth2ClientConfiguration) GetTosURI ¶

func (o *OAuth2ClientConfiguration) GetTosURI() *string

func (OAuth2ClientConfiguration) MarshalJSON ¶

func (o OAuth2ClientConfiguration) MarshalJSON() ([]byte, error)

func (*OAuth2ClientConfiguration) UnmarshalJSON ¶

func (o *OAuth2ClientConfiguration) UnmarshalJSON(data []byte) error

type OAuth2ClientConfigurationUpdate ¶

type OAuth2ClientConfigurationUpdate struct {
	RedirectUris            []string                                                `json:"redirect_uris"`
	TokenEndpointAuthMethod *OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod `default:"client_secret_post" json:"token_endpoint_auth_method"`
	GrantTypes              []OAuth2ClientConfigurationUpdateGrantTypes             `json:"grant_types,omitempty"`
	ResponseTypes           []string                                                `json:"response_types,omitempty"`
	Scope                   *string                                                 `` /* 1051-byte string literal not displayed */
	ClientName              string                                                  `json:"client_name"`
	ClientURI               *string                                                 `json:"client_uri,omitempty"`
	LogoURI                 *string                                                 `json:"logo_uri,omitempty"`
	TosURI                  *string                                                 `json:"tos_uri,omitempty"`
	PolicyURI               *string                                                 `json:"policy_uri,omitempty"`
	DefaultSubType          *SubType                                                `json:"default_sub_type,omitempty"`
	ClientID                string                                                  `json:"client_id"`
}

func (*OAuth2ClientConfigurationUpdate) GetClientID ¶

func (o *OAuth2ClientConfigurationUpdate) GetClientID() string

func (*OAuth2ClientConfigurationUpdate) GetClientName ¶

func (o *OAuth2ClientConfigurationUpdate) GetClientName() string

func (*OAuth2ClientConfigurationUpdate) GetClientURI ¶

func (o *OAuth2ClientConfigurationUpdate) GetClientURI() *string

func (*OAuth2ClientConfigurationUpdate) GetDefaultSubType ¶ added in v0.11.0

func (o *OAuth2ClientConfigurationUpdate) GetDefaultSubType() *SubType

func (*OAuth2ClientConfigurationUpdate) GetGrantTypes ¶

func (*OAuth2ClientConfigurationUpdate) GetLogoURI ¶

func (o *OAuth2ClientConfigurationUpdate) GetLogoURI() *string

func (*OAuth2ClientConfigurationUpdate) GetPolicyURI ¶

func (o *OAuth2ClientConfigurationUpdate) GetPolicyURI() *string

func (*OAuth2ClientConfigurationUpdate) GetRedirectUris ¶

func (o *OAuth2ClientConfigurationUpdate) GetRedirectUris() []string

func (*OAuth2ClientConfigurationUpdate) GetResponseTypes ¶

func (o *OAuth2ClientConfigurationUpdate) GetResponseTypes() []string

func (*OAuth2ClientConfigurationUpdate) GetScope ¶

func (o *OAuth2ClientConfigurationUpdate) GetScope() *string

func (*OAuth2ClientConfigurationUpdate) GetTokenEndpointAuthMethod ¶

func (*OAuth2ClientConfigurationUpdate) GetTosURI ¶

func (o *OAuth2ClientConfigurationUpdate) GetTosURI() *string

func (OAuth2ClientConfigurationUpdate) MarshalJSON ¶

func (o OAuth2ClientConfigurationUpdate) MarshalJSON() ([]byte, error)

func (*OAuth2ClientConfigurationUpdate) UnmarshalJSON ¶

func (o *OAuth2ClientConfigurationUpdate) UnmarshalJSON(data []byte) error

type OAuth2ClientConfigurationUpdateGrantTypes ¶

type OAuth2ClientConfigurationUpdateGrantTypes string
const (
	OAuth2ClientConfigurationUpdateGrantTypesAuthorizationCode OAuth2ClientConfigurationUpdateGrantTypes = "authorization_code"
	OAuth2ClientConfigurationUpdateGrantTypesRefreshToken      OAuth2ClientConfigurationUpdateGrantTypes = "refresh_token"
)

func (OAuth2ClientConfigurationUpdateGrantTypes) ToPointer ¶

func (*OAuth2ClientConfigurationUpdateGrantTypes) UnmarshalJSON ¶

func (e *OAuth2ClientConfigurationUpdateGrantTypes) UnmarshalJSON(data []byte) error

type OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod ¶

type OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod string
const (
	OAuth2ClientConfigurationUpdateTokenEndpointAuthMethodClientSecretBasic OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod = "client_secret_basic"
	OAuth2ClientConfigurationUpdateTokenEndpointAuthMethodClientSecretPost  OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod = "client_secret_post"
	OAuth2ClientConfigurationUpdateTokenEndpointAuthMethodNone              OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod = "none"
)

func (OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod) ToPointer ¶

func (*OAuth2ClientConfigurationUpdateTokenEndpointAuthMethod) UnmarshalJSON ¶

type OAuth2ClientPublic ¶

type OAuth2ClientPublic struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	ClientID   string     `json:"client_id"`
	ClientName *string    `json:"client_name"`
	ClientURI  *string    `json:"client_uri"`
	LogoURI    *string    `json:"logo_uri"`
	TosURI     *string    `json:"tos_uri"`
	PolicyURI  *string    `json:"policy_uri"`
}

func (*OAuth2ClientPublic) GetClientID ¶

func (o *OAuth2ClientPublic) GetClientID() string

func (*OAuth2ClientPublic) GetClientName ¶

func (o *OAuth2ClientPublic) GetClientName() *string

func (*OAuth2ClientPublic) GetClientURI ¶

func (o *OAuth2ClientPublic) GetClientURI() *string

func (*OAuth2ClientPublic) GetCreatedAt ¶

func (o *OAuth2ClientPublic) GetCreatedAt() time.Time

func (*OAuth2ClientPublic) GetLogoURI ¶

func (o *OAuth2ClientPublic) GetLogoURI() *string

func (*OAuth2ClientPublic) GetModifiedAt ¶

func (o *OAuth2ClientPublic) GetModifiedAt() *time.Time

func (*OAuth2ClientPublic) GetPolicyURI ¶

func (o *OAuth2ClientPublic) GetPolicyURI() *string

func (*OAuth2ClientPublic) GetTosURI ¶

func (o *OAuth2ClientPublic) GetTosURI() *string

func (OAuth2ClientPublic) MarshalJSON ¶

func (o OAuth2ClientPublic) MarshalJSON() ([]byte, error)

func (*OAuth2ClientPublic) UnmarshalJSON ¶

func (o *OAuth2ClientPublic) UnmarshalJSON(data []byte) error

type OneTimeProducts ¶ added in v0.4.17

type OneTimeProducts struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type OneTimeProductsType
}

func CreateOneTimeProductsInteger ¶ added in v0.4.17

func CreateOneTimeProductsInteger(integer int64) OneTimeProducts

func CreateOneTimeProductsNumber ¶ added in v0.4.17

func CreateOneTimeProductsNumber(number float64) OneTimeProducts

func (OneTimeProducts) MarshalJSON ¶ added in v0.4.17

func (u OneTimeProducts) MarshalJSON() ([]byte, error)

func (*OneTimeProducts) UnmarshalJSON ¶ added in v0.4.17

func (u *OneTimeProducts) UnmarshalJSON(data []byte) error

type OneTimeProductsNetRevenue ¶ added in v0.8.1

type OneTimeProductsNetRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type OneTimeProductsNetRevenueType
}

func CreateOneTimeProductsNetRevenueInteger ¶ added in v0.8.1

func CreateOneTimeProductsNetRevenueInteger(integer int64) OneTimeProductsNetRevenue

func CreateOneTimeProductsNetRevenueNumber ¶ added in v0.8.1

func CreateOneTimeProductsNetRevenueNumber(number float64) OneTimeProductsNetRevenue

func (OneTimeProductsNetRevenue) MarshalJSON ¶ added in v0.8.1

func (u OneTimeProductsNetRevenue) MarshalJSON() ([]byte, error)

func (*OneTimeProductsNetRevenue) UnmarshalJSON ¶ added in v0.8.1

func (u *OneTimeProductsNetRevenue) UnmarshalJSON(data []byte) error

type OneTimeProductsNetRevenueType ¶ added in v0.8.1

type OneTimeProductsNetRevenueType string
const (
	OneTimeProductsNetRevenueTypeInteger OneTimeProductsNetRevenueType = "integer"
	OneTimeProductsNetRevenueTypeNumber  OneTimeProductsNetRevenueType = "number"
)

type OneTimeProductsRevenue ¶ added in v0.4.17

type OneTimeProductsRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type OneTimeProductsRevenueType
}

func CreateOneTimeProductsRevenueInteger ¶ added in v0.4.17

func CreateOneTimeProductsRevenueInteger(integer int64) OneTimeProductsRevenue

func CreateOneTimeProductsRevenueNumber ¶ added in v0.4.17

func CreateOneTimeProductsRevenueNumber(number float64) OneTimeProductsRevenue

func (OneTimeProductsRevenue) MarshalJSON ¶ added in v0.4.17

func (u OneTimeProductsRevenue) MarshalJSON() ([]byte, error)

func (*OneTimeProductsRevenue) UnmarshalJSON ¶ added in v0.4.17

func (u *OneTimeProductsRevenue) UnmarshalJSON(data []byte) error

type OneTimeProductsRevenueType ¶ added in v0.4.17

type OneTimeProductsRevenueType string
const (
	OneTimeProductsRevenueTypeInteger OneTimeProductsRevenueType = "integer"
	OneTimeProductsRevenueTypeNumber  OneTimeProductsRevenueType = "number"
)

type OneTimeProductsType ¶ added in v0.4.17

type OneTimeProductsType string
const (
	OneTimeProductsTypeInteger OneTimeProductsType = "integer"
	OneTimeProductsTypeNumber  OneTimeProductsType = "number"
)

type Order ¶

type Order struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time  `json:"modified_at"`
	Status     OrderStatus `json:"status"`
	// Whether the order has been paid for.
	Paid bool `json:"paid"`
	// Amount in cents, before discounts and taxes.
	SubtotalAmount int64 `json:"subtotal_amount"`
	// Discount amount in cents.
	DiscountAmount int64 `json:"discount_amount"`
	// Amount in cents, after discounts but before taxes.
	NetAmount int64 `json:"net_amount"`
	// Sales tax amount in cents.
	TaxAmount int64 `json:"tax_amount"`
	// Amount in cents, after discounts and taxes.
	TotalAmount int64 `json:"total_amount"`
	// Customer's balance amount applied to this invoice. Can increase the total amount paid, if the customer has a negative balance,  or decrease it, if the customer has a positive balance.Amount in cents.
	AppliedBalanceAmount int64 `json:"applied_balance_amount"`
	// Amount in cents that is due for this order.
	DueAmount int64 `json:"due_amount"`
	// Amount refunded in cents.
	RefundedAmount int64 `json:"refunded_amount"`
	// Sales tax refunded in cents.
	RefundedTaxAmount int64              `json:"refunded_tax_amount"`
	Currency          string             `json:"currency"`
	BillingReason     OrderBillingReason `json:"billing_reason"`
	// The name of the customer that should appear on the invoice.
	BillingName    *string  `json:"billing_name"`
	BillingAddress *Address `json:"billing_address"`
	// The invoice number associated with this order.
	InvoiceNumber string `json:"invoice_number"`
	// Whether an invoice has been generated for this order.
	IsInvoiceGenerated bool `json:"is_invoice_generated"`
	// Number of seats purchased (for seat-based one-time orders).
	Seats          *int64                        `json:"seats,omitempty"`
	CustomerID     string                        `json:"customer_id"`
	ProductID      *string                       `json:"product_id"`
	DiscountID     *string                       `json:"discount_id"`
	SubscriptionID *string                       `json:"subscription_id"`
	CheckoutID     *string                       `json:"checkout_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	// Key-value object storing custom field values.
	CustomFieldData map[string]*OrderCustomFieldData `json:"custom_field_data,omitempty"`
	// Platform fee amount in cents.
	PlatformFeeAmount int64 `json:"platform_fee_amount"`
	// Currency of the platform fee.
	PlatformFeeCurrency *string            `json:"platform_fee_currency"`
	Customer            OrderCustomer      `json:"customer"`
	Product             *OrderProduct      `json:"product"`
	Discount            *OrderDiscount     `json:"discount"`
	Subscription        *OrderSubscription `json:"subscription"`
	// Line items composing the order.
	Items []OrderItemSchema `json:"items"`
	// A summary description of the order.
	Description string `json:"description"`
}

func (*Order) GetAppliedBalanceAmount ¶ added in v0.10.0

func (o *Order) GetAppliedBalanceAmount() int64

func (*Order) GetBillingAddress ¶

func (o *Order) GetBillingAddress() *Address

func (*Order) GetBillingName ¶ added in v0.5.0

func (o *Order) GetBillingName() *string

func (*Order) GetBillingReason ¶

func (o *Order) GetBillingReason() OrderBillingReason

func (*Order) GetCheckoutID ¶

func (o *Order) GetCheckoutID() *string

func (*Order) GetCreatedAt ¶

func (o *Order) GetCreatedAt() time.Time

func (*Order) GetCurrency ¶

func (o *Order) GetCurrency() string

func (*Order) GetCustomFieldData ¶

func (o *Order) GetCustomFieldData() map[string]*OrderCustomFieldData

func (*Order) GetCustomer ¶

func (o *Order) GetCustomer() OrderCustomer

func (*Order) GetCustomerID ¶

func (o *Order) GetCustomerID() string

func (*Order) GetDescription ¶ added in v0.12.0

func (o *Order) GetDescription() string

func (*Order) GetDiscount ¶

func (o *Order) GetDiscount() *OrderDiscount

func (*Order) GetDiscountAmount ¶ added in v0.4.6

func (o *Order) GetDiscountAmount() int64

func (*Order) GetDiscountID ¶

func (o *Order) GetDiscountID() *string

func (*Order) GetDueAmount ¶ added in v0.10.0

func (o *Order) GetDueAmount() int64

func (*Order) GetID ¶

func (o *Order) GetID() string

func (*Order) GetInvoiceNumber ¶ added in v0.9.2

func (o *Order) GetInvoiceNumber() string

func (*Order) GetIsInvoiceGenerated ¶ added in v0.5.0

func (o *Order) GetIsInvoiceGenerated() bool

func (*Order) GetItems ¶ added in v0.4.6

func (o *Order) GetItems() []OrderItemSchema

func (*Order) GetMetadata ¶

func (o *Order) GetMetadata() map[string]MetadataOutputType

func (*Order) GetModifiedAt ¶

func (o *Order) GetModifiedAt() *time.Time

func (*Order) GetNetAmount ¶ added in v0.4.6

func (o *Order) GetNetAmount() int64

func (*Order) GetPaid ¶ added in v0.4.7

func (o *Order) GetPaid() bool

func (*Order) GetPlatformFeeAmount ¶ added in v0.11.0

func (o *Order) GetPlatformFeeAmount() int64

func (*Order) GetPlatformFeeCurrency ¶ added in v0.13.0

func (o *Order) GetPlatformFeeCurrency() *string

func (*Order) GetProduct ¶

func (o *Order) GetProduct() *OrderProduct

func (*Order) GetProductID ¶

func (o *Order) GetProductID() *string

func (*Order) GetRefundedAmount ¶ added in v0.1.5

func (o *Order) GetRefundedAmount() int64

func (*Order) GetRefundedTaxAmount ¶ added in v0.1.5

func (o *Order) GetRefundedTaxAmount() int64

func (*Order) GetSeats ¶ added in v0.12.0

func (o *Order) GetSeats() *int64

func (*Order) GetStatus ¶ added in v0.1.5

func (o *Order) GetStatus() OrderStatus

func (*Order) GetSubscription ¶

func (o *Order) GetSubscription() *OrderSubscription

func (*Order) GetSubscriptionID ¶

func (o *Order) GetSubscriptionID() *string

func (*Order) GetSubtotalAmount ¶ added in v0.4.6

func (o *Order) GetSubtotalAmount() int64

func (*Order) GetTaxAmount ¶

func (o *Order) GetTaxAmount() int64

func (*Order) GetTotalAmount ¶ added in v0.4.6

func (o *Order) GetTotalAmount() int64

func (Order) MarshalJSON ¶

func (o Order) MarshalJSON() ([]byte, error)

func (*Order) UnmarshalJSON ¶

func (o *Order) UnmarshalJSON(data []byte) error

type OrderBillingReason ¶

type OrderBillingReason string
const (
	OrderBillingReasonPurchase           OrderBillingReason = "purchase"
	OrderBillingReasonSubscriptionCreate OrderBillingReason = "subscription_create"
	OrderBillingReasonSubscriptionCycle  OrderBillingReason = "subscription_cycle"
	OrderBillingReasonSubscriptionUpdate OrderBillingReason = "subscription_update"
)

func (OrderBillingReason) ToPointer ¶

func (e OrderBillingReason) ToPointer() *OrderBillingReason

func (*OrderBillingReason) UnmarshalJSON ¶

func (e *OrderBillingReason) UnmarshalJSON(data []byte) error

type OrderCustomFieldData ¶

type OrderCustomFieldData struct {
	Str      *string    `queryParam:"inline" union:"member"`
	Integer  *int64     `queryParam:"inline" union:"member"`
	Boolean  *bool      `queryParam:"inline" union:"member"`
	DateTime *time.Time `queryParam:"inline" union:"member"`

	Type OrderCustomFieldDataType
}

func CreateOrderCustomFieldDataBoolean ¶ added in v0.1.5

func CreateOrderCustomFieldDataBoolean(boolean bool) OrderCustomFieldData

func CreateOrderCustomFieldDataDateTime ¶ added in v0.1.5

func CreateOrderCustomFieldDataDateTime(dateTime time.Time) OrderCustomFieldData

func CreateOrderCustomFieldDataInteger ¶ added in v0.1.5

func CreateOrderCustomFieldDataInteger(integer int64) OrderCustomFieldData

func CreateOrderCustomFieldDataStr ¶ added in v0.1.5

func CreateOrderCustomFieldDataStr(str string) OrderCustomFieldData

func (OrderCustomFieldData) MarshalJSON ¶ added in v0.1.5

func (u OrderCustomFieldData) MarshalJSON() ([]byte, error)

func (*OrderCustomFieldData) UnmarshalJSON ¶ added in v0.1.5

func (u *OrderCustomFieldData) UnmarshalJSON(data []byte) error

type OrderCustomFieldDataType ¶ added in v0.1.5

type OrderCustomFieldDataType string
const (
	OrderCustomFieldDataTypeStr      OrderCustomFieldDataType = "str"
	OrderCustomFieldDataTypeInteger  OrderCustomFieldDataType = "integer"
	OrderCustomFieldDataTypeBoolean  OrderCustomFieldDataType = "boolean"
	OrderCustomFieldDataTypeDateTime OrderCustomFieldDataType = "date-time"
)

type OrderCustomer ¶

type OrderCustomer struct {
	// The ID of the customer.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time                    `json:"modified_at"`
	Metadata   map[string]MetadataOutputType `json:"metadata"`
	// The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
	ExternalID *string `json:"external_id,omitempty"`
	// The email address of the customer. This must be unique within the organization.
	Email *string `json:"email,omitempty"`
	// Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.
	EmailVerified bool         `json:"email_verified"`
	Type          CustomerType `json:"type"`
	// The name of the customer.
	Name           *string               `json:"name"`
	BillingAddress *Address              `json:"billing_address"`
	TaxID          []*OrderCustomerTaxID `json:"tax_id"`
	Locale         *string               `json:"locale,omitempty"`
	// The ID of the organization owning the customer.
	OrganizationID string `json:"organization_id"`
	// Timestamp for when the customer was soft deleted.
	DeletedAt *time.Time `json:"deleted_at"`
	AvatarURL string     `json:"avatar_url"`
}

func (*OrderCustomer) GetAvatarURL ¶

func (o *OrderCustomer) GetAvatarURL() string

func (*OrderCustomer) GetBillingAddress ¶

func (o *OrderCustomer) GetBillingAddress() *Address

func (*OrderCustomer) GetCreatedAt ¶

func (o *OrderCustomer) GetCreatedAt() time.Time

func (*OrderCustomer) GetDeletedAt ¶ added in v0.4.6

func (o *OrderCustomer) GetDeletedAt() *time.Time

func (*OrderCustomer) GetEmail ¶

func (o *OrderCustomer) GetEmail() *string

func (*OrderCustomer) GetEmailVerified ¶

func (o *OrderCustomer) GetEmailVerified() bool

func (*OrderCustomer) GetExternalID ¶ added in v0.4.1

func (o *OrderCustomer) GetExternalID() *string

func (*OrderCustomer) GetID ¶

func (o *OrderCustomer) GetID() string

func (*OrderCustomer) GetLocale ¶ added in v0.13.0

func (o *OrderCustomer) GetLocale() *string

func (*OrderCustomer) GetMetadata ¶

func (o *OrderCustomer) GetMetadata() map[string]MetadataOutputType

func (*OrderCustomer) GetModifiedAt ¶

func (o *OrderCustomer) GetModifiedAt() *time.Time

func (*OrderCustomer) GetName ¶

func (o *OrderCustomer) GetName() *string

func (*OrderCustomer) GetOrganizationID ¶

func (o *OrderCustomer) GetOrganizationID() string

func (*OrderCustomer) GetTaxID ¶

func (o *OrderCustomer) GetTaxID() []*OrderCustomerTaxID

func (*OrderCustomer) GetType ¶ added in v0.13.0

func (o *OrderCustomer) GetType() CustomerType

func (OrderCustomer) MarshalJSON ¶

func (o OrderCustomer) MarshalJSON() ([]byte, error)

func (*OrderCustomer) UnmarshalJSON ¶

func (o *OrderCustomer) UnmarshalJSON(data []byte) error

type OrderCustomerTaxID ¶

type OrderCustomerTaxID struct {
	Str         *string      `queryParam:"inline" union:"member"`
	TaxIDFormat *TaxIDFormat `queryParam:"inline" union:"member"`

	Type OrderCustomerTaxIDType
}

func CreateOrderCustomerTaxIDStr ¶

func CreateOrderCustomerTaxIDStr(str string) OrderCustomerTaxID

func CreateOrderCustomerTaxIDTaxIDFormat ¶

func CreateOrderCustomerTaxIDTaxIDFormat(taxIDFormat TaxIDFormat) OrderCustomerTaxID

func (OrderCustomerTaxID) MarshalJSON ¶

func (u OrderCustomerTaxID) MarshalJSON() ([]byte, error)

func (*OrderCustomerTaxID) UnmarshalJSON ¶

func (u *OrderCustomerTaxID) UnmarshalJSON(data []byte) error

type OrderCustomerTaxIDType ¶

type OrderCustomerTaxIDType string
const (
	OrderCustomerTaxIDTypeStr         OrderCustomerTaxIDType = "str"
	OrderCustomerTaxIDTypeTaxIDFormat OrderCustomerTaxIDType = "TaxIDFormat"
)

type OrderDiscount ¶

type OrderDiscount struct {
	DiscountFixedOnceForeverDurationBase      *DiscountFixedOnceForeverDurationBase      `queryParam:"inline" union:"member"`
	DiscountFixedRepeatDurationBase           *DiscountFixedRepeatDurationBase           `queryParam:"inline" union:"member"`
	DiscountPercentageOnceForeverDurationBase *DiscountPercentageOnceForeverDurationBase `queryParam:"inline" union:"member"`
	DiscountPercentageRepeatDurationBase      *DiscountPercentageRepeatDurationBase      `queryParam:"inline" union:"member"`

	Type OrderDiscountType
}

func CreateOrderDiscountDiscountFixedOnceForeverDurationBase ¶

func CreateOrderDiscountDiscountFixedOnceForeverDurationBase(discountFixedOnceForeverDurationBase DiscountFixedOnceForeverDurationBase) OrderDiscount

func CreateOrderDiscountDiscountFixedRepeatDurationBase ¶

func CreateOrderDiscountDiscountFixedRepeatDurationBase(discountFixedRepeatDurationBase DiscountFixedRepeatDurationBase) OrderDiscount

func CreateOrderDiscountDiscountPercentageOnceForeverDurationBase ¶

func CreateOrderDiscountDiscountPercentageOnceForeverDurationBase(discountPercentageOnceForeverDurationBase DiscountPercentageOnceForeverDurationBase) OrderDiscount

func CreateOrderDiscountDiscountPercentageRepeatDurationBase ¶

func CreateOrderDiscountDiscountPercentageRepeatDurationBase(discountPercentageRepeatDurationBase DiscountPercentageRepeatDurationBase) OrderDiscount

func (OrderDiscount) MarshalJSON ¶

func (u OrderDiscount) MarshalJSON() ([]byte, error)

func (*OrderDiscount) UnmarshalJSON ¶

func (u *OrderDiscount) UnmarshalJSON(data []byte) error

type OrderDiscountType ¶

type OrderDiscountType string
const (
	OrderDiscountTypeDiscountFixedOnceForeverDurationBase      OrderDiscountType = "DiscountFixedOnceForeverDurationBase"
	OrderDiscountTypeDiscountFixedRepeatDurationBase           OrderDiscountType = "DiscountFixedRepeatDurationBase"
	OrderDiscountTypeDiscountPercentageOnceForeverDurationBase OrderDiscountType = "DiscountPercentageOnceForeverDurationBase"
	OrderDiscountTypeDiscountPercentageRepeatDurationBase      OrderDiscountType = "DiscountPercentageRepeatDurationBase"
)

type OrderInvoice ¶

type OrderInvoice struct {
	// The URL to the invoice.
	URL string `json:"url"`
}

OrderInvoice - Order's invoice data.

func (*OrderInvoice) GetURL ¶

func (o *OrderInvoice) GetURL() string

type OrderItemSchema ¶ added in v0.4.6

type OrderItemSchema struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// Description of the line item charge.
	Label string `json:"label"`
	// Amount in cents, before discounts and taxes.
	Amount int64 `json:"amount"`
	// Sales tax amount in cents.
	TaxAmount int64 `json:"tax_amount"`
	// Whether this charge is due to a proration.
	Proration bool `json:"proration"`
	// Associated price ID, if any.
	ProductPriceID *string `json:"product_price_id"`
}

OrderItemSchema - An order line item.

func (*OrderItemSchema) GetAmount ¶ added in v0.4.6

func (o *OrderItemSchema) GetAmount() int64

func (*OrderItemSchema) GetCreatedAt ¶ added in v0.4.6

func (o *OrderItemSchema) GetCreatedAt() time.Time

func (*OrderItemSchema) GetID ¶ added in v0.4.6

func (o *OrderItemSchema) GetID() string

func (*OrderItemSchema) GetLabel ¶ added in v0.4.6

func (o *OrderItemSchema) GetLabel() string

func (*OrderItemSchema) GetModifiedAt ¶ added in v0.4.6

func (o *OrderItemSchema) GetModifiedAt() *time.Time

func (*OrderItemSchema) GetProductPriceID ¶ added in v0.4.6

func (o *OrderItemSchema) GetProductPriceID() *string

func (*OrderItemSchema) GetProration ¶ added in v0.4.6

func (o *OrderItemSchema) GetProration() bool

func (*OrderItemSchema) GetTaxAmount ¶ added in v0.4.6

func (o *OrderItemSchema) GetTaxAmount() int64

func (OrderItemSchema) MarshalJSON ¶ added in v0.4.6

func (o OrderItemSchema) MarshalJSON() ([]byte, error)

func (*OrderItemSchema) UnmarshalJSON ¶ added in v0.4.6

func (o *OrderItemSchema) UnmarshalJSON(data []byte) error

type OrderPaidEvent ¶ added in v0.12.0

type OrderPaidEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata OrderPaidMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

OrderPaidEvent - An event created by Polar when an order is paid.

func (*OrderPaidEvent) GetChildCount ¶ added in v0.12.0

func (o *OrderPaidEvent) GetChildCount() *int64

func (*OrderPaidEvent) GetCustomer ¶ added in v0.12.0

func (o *OrderPaidEvent) GetCustomer() *Customer

func (*OrderPaidEvent) GetCustomerID ¶ added in v0.12.0

func (o *OrderPaidEvent) GetCustomerID() *string

func (*OrderPaidEvent) GetCustomerIndividual ¶ added in v0.16.0

func (o *OrderPaidEvent) GetCustomerIndividual() *CustomerIndividual

func (*OrderPaidEvent) GetCustomerTeam ¶ added in v0.16.0

func (o *OrderPaidEvent) GetCustomerTeam() *CustomerTeam

func (*OrderPaidEvent) GetExternalCustomerID ¶ added in v0.12.0

func (o *OrderPaidEvent) GetExternalCustomerID() *string

func (*OrderPaidEvent) GetExternalMemberID ¶ added in v0.13.0

func (o *OrderPaidEvent) GetExternalMemberID() *string

func (*OrderPaidEvent) GetID ¶ added in v0.12.0

func (o *OrderPaidEvent) GetID() string

func (*OrderPaidEvent) GetLabel ¶ added in v0.13.0

func (o *OrderPaidEvent) GetLabel() string

func (*OrderPaidEvent) GetMemberID ¶ added in v0.13.0

func (o *OrderPaidEvent) GetMemberID() *string

func (*OrderPaidEvent) GetMetadata ¶ added in v0.12.0

func (o *OrderPaidEvent) GetMetadata() OrderPaidMetadata

func (*OrderPaidEvent) GetName ¶ added in v0.12.0

func (o *OrderPaidEvent) GetName() string

func (*OrderPaidEvent) GetOrganizationID ¶ added in v0.12.0

func (o *OrderPaidEvent) GetOrganizationID() string

func (*OrderPaidEvent) GetParentID ¶ added in v0.13.0

func (o *OrderPaidEvent) GetParentID() *string

func (*OrderPaidEvent) GetSource ¶ added in v0.12.0

func (o *OrderPaidEvent) GetSource() string

func (*OrderPaidEvent) GetTimestamp ¶ added in v0.12.0

func (o *OrderPaidEvent) GetTimestamp() time.Time

func (OrderPaidEvent) MarshalJSON ¶ added in v0.12.0

func (o OrderPaidEvent) MarshalJSON() ([]byte, error)

func (*OrderPaidEvent) UnmarshalJSON ¶ added in v0.12.0

func (o *OrderPaidEvent) UnmarshalJSON(data []byte) error

type OrderPaidMetadata ¶ added in v0.12.0

type OrderPaidMetadata struct {
	OrderID                string  `json:"order_id"`
	ProductID              *string `json:"product_id,omitempty"`
	BillingType            *string `json:"billing_type,omitempty"`
	Amount                 int64   `json:"amount"`
	Currency               *string `json:"currency,omitempty"`
	NetAmount              *int64  `json:"net_amount,omitempty"`
	TaxAmount              *int64  `json:"tax_amount,omitempty"`
	AppliedBalanceAmount   *int64  `json:"applied_balance_amount,omitempty"`
	DiscountAmount         *int64  `json:"discount_amount,omitempty"`
	DiscountID             *string `json:"discount_id,omitempty"`
	PlatformFee            *int64  `json:"platform_fee,omitempty"`
	SubscriptionID         *string `json:"subscription_id,omitempty"`
	RecurringInterval      *string `json:"recurring_interval,omitempty"`
	RecurringIntervalCount *int64  `json:"recurring_interval_count,omitempty"`
}

func (*OrderPaidMetadata) GetAmount ¶ added in v0.12.0

func (o *OrderPaidMetadata) GetAmount() int64

func (*OrderPaidMetadata) GetAppliedBalanceAmount ¶ added in v0.13.0

func (o *OrderPaidMetadata) GetAppliedBalanceAmount() *int64

func (*OrderPaidMetadata) GetBillingType ¶ added in v0.13.0

func (o *OrderPaidMetadata) GetBillingType() *string

func (*OrderPaidMetadata) GetCurrency ¶ added in v0.12.0

func (o *OrderPaidMetadata) GetCurrency() *string

func (*OrderPaidMetadata) GetDiscountAmount ¶ added in v0.13.0

func (o *OrderPaidMetadata) GetDiscountAmount() *int64

func (*OrderPaidMetadata) GetDiscountID ¶ added in v0.13.0

func (o *OrderPaidMetadata) GetDiscountID() *string

func (*OrderPaidMetadata) GetNetAmount ¶ added in v0.13.0

func (o *OrderPaidMetadata) GetNetAmount() *int64

func (*OrderPaidMetadata) GetOrderID ¶ added in v0.12.0

func (o *OrderPaidMetadata) GetOrderID() string

func (*OrderPaidMetadata) GetPlatformFee ¶ added in v0.13.0

func (o *OrderPaidMetadata) GetPlatformFee() *int64

func (*OrderPaidMetadata) GetProductID ¶ added in v0.13.0

func (o *OrderPaidMetadata) GetProductID() *string

func (*OrderPaidMetadata) GetRecurringInterval ¶ added in v0.13.0

func (o *OrderPaidMetadata) GetRecurringInterval() *string

func (*OrderPaidMetadata) GetRecurringIntervalCount ¶ added in v0.13.0

func (o *OrderPaidMetadata) GetRecurringIntervalCount() *int64

func (*OrderPaidMetadata) GetSubscriptionID ¶ added in v0.13.0

func (o *OrderPaidMetadata) GetSubscriptionID() *string

func (*OrderPaidMetadata) GetTaxAmount ¶ added in v0.13.0

func (o *OrderPaidMetadata) GetTaxAmount() *int64

func (OrderPaidMetadata) MarshalJSON ¶ added in v0.12.0

func (o OrderPaidMetadata) MarshalJSON() ([]byte, error)

func (*OrderPaidMetadata) UnmarshalJSON ¶ added in v0.12.0

func (o *OrderPaidMetadata) UnmarshalJSON(data []byte) error

type OrderProduct ¶

type OrderProduct struct {
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count"`
	// The name of the product.
	Name string `json:"name"`
	// The description of the product.
	Description *string           `json:"description"`
	Visibility  ProductVisibility `json:"visibility"`
	// The recurring interval of the product. If `None`, the product is a one-time purchase.
	RecurringInterval *SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
	RecurringIntervalCount *int64 `json:"recurring_interval_count"`
	// Whether the product is a subscription.
	IsRecurring bool `json:"is_recurring"`
	// Whether the product is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the organization owning the product.
	OrganizationID string `json:"organization_id"`
}

func (*OrderProduct) GetCreatedAt ¶

func (o *OrderProduct) GetCreatedAt() time.Time

func (*OrderProduct) GetDescription ¶

func (o *OrderProduct) GetDescription() *string

func (*OrderProduct) GetID ¶

func (o *OrderProduct) GetID() string

func (*OrderProduct) GetIsArchived ¶

func (o *OrderProduct) GetIsArchived() bool

func (*OrderProduct) GetIsRecurring ¶

func (o *OrderProduct) GetIsRecurring() bool

func (*OrderProduct) GetMetadata ¶ added in v0.4.13

func (o *OrderProduct) GetMetadata() map[string]MetadataOutputType

func (*OrderProduct) GetModifiedAt ¶

func (o *OrderProduct) GetModifiedAt() *time.Time

func (*OrderProduct) GetName ¶

func (o *OrderProduct) GetName() string

func (*OrderProduct) GetOrganizationID ¶

func (o *OrderProduct) GetOrganizationID() string

func (*OrderProduct) GetRecurringInterval ¶ added in v0.3.0

func (o *OrderProduct) GetRecurringInterval() *SubscriptionRecurringInterval

func (*OrderProduct) GetRecurringIntervalCount ¶ added in v0.12.0

func (o *OrderProduct) GetRecurringIntervalCount() *int64

func (*OrderProduct) GetTrialInterval ¶ added in v0.9.1

func (o *OrderProduct) GetTrialInterval() *TrialInterval

func (*OrderProduct) GetTrialIntervalCount ¶ added in v0.9.1

func (o *OrderProduct) GetTrialIntervalCount() *int64

func (*OrderProduct) GetVisibility ¶ added in v0.13.0

func (o *OrderProduct) GetVisibility() ProductVisibility

func (OrderProduct) MarshalJSON ¶

func (o OrderProduct) MarshalJSON() ([]byte, error)

func (*OrderProduct) UnmarshalJSON ¶

func (o *OrderProduct) UnmarshalJSON(data []byte) error

type OrderRefundedEvent ¶ added in v0.12.0

type OrderRefundedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata OrderRefundedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

OrderRefundedEvent - An event created by Polar when an order is refunded.

func (*OrderRefundedEvent) GetChildCount ¶ added in v0.12.0

func (o *OrderRefundedEvent) GetChildCount() *int64

func (*OrderRefundedEvent) GetCustomer ¶ added in v0.12.0

func (o *OrderRefundedEvent) GetCustomer() *Customer

func (*OrderRefundedEvent) GetCustomerID ¶ added in v0.12.0

func (o *OrderRefundedEvent) GetCustomerID() *string

func (*OrderRefundedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (o *OrderRefundedEvent) GetCustomerIndividual() *CustomerIndividual

func (*OrderRefundedEvent) GetCustomerTeam ¶ added in v0.16.0

func (o *OrderRefundedEvent) GetCustomerTeam() *CustomerTeam

func (*OrderRefundedEvent) GetExternalCustomerID ¶ added in v0.12.0

func (o *OrderRefundedEvent) GetExternalCustomerID() *string

func (*OrderRefundedEvent) GetExternalMemberID ¶ added in v0.13.0

func (o *OrderRefundedEvent) GetExternalMemberID() *string

func (*OrderRefundedEvent) GetID ¶ added in v0.12.0

func (o *OrderRefundedEvent) GetID() string

func (*OrderRefundedEvent) GetLabel ¶ added in v0.13.0

func (o *OrderRefundedEvent) GetLabel() string

func (*OrderRefundedEvent) GetMemberID ¶ added in v0.13.0

func (o *OrderRefundedEvent) GetMemberID() *string

func (*OrderRefundedEvent) GetMetadata ¶ added in v0.12.0

func (o *OrderRefundedEvent) GetMetadata() OrderRefundedMetadata

func (*OrderRefundedEvent) GetName ¶ added in v0.12.0

func (o *OrderRefundedEvent) GetName() string

func (*OrderRefundedEvent) GetOrganizationID ¶ added in v0.12.0

func (o *OrderRefundedEvent) GetOrganizationID() string

func (*OrderRefundedEvent) GetParentID ¶ added in v0.13.0

func (o *OrderRefundedEvent) GetParentID() *string

func (*OrderRefundedEvent) GetSource ¶ added in v0.12.0

func (o *OrderRefundedEvent) GetSource() string

func (*OrderRefundedEvent) GetTimestamp ¶ added in v0.12.0

func (o *OrderRefundedEvent) GetTimestamp() time.Time

func (OrderRefundedEvent) MarshalJSON ¶ added in v0.12.0

func (o OrderRefundedEvent) MarshalJSON() ([]byte, error)

func (*OrderRefundedEvent) UnmarshalJSON ¶ added in v0.12.0

func (o *OrderRefundedEvent) UnmarshalJSON(data []byte) error

type OrderRefundedMetadata ¶ added in v0.12.0

type OrderRefundedMetadata struct {
	OrderID        string `json:"order_id"`
	RefundedAmount int64  `json:"refunded_amount"`
	Currency       string `json:"currency"`
}

func (*OrderRefundedMetadata) GetCurrency ¶ added in v0.12.0

func (o *OrderRefundedMetadata) GetCurrency() string

func (*OrderRefundedMetadata) GetOrderID ¶ added in v0.12.0

func (o *OrderRefundedMetadata) GetOrderID() string

func (*OrderRefundedMetadata) GetRefundedAmount ¶ added in v0.12.0

func (o *OrderRefundedMetadata) GetRefundedAmount() int64

func (OrderRefundedMetadata) MarshalJSON ¶ added in v0.12.0

func (o OrderRefundedMetadata) MarshalJSON() ([]byte, error)

func (*OrderRefundedMetadata) UnmarshalJSON ¶ added in v0.12.0

func (o *OrderRefundedMetadata) UnmarshalJSON(data []byte) error

type OrderSortProperty ¶

type OrderSortProperty string
const (
	OrderSortPropertyCreatedAt          OrderSortProperty = "created_at"
	OrderSortPropertyMinusCreatedAt     OrderSortProperty = "-created_at"
	OrderSortPropertyStatus             OrderSortProperty = "status"
	OrderSortPropertyMinusStatus        OrderSortProperty = "-status"
	OrderSortPropertyInvoiceNumber      OrderSortProperty = "invoice_number"
	OrderSortPropertyMinusInvoiceNumber OrderSortProperty = "-invoice_number"
	OrderSortPropertyAmount             OrderSortProperty = "amount"
	OrderSortPropertyMinusAmount        OrderSortProperty = "-amount"
	OrderSortPropertyNetAmount          OrderSortProperty = "net_amount"
	OrderSortPropertyMinusNetAmount     OrderSortProperty = "-net_amount"
	OrderSortPropertyCustomer           OrderSortProperty = "customer"
	OrderSortPropertyMinusCustomer      OrderSortProperty = "-customer"
	OrderSortPropertyProduct            OrderSortProperty = "product"
	OrderSortPropertyMinusProduct       OrderSortProperty = "-product"
	OrderSortPropertyDiscount           OrderSortProperty = "discount"
	OrderSortPropertyMinusDiscount      OrderSortProperty = "-discount"
	OrderSortPropertySubscription       OrderSortProperty = "subscription"
	OrderSortPropertyMinusSubscription  OrderSortProperty = "-subscription"
)

func (OrderSortProperty) ToPointer ¶

func (e OrderSortProperty) ToPointer() *OrderSortProperty

func (*OrderSortProperty) UnmarshalJSON ¶

func (e *OrderSortProperty) UnmarshalJSON(data []byte) error

type OrderStatus ¶ added in v0.4.7

type OrderStatus string
const (
	OrderStatusPending           OrderStatus = "pending"
	OrderStatusPaid              OrderStatus = "paid"
	OrderStatusRefunded          OrderStatus = "refunded"
	OrderStatusPartiallyRefunded OrderStatus = "partially_refunded"
	OrderStatusVoid              OrderStatus = "void"
)

func (OrderStatus) ToPointer ¶ added in v0.4.7

func (e OrderStatus) ToPointer() *OrderStatus

func (*OrderStatus) UnmarshalJSON ¶ added in v0.4.7

func (e *OrderStatus) UnmarshalJSON(data []byte) error

type OrderSubscription ¶

type OrderSubscription struct {
	Metadata map[string]MetadataOutputType `json:"metadata"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The amount of the subscription.
	Amount int64 `json:"amount"`
	// The currency of the subscription.
	Currency          string                        `json:"currency"`
	RecurringInterval SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.
	RecurringIntervalCount int64              `json:"recurring_interval_count"`
	Status                 SubscriptionStatus `json:"status"`
	// The start timestamp of the current billing period.
	CurrentPeriodStart time.Time `json:"current_period_start"`
	// The end timestamp of the current billing period.
	CurrentPeriodEnd time.Time `json:"current_period_end"`
	// The start timestamp of the trial period, if any.
	TrialStart *time.Time `json:"trial_start"`
	// The end timestamp of the trial period, if any.
	TrialEnd *time.Time `json:"trial_end"`
	// Whether the subscription will be canceled at the end of the current period.
	CancelAtPeriodEnd bool `json:"cancel_at_period_end"`
	// The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.
	CanceledAt *time.Time `json:"canceled_at"`
	// The timestamp when the subscription started.
	StartedAt *time.Time `json:"started_at"`
	// The timestamp when the subscription will end.
	EndsAt *time.Time `json:"ends_at"`
	// The timestamp when the subscription ended.
	EndedAt *time.Time `json:"ended_at"`
	// The ID of the subscribed customer.
	CustomerID string `json:"customer_id"`
	// The ID of the subscribed product.
	ProductID string `json:"product_id"`
	// The ID of the applied discount, if any.
	DiscountID *string `json:"discount_id"`
	CheckoutID *string `json:"checkout_id"`
	// The number of seats for seat-based subscriptions. None for non-seat subscriptions.
	Seats                       *int64                      `json:"seats,omitempty"`
	CustomerCancellationReason  *CustomerCancellationReason `json:"customer_cancellation_reason"`
	CustomerCancellationComment *string                     `json:"customer_cancellation_comment"`
}

func (*OrderSubscription) GetAmount ¶

func (o *OrderSubscription) GetAmount() int64

func (*OrderSubscription) GetCancelAtPeriodEnd ¶

func (o *OrderSubscription) GetCancelAtPeriodEnd() bool

func (*OrderSubscription) GetCanceledAt ¶ added in v0.1.1

func (o *OrderSubscription) GetCanceledAt() *time.Time

func (*OrderSubscription) GetCheckoutID ¶

func (o *OrderSubscription) GetCheckoutID() *string

func (*OrderSubscription) GetCreatedAt ¶

func (o *OrderSubscription) GetCreatedAt() time.Time

func (*OrderSubscription) GetCurrency ¶

func (o *OrderSubscription) GetCurrency() string

func (*OrderSubscription) GetCurrentPeriodEnd ¶

func (o *OrderSubscription) GetCurrentPeriodEnd() time.Time

func (*OrderSubscription) GetCurrentPeriodStart ¶

func (o *OrderSubscription) GetCurrentPeriodStart() time.Time

func (*OrderSubscription) GetCustomerCancellationComment ¶ added in v0.1.1

func (o *OrderSubscription) GetCustomerCancellationComment() *string

func (*OrderSubscription) GetCustomerCancellationReason ¶ added in v0.1.1

func (o *OrderSubscription) GetCustomerCancellationReason() *CustomerCancellationReason

func (*OrderSubscription) GetCustomerID ¶

func (o *OrderSubscription) GetCustomerID() string

func (*OrderSubscription) GetDiscountID ¶

func (o *OrderSubscription) GetDiscountID() *string

func (*OrderSubscription) GetEndedAt ¶

func (o *OrderSubscription) GetEndedAt() *time.Time

func (*OrderSubscription) GetEndsAt ¶ added in v0.1.1

func (o *OrderSubscription) GetEndsAt() *time.Time

func (*OrderSubscription) GetID ¶

func (o *OrderSubscription) GetID() string

func (*OrderSubscription) GetMetadata ¶

func (o *OrderSubscription) GetMetadata() map[string]MetadataOutputType

func (*OrderSubscription) GetModifiedAt ¶

func (o *OrderSubscription) GetModifiedAt() *time.Time

func (*OrderSubscription) GetProductID ¶

func (o *OrderSubscription) GetProductID() string

func (*OrderSubscription) GetRecurringInterval ¶

func (o *OrderSubscription) GetRecurringInterval() SubscriptionRecurringInterval

func (*OrderSubscription) GetRecurringIntervalCount ¶ added in v0.12.0

func (o *OrderSubscription) GetRecurringIntervalCount() int64

func (*OrderSubscription) GetSeats ¶ added in v0.12.0

func (o *OrderSubscription) GetSeats() *int64

func (*OrderSubscription) GetStartedAt ¶

func (o *OrderSubscription) GetStartedAt() *time.Time

func (*OrderSubscription) GetStatus ¶

func (o *OrderSubscription) GetStatus() SubscriptionStatus

func (*OrderSubscription) GetTrialEnd ¶ added in v0.9.1

func (o *OrderSubscription) GetTrialEnd() *time.Time

func (*OrderSubscription) GetTrialStart ¶ added in v0.9.1

func (o *OrderSubscription) GetTrialStart() *time.Time

func (OrderSubscription) MarshalJSON ¶

func (o OrderSubscription) MarshalJSON() ([]byte, error)

func (*OrderSubscription) UnmarshalJSON ¶

func (o *OrderSubscription) UnmarshalJSON(data []byte) error

type OrderUpdate ¶ added in v0.5.0

type OrderUpdate struct {
	// The name of the customer that should appear on the invoice.
	BillingName *string `json:"billing_name,omitempty"`
	// The address of the customer that should appear on the invoice. Country and state fields cannot be updated.
	BillingAddress *AddressInput `json:"billing_address,omitempty"`
}

OrderUpdate - Schema to update an order.

func (*OrderUpdate) GetBillingAddress ¶ added in v0.5.0

func (o *OrderUpdate) GetBillingAddress() *AddressInput

func (*OrderUpdate) GetBillingName ¶ added in v0.5.0

func (o *OrderUpdate) GetBillingName() *string

type OrderVoidedEvent ¶ added in v0.16.0

type OrderVoidedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata OrderVoidedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

OrderVoidedEvent - An event created by Polar when an order is voided.

func (*OrderVoidedEvent) GetChildCount ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetChildCount() *int64

func (*OrderVoidedEvent) GetCustomer ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetCustomer() *Customer

func (*OrderVoidedEvent) GetCustomerID ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetCustomerID() *string

func (*OrderVoidedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetCustomerIndividual() *CustomerIndividual

func (*OrderVoidedEvent) GetCustomerTeam ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetCustomerTeam() *CustomerTeam

func (*OrderVoidedEvent) GetExternalCustomerID ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetExternalCustomerID() *string

func (*OrderVoidedEvent) GetExternalMemberID ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetExternalMemberID() *string

func (*OrderVoidedEvent) GetID ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetID() string

func (*OrderVoidedEvent) GetLabel ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetLabel() string

func (*OrderVoidedEvent) GetMemberID ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetMemberID() *string

func (*OrderVoidedEvent) GetMetadata ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetMetadata() OrderVoidedMetadata

func (*OrderVoidedEvent) GetName ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetName() string

func (*OrderVoidedEvent) GetOrganizationID ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetOrganizationID() string

func (*OrderVoidedEvent) GetParentID ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetParentID() *string

func (*OrderVoidedEvent) GetSource ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetSource() string

func (*OrderVoidedEvent) GetTimestamp ¶ added in v0.16.0

func (o *OrderVoidedEvent) GetTimestamp() time.Time

func (OrderVoidedEvent) MarshalJSON ¶ added in v0.16.0

func (o OrderVoidedEvent) MarshalJSON() ([]byte, error)

func (*OrderVoidedEvent) UnmarshalJSON ¶ added in v0.16.0

func (o *OrderVoidedEvent) UnmarshalJSON(data []byte) error

type OrderVoidedMetadata ¶ added in v0.16.0

type OrderVoidedMetadata struct {
	OrderID  string `json:"order_id"`
	Amount   int64  `json:"amount"`
	Currency string `json:"currency"`
}

func (*OrderVoidedMetadata) GetAmount ¶ added in v0.16.0

func (o *OrderVoidedMetadata) GetAmount() int64

func (*OrderVoidedMetadata) GetCurrency ¶ added in v0.16.0

func (o *OrderVoidedMetadata) GetCurrency() string

func (*OrderVoidedMetadata) GetOrderID ¶ added in v0.16.0

func (o *OrderVoidedMetadata) GetOrderID() string

func (OrderVoidedMetadata) MarshalJSON ¶ added in v0.16.0

func (o OrderVoidedMetadata) MarshalJSON() ([]byte, error)

func (*OrderVoidedMetadata) UnmarshalJSON ¶ added in v0.16.0

func (o *OrderVoidedMetadata) UnmarshalJSON(data []byte) error

type Orders ¶ added in v0.4.17

type Orders struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type OrdersType
}

func CreateOrdersInteger ¶ added in v0.4.17

func CreateOrdersInteger(integer int64) Orders

func CreateOrdersNumber ¶ added in v0.4.17

func CreateOrdersNumber(number float64) Orders

func (Orders) MarshalJSON ¶ added in v0.4.17

func (u Orders) MarshalJSON() ([]byte, error)

func (*Orders) UnmarshalJSON ¶ added in v0.4.17

func (u *Orders) UnmarshalJSON(data []byte) error

type OrdersType ¶ added in v0.4.17

type OrdersType string
const (
	OrdersTypeInteger OrdersType = "integer"
	OrdersTypeNumber  OrdersType = "number"
)

type Organization ¶

type Organization struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// Organization name shown in checkout, customer portal, emails etc.
	Name string `json:"name"`
	// Unique organization slug in checkout, customer portal and credit card statements.
	Slug string `json:"slug"`
	// Avatar URL shown in checkout, customer portal, emails etc.
	AvatarURL         *string                       `json:"avatar_url"`
	ProrationBehavior SubscriptionProrationBehavior `json:"proration_behavior"`
	// Whether customers can update their subscriptions from the customer portal.
	AllowCustomerUpdates bool `json:"allow_customer_updates"`
	// Public support email.
	Email *string `json:"email"`
	// Official website of the organization.
	Website *string `json:"website"`
	// Links to social profiles.
	Socials []OrganizationSocialLink `json:"socials"`
	Status  OrganizationStatus       `json:"status"`
	// When the business details were submitted for review.
	DetailsSubmittedAt *time.Time `json:"details_submitted_at"`
	// Default presentment currency. Used as fallback in checkout and customer portal, if the customer's local currency is not available.
	DefaultPresentmentCurrency string            `json:"default_presentment_currency"`
	DefaultTaxBehavior         TaxBehaviorOption `json:"default_tax_behavior"`
	// Organization feature settings
	FeatureSettings        *OrganizationFeatureSettings       `json:"feature_settings"`
	SubscriptionSettings   OrganizationSubscriptionSettings   `json:"subscription_settings"`
	NotificationSettings   OrganizationNotificationSettings   `json:"notification_settings"`
	CustomerEmailSettings  OrganizationCustomerEmailSettings  `json:"customer_email_settings"`
	CustomerPortalSettings OrganizationCustomerPortalSettings `json:"customer_portal_settings"`
	// Two-letter country code (ISO 3166-1 alpha-2).
	Country *CountryAlpha2 `json:"country,omitempty"`
}

func (*Organization) GetAllowCustomerUpdates ¶ added in v0.13.0

func (o *Organization) GetAllowCustomerUpdates() bool

func (*Organization) GetAvatarURL ¶

func (o *Organization) GetAvatarURL() *string

func (*Organization) GetCountry ¶ added in v0.15.1

func (o *Organization) GetCountry() *CountryAlpha2

func (*Organization) GetCreatedAt ¶

func (o *Organization) GetCreatedAt() time.Time

func (*Organization) GetCustomerEmailSettings ¶ added in v0.11.0

func (o *Organization) GetCustomerEmailSettings() OrganizationCustomerEmailSettings

func (*Organization) GetCustomerPortalSettings ¶ added in v0.13.0

func (o *Organization) GetCustomerPortalSettings() OrganizationCustomerPortalSettings

func (*Organization) GetDefaultPresentmentCurrency ¶ added in v0.13.0

func (o *Organization) GetDefaultPresentmentCurrency() string

func (*Organization) GetDefaultTaxBehavior ¶ added in v0.15.1

func (o *Organization) GetDefaultTaxBehavior() TaxBehaviorOption

func (*Organization) GetDetailsSubmittedAt ¶ added in v0.4.6

func (o *Organization) GetDetailsSubmittedAt() *time.Time

func (*Organization) GetEmail ¶

func (o *Organization) GetEmail() *string

func (*Organization) GetFeatureSettings ¶

func (o *Organization) GetFeatureSettings() *OrganizationFeatureSettings

func (*Organization) GetID ¶

func (o *Organization) GetID() string

func (*Organization) GetModifiedAt ¶

func (o *Organization) GetModifiedAt() *time.Time

func (*Organization) GetName ¶

func (o *Organization) GetName() string

func (*Organization) GetNotificationSettings ¶ added in v0.7.2

func (o *Organization) GetNotificationSettings() OrganizationNotificationSettings

func (*Organization) GetProrationBehavior ¶ added in v0.13.0

func (o *Organization) GetProrationBehavior() SubscriptionProrationBehavior

func (*Organization) GetSlug ¶

func (o *Organization) GetSlug() string

func (*Organization) GetSocials ¶ added in v0.4.6

func (o *Organization) GetSocials() []OrganizationSocialLink

func (*Organization) GetStatus ¶ added in v0.8.3

func (o *Organization) GetStatus() OrganizationStatus

func (*Organization) GetSubscriptionSettings ¶ added in v0.1.7

func (o *Organization) GetSubscriptionSettings() OrganizationSubscriptionSettings

func (*Organization) GetWebsite ¶ added in v0.4.6

func (o *Organization) GetWebsite() *string

func (Organization) MarshalJSON ¶

func (o Organization) MarshalJSON() ([]byte, error)

func (*Organization) UnmarshalJSON ¶

func (o *Organization) UnmarshalJSON(data []byte) error

type OrganizationAccessToken ¶ added in v0.13.0

type OrganizationAccessToken struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	ID         string     `json:"id"`
	Scopes     []Scope    `json:"scopes"`
	ExpiresAt  *time.Time `json:"expires_at"`
	Comment    string     `json:"comment"`
	LastUsedAt *time.Time `json:"last_used_at"`
	// The organization ID.
	OrganizationID string `json:"organization_id"`
}

func (*OrganizationAccessToken) GetComment ¶ added in v0.13.0

func (o *OrganizationAccessToken) GetComment() string

func (*OrganizationAccessToken) GetCreatedAt ¶ added in v0.13.0

func (o *OrganizationAccessToken) GetCreatedAt() time.Time

func (*OrganizationAccessToken) GetExpiresAt ¶ added in v0.13.0

func (o *OrganizationAccessToken) GetExpiresAt() *time.Time

func (*OrganizationAccessToken) GetID ¶ added in v0.13.0

func (o *OrganizationAccessToken) GetID() string

func (*OrganizationAccessToken) GetLastUsedAt ¶ added in v0.13.0

func (o *OrganizationAccessToken) GetLastUsedAt() *time.Time

func (*OrganizationAccessToken) GetModifiedAt ¶ added in v0.13.0

func (o *OrganizationAccessToken) GetModifiedAt() *time.Time

func (*OrganizationAccessToken) GetOrganizationID ¶ added in v0.13.0

func (o *OrganizationAccessToken) GetOrganizationID() string

func (*OrganizationAccessToken) GetScopes ¶ added in v0.13.0

func (o *OrganizationAccessToken) GetScopes() []Scope

func (OrganizationAccessToken) MarshalJSON ¶ added in v0.13.0

func (o OrganizationAccessToken) MarshalJSON() ([]byte, error)

func (*OrganizationAccessToken) UnmarshalJSON ¶ added in v0.13.0

func (o *OrganizationAccessToken) UnmarshalJSON(data []byte) error

type OrganizationAccessTokenCreate ¶ added in v0.13.0

type OrganizationAccessTokenCreate struct {
	OrganizationID *string          `json:"organization_id,omitempty"`
	Comment        string           `json:"comment"`
	ExpiresIn      *string          `json:"expires_in,omitempty"`
	Scopes         []AvailableScope `json:"scopes"`
}

func (*OrganizationAccessTokenCreate) GetComment ¶ added in v0.13.0

func (o *OrganizationAccessTokenCreate) GetComment() string

func (*OrganizationAccessTokenCreate) GetExpiresIn ¶ added in v0.13.0

func (o *OrganizationAccessTokenCreate) GetExpiresIn() *string

func (*OrganizationAccessTokenCreate) GetOrganizationID ¶ added in v0.13.0

func (o *OrganizationAccessTokenCreate) GetOrganizationID() *string

func (*OrganizationAccessTokenCreate) GetScopes ¶ added in v0.13.0

type OrganizationAccessTokenCreateResponse ¶ added in v0.13.0

type OrganizationAccessTokenCreateResponse struct {
	OrganizationAccessToken OrganizationAccessToken `json:"organization_access_token"`
	Token                   string                  `json:"token"`
}

func (*OrganizationAccessTokenCreateResponse) GetOrganizationAccessToken ¶ added in v0.13.0

func (o *OrganizationAccessTokenCreateResponse) GetOrganizationAccessToken() OrganizationAccessToken

func (*OrganizationAccessTokenCreateResponse) GetToken ¶ added in v0.13.0

type OrganizationAccessTokenSortProperty ¶ added in v0.13.0

type OrganizationAccessTokenSortProperty string
const (
	OrganizationAccessTokenSortPropertyCreatedAt           OrganizationAccessTokenSortProperty = "created_at"
	OrganizationAccessTokenSortPropertyMinusCreatedAt      OrganizationAccessTokenSortProperty = "-created_at"
	OrganizationAccessTokenSortPropertyComment             OrganizationAccessTokenSortProperty = "comment"
	OrganizationAccessTokenSortPropertyMinusComment        OrganizationAccessTokenSortProperty = "-comment"
	OrganizationAccessTokenSortPropertyLastUsedAt          OrganizationAccessTokenSortProperty = "last_used_at"
	OrganizationAccessTokenSortPropertyMinusLastUsedAt     OrganizationAccessTokenSortProperty = "-last_used_at"
	OrganizationAccessTokenSortPropertyOrganizationID      OrganizationAccessTokenSortProperty = "organization_id"
	OrganizationAccessTokenSortPropertyMinusOrganizationID OrganizationAccessTokenSortProperty = "-organization_id"
)

func (OrganizationAccessTokenSortProperty) ToPointer ¶ added in v0.13.0

func (*OrganizationAccessTokenSortProperty) UnmarshalJSON ¶ added in v0.13.0

func (e *OrganizationAccessTokenSortProperty) UnmarshalJSON(data []byte) error

type OrganizationAccessTokenUpdate ¶ added in v0.13.0

type OrganizationAccessTokenUpdate struct {
	Comment *string          `json:"comment,omitempty"`
	Scopes  []AvailableScope `json:"scopes,omitempty"`
}

func (*OrganizationAccessTokenUpdate) GetComment ¶ added in v0.13.0

func (o *OrganizationAccessTokenUpdate) GetComment() *string

func (*OrganizationAccessTokenUpdate) GetScopes ¶ added in v0.13.0

type OrganizationAvatarFileCreate ¶

type OrganizationAvatarFileCreate struct {
	OrganizationID *string `json:"organization_id,omitempty"`
	Name           string  `json:"name"`
	// MIME type of the file. Only images are supported for this type of file.
	MimeType string `json:"mime_type"`
	// Size of the file. A maximum of 1 MB is allowed for this type of file.
	Size                 int64                 `json:"size"`
	ChecksumSha256Base64 *string               `json:"checksum_sha256_base64,omitempty"`
	Upload               S3FileCreateMultipart `json:"upload"`

	Version *string `json:"version,omitempty"`
	// contains filtered or unexported fields
}

OrganizationAvatarFileCreate - Schema to create a file to be used as an organization avatar.

func (*OrganizationAvatarFileCreate) GetChecksumSha256Base64 ¶

func (o *OrganizationAvatarFileCreate) GetChecksumSha256Base64() *string

func (*OrganizationAvatarFileCreate) GetMimeType ¶

func (o *OrganizationAvatarFileCreate) GetMimeType() string

func (*OrganizationAvatarFileCreate) GetName ¶

func (o *OrganizationAvatarFileCreate) GetName() string

func (*OrganizationAvatarFileCreate) GetOrganizationID ¶

func (o *OrganizationAvatarFileCreate) GetOrganizationID() *string

func (*OrganizationAvatarFileCreate) GetService ¶

func (o *OrganizationAvatarFileCreate) GetService() string

func (*OrganizationAvatarFileCreate) GetSize ¶

func (o *OrganizationAvatarFileCreate) GetSize() int64

func (*OrganizationAvatarFileCreate) GetUpload ¶

func (*OrganizationAvatarFileCreate) GetVersion ¶

func (o *OrganizationAvatarFileCreate) GetVersion() *string

func (OrganizationAvatarFileCreate) MarshalJSON ¶

func (o OrganizationAvatarFileCreate) MarshalJSON() ([]byte, error)

func (*OrganizationAvatarFileCreate) UnmarshalJSON ¶

func (o *OrganizationAvatarFileCreate) UnmarshalJSON(data []byte) error

type OrganizationAvatarFileRead ¶

type OrganizationAvatarFileRead struct {
	// The ID of the object.
	ID                   string     `json:"id"`
	OrganizationID       string     `json:"organization_id"`
	Name                 string     `json:"name"`
	Path                 string     `json:"path"`
	MimeType             string     `json:"mime_type"`
	Size                 int64      `json:"size"`
	StorageVersion       *string    `json:"storage_version"`
	ChecksumEtag         *string    `json:"checksum_etag"`
	ChecksumSha256Base64 *string    `json:"checksum_sha256_base64"`
	ChecksumSha256Hex    *string    `json:"checksum_sha256_hex"`
	LastModifiedAt       *time.Time `json:"last_modified_at"`
	Version              *string    `json:"version"`

	IsUploaded   bool      `json:"is_uploaded"`
	CreatedAt    time.Time `json:"created_at"`
	SizeReadable string    `json:"size_readable"`
	PublicURL    string    `json:"public_url"`
	// contains filtered or unexported fields
}

OrganizationAvatarFileRead - File to be used as an organization avatar.

func (*OrganizationAvatarFileRead) GetChecksumEtag ¶

func (o *OrganizationAvatarFileRead) GetChecksumEtag() *string

func (*OrganizationAvatarFileRead) GetChecksumSha256Base64 ¶

func (o *OrganizationAvatarFileRead) GetChecksumSha256Base64() *string

func (*OrganizationAvatarFileRead) GetChecksumSha256Hex ¶

func (o *OrganizationAvatarFileRead) GetChecksumSha256Hex() *string

func (*OrganizationAvatarFileRead) GetCreatedAt ¶

func (o *OrganizationAvatarFileRead) GetCreatedAt() time.Time

func (*OrganizationAvatarFileRead) GetID ¶

func (*OrganizationAvatarFileRead) GetIsUploaded ¶

func (o *OrganizationAvatarFileRead) GetIsUploaded() bool

func (*OrganizationAvatarFileRead) GetLastModifiedAt ¶

func (o *OrganizationAvatarFileRead) GetLastModifiedAt() *time.Time

func (*OrganizationAvatarFileRead) GetMimeType ¶

func (o *OrganizationAvatarFileRead) GetMimeType() string

func (*OrganizationAvatarFileRead) GetName ¶

func (o *OrganizationAvatarFileRead) GetName() string

func (*OrganizationAvatarFileRead) GetOrganizationID ¶

func (o *OrganizationAvatarFileRead) GetOrganizationID() string

func (*OrganizationAvatarFileRead) GetPath ¶

func (o *OrganizationAvatarFileRead) GetPath() string

func (*OrganizationAvatarFileRead) GetPublicURL ¶

func (o *OrganizationAvatarFileRead) GetPublicURL() string

func (*OrganizationAvatarFileRead) GetService ¶

func (o *OrganizationAvatarFileRead) GetService() string

func (*OrganizationAvatarFileRead) GetSize ¶

func (o *OrganizationAvatarFileRead) GetSize() int64

func (*OrganizationAvatarFileRead) GetSizeReadable ¶

func (o *OrganizationAvatarFileRead) GetSizeReadable() string

func (*OrganizationAvatarFileRead) GetStorageVersion ¶

func (o *OrganizationAvatarFileRead) GetStorageVersion() *string

func (*OrganizationAvatarFileRead) GetVersion ¶

func (o *OrganizationAvatarFileRead) GetVersion() *string

func (OrganizationAvatarFileRead) MarshalJSON ¶

func (o OrganizationAvatarFileRead) MarshalJSON() ([]byte, error)

func (*OrganizationAvatarFileRead) UnmarshalJSON ¶

func (o *OrganizationAvatarFileRead) UnmarshalJSON(data []byte) error

type OrganizationCompanyLegalEntitySchema ¶ added in v0.15.1

type OrganizationCompanyLegalEntitySchema struct {
	RegisteredName string `json:"registered_name"`
	// contains filtered or unexported fields
}

func (*OrganizationCompanyLegalEntitySchema) GetRegisteredName ¶ added in v0.15.1

func (o *OrganizationCompanyLegalEntitySchema) GetRegisteredName() string

func (*OrganizationCompanyLegalEntitySchema) GetType ¶ added in v0.15.1

func (OrganizationCompanyLegalEntitySchema) MarshalJSON ¶ added in v0.15.1

func (o OrganizationCompanyLegalEntitySchema) MarshalJSON() ([]byte, error)

func (*OrganizationCompanyLegalEntitySchema) UnmarshalJSON ¶ added in v0.15.1

func (o *OrganizationCompanyLegalEntitySchema) UnmarshalJSON(data []byte) error

type OrganizationCreate ¶

type OrganizationCreate struct {
	Name        string       `json:"name"`
	Slug        string       `json:"slug"`
	AvatarURL   *string      `json:"avatar_url,omitempty"`
	LegalEntity *LegalEntity `json:"legal_entity,omitempty"`
	// Public support email.
	Email *string `json:"email,omitempty"`
	// Official website of the organization.
	Website *string `json:"website,omitempty"`
	// Link to social profiles.
	Socials []OrganizationSocialLink `json:"socials,omitempty"`
	// Additional, private, business details Polar needs about active organizations for compliance (KYC).
	Details *OrganizationDetails `json:"details,omitempty"`
	// Two-letter country code (ISO 3166-1 alpha-2).
	Country                    *CountryAlpha2Input                 `json:"country,omitempty"`
	FeatureSettings            *OrganizationFeatureSettings        `json:"feature_settings,omitempty"`
	SubscriptionSettings       *OrganizationSubscriptionSettings   `json:"subscription_settings,omitempty"`
	NotificationSettings       *OrganizationNotificationSettings   `json:"notification_settings,omitempty"`
	CustomerEmailSettings      *OrganizationCustomerEmailSettings  `json:"customer_email_settings,omitempty"`
	CustomerPortalSettings     *OrganizationCustomerPortalSettings `json:"customer_portal_settings,omitempty"`
	DefaultPresentmentCurrency *PresentmentCurrency                `json:"default_presentment_currency,omitempty"`
	DefaultTaxBehavior         *TaxBehaviorOption                  `json:"default_tax_behavior,omitempty"`
}

func (*OrganizationCreate) GetAvatarURL ¶

func (o *OrganizationCreate) GetAvatarURL() *string

func (*OrganizationCreate) GetCountry ¶ added in v0.15.1

func (o *OrganizationCreate) GetCountry() *CountryAlpha2Input

func (*OrganizationCreate) GetCustomerEmailSettings ¶ added in v0.11.0

func (o *OrganizationCreate) GetCustomerEmailSettings() *OrganizationCustomerEmailSettings

func (*OrganizationCreate) GetCustomerPortalSettings ¶ added in v0.13.0

func (o *OrganizationCreate) GetCustomerPortalSettings() *OrganizationCustomerPortalSettings

func (*OrganizationCreate) GetDefaultPresentmentCurrency ¶ added in v0.13.0

func (o *OrganizationCreate) GetDefaultPresentmentCurrency() *PresentmentCurrency

func (*OrganizationCreate) GetDefaultTaxBehavior ¶ added in v0.15.1

func (o *OrganizationCreate) GetDefaultTaxBehavior() *TaxBehaviorOption

func (*OrganizationCreate) GetDetails ¶ added in v0.4.6

func (o *OrganizationCreate) GetDetails() *OrganizationDetails

func (*OrganizationCreate) GetEmail ¶ added in v0.4.6

func (o *OrganizationCreate) GetEmail() *string

func (*OrganizationCreate) GetFeatureSettings ¶

func (o *OrganizationCreate) GetFeatureSettings() *OrganizationFeatureSettings

func (*OrganizationCreate) GetLegalEntity ¶ added in v0.15.1

func (o *OrganizationCreate) GetLegalEntity() *LegalEntity

func (*OrganizationCreate) GetLegalEntityCompany ¶ added in v0.15.1

func (o *OrganizationCreate) GetLegalEntityCompany() *OrganizationCompanyLegalEntitySchema

func (*OrganizationCreate) GetLegalEntityIndividual ¶ added in v0.15.1

func (o *OrganizationCreate) GetLegalEntityIndividual() *OrganizationIndividualLegalEntitySchema

func (*OrganizationCreate) GetName ¶

func (o *OrganizationCreate) GetName() string

func (*OrganizationCreate) GetNotificationSettings ¶ added in v0.7.2

func (o *OrganizationCreate) GetNotificationSettings() *OrganizationNotificationSettings

func (*OrganizationCreate) GetSlug ¶

func (o *OrganizationCreate) GetSlug() string

func (*OrganizationCreate) GetSocials ¶ added in v0.4.6

func (o *OrganizationCreate) GetSocials() []OrganizationSocialLink

func (*OrganizationCreate) GetSubscriptionSettings ¶ added in v0.1.7

func (o *OrganizationCreate) GetSubscriptionSettings() *OrganizationSubscriptionSettings

func (*OrganizationCreate) GetWebsite ¶ added in v0.4.6

func (o *OrganizationCreate) GetWebsite() *string

type OrganizationCustomerEmailSettings ¶ added in v0.11.0

type OrganizationCustomerEmailSettings struct {
	OrderConfirmation                   bool `json:"order_confirmation"`
	SubscriptionCancellation            bool `json:"subscription_cancellation"`
	SubscriptionConfirmation            bool `json:"subscription_confirmation"`
	SubscriptionCycled                  bool `json:"subscription_cycled"`
	SubscriptionCycledAfterTrial        bool `json:"subscription_cycled_after_trial"`
	SubscriptionPastDue                 bool `json:"subscription_past_due"`
	SubscriptionRenewalReminder         bool `json:"subscription_renewal_reminder"`
	SubscriptionRevoked                 bool `json:"subscription_revoked"`
	SubscriptionTrialConversionReminder bool `json:"subscription_trial_conversion_reminder"`
	SubscriptionUncanceled              bool `json:"subscription_uncanceled"`
	SubscriptionUpdated                 bool `json:"subscription_updated"`
}

func (*OrganizationCustomerEmailSettings) GetOrderConfirmation ¶ added in v0.11.0

func (o *OrganizationCustomerEmailSettings) GetOrderConfirmation() bool

func (*OrganizationCustomerEmailSettings) GetSubscriptionCancellation ¶ added in v0.11.0

func (o *OrganizationCustomerEmailSettings) GetSubscriptionCancellation() bool

func (*OrganizationCustomerEmailSettings) GetSubscriptionConfirmation ¶ added in v0.11.0

func (o *OrganizationCustomerEmailSettings) GetSubscriptionConfirmation() bool

func (*OrganizationCustomerEmailSettings) GetSubscriptionCycled ¶ added in v0.11.0

func (o *OrganizationCustomerEmailSettings) GetSubscriptionCycled() bool

func (*OrganizationCustomerEmailSettings) GetSubscriptionCycledAfterTrial ¶ added in v0.13.0

func (o *OrganizationCustomerEmailSettings) GetSubscriptionCycledAfterTrial() bool

func (*OrganizationCustomerEmailSettings) GetSubscriptionPastDue ¶ added in v0.11.0

func (o *OrganizationCustomerEmailSettings) GetSubscriptionPastDue() bool

func (*OrganizationCustomerEmailSettings) GetSubscriptionRenewalReminder ¶ added in v0.15.1

func (o *OrganizationCustomerEmailSettings) GetSubscriptionRenewalReminder() bool

func (*OrganizationCustomerEmailSettings) GetSubscriptionRevoked ¶ added in v0.11.0

func (o *OrganizationCustomerEmailSettings) GetSubscriptionRevoked() bool

func (*OrganizationCustomerEmailSettings) GetSubscriptionTrialConversionReminder ¶ added in v0.15.1

func (o *OrganizationCustomerEmailSettings) GetSubscriptionTrialConversionReminder() bool

func (*OrganizationCustomerEmailSettings) GetSubscriptionUncanceled ¶ added in v0.11.0

func (o *OrganizationCustomerEmailSettings) GetSubscriptionUncanceled() bool

func (*OrganizationCustomerEmailSettings) GetSubscriptionUpdated ¶ added in v0.11.0

func (o *OrganizationCustomerEmailSettings) GetSubscriptionUpdated() bool

type OrganizationCustomerPortalSettings ¶ added in v0.13.0

type OrganizationCustomerPortalSettings struct {
	Usage        CustomerPortalUsageSettings        `json:"usage"`
	Subscription CustomerPortalSubscriptionSettings `json:"subscription"`
}

func (*OrganizationCustomerPortalSettings) GetSubscription ¶ added in v0.13.0

func (*OrganizationCustomerPortalSettings) GetUsage ¶ added in v0.13.0

type OrganizationDetails ¶ added in v0.4.6

type OrganizationDetails struct {
	// Brief information about you and your business.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	About *string `json:"about,omitempty"`
	// Description of digital products being sold.
	ProductDescription *string `json:"product_description,omitempty"`
	// Categories of products being sold.
	SellingCategories []string `json:"selling_categories,omitempty"`
	// Pricing models used by the organization.
	PricingModels []string `json:"pricing_models,omitempty"`
	// How the organization will integrate and use Polar.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	IntendedUse *string `json:"intended_use,omitempty"`
	// Main customer acquisition channels.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	CustomerAcquisition []string `json:"customer_acquisition,omitempty"`
	// Estimated revenue in the next 12 months
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	FutureAnnualRevenue *int64 `json:"future_annual_revenue,omitempty"`
	// Switching from another platform?
	Switching *bool `default:"false" json:"switching"`
	// Which platform the organization is migrating from.
	SwitchingFrom *SwitchingFrom `json:"switching_from,omitempty"`
	// Revenue from last year if applicable.
	//
	// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
	PreviousAnnualRevenue *int64 `json:"previous_annual_revenue,omitempty"`
}

func (*OrganizationDetails) GetAbout ¶ added in v0.4.6

func (o *OrganizationDetails) GetAbout() *string

func (*OrganizationDetails) GetCustomerAcquisition ¶ added in v0.4.6

func (o *OrganizationDetails) GetCustomerAcquisition() []string

func (*OrganizationDetails) GetFutureAnnualRevenue ¶ added in v0.4.6

func (o *OrganizationDetails) GetFutureAnnualRevenue() *int64

func (*OrganizationDetails) GetIntendedUse ¶ added in v0.4.6

func (o *OrganizationDetails) GetIntendedUse() *string

func (*OrganizationDetails) GetPreviousAnnualRevenue ¶ added in v0.4.6

func (o *OrganizationDetails) GetPreviousAnnualRevenue() *int64

func (*OrganizationDetails) GetPricingModels ¶ added in v0.15.1

func (o *OrganizationDetails) GetPricingModels() []string

func (*OrganizationDetails) GetProductDescription ¶ added in v0.4.6

func (o *OrganizationDetails) GetProductDescription() *string

func (*OrganizationDetails) GetSellingCategories ¶ added in v0.15.1

func (o *OrganizationDetails) GetSellingCategories() []string

func (*OrganizationDetails) GetSwitching ¶ added in v0.4.6

func (o *OrganizationDetails) GetSwitching() *bool

func (*OrganizationDetails) GetSwitchingFrom ¶ added in v0.4.6

func (o *OrganizationDetails) GetSwitchingFrom() *SwitchingFrom

func (OrganizationDetails) MarshalJSON ¶ added in v0.4.6

func (o OrganizationDetails) MarshalJSON() ([]byte, error)

func (*OrganizationDetails) UnmarshalJSON ¶ added in v0.4.6

func (o *OrganizationDetails) UnmarshalJSON(data []byte) error

type OrganizationFeatureSettings ¶

type OrganizationFeatureSettings struct {
	// If this organization has issue funding enabled
	IssueFundingEnabled *bool `default:"false" json:"issue_funding_enabled"`
	// If this organization has seat-based pricing enabled
	SeatBasedPricingEnabled *bool `default:"false" json:"seat_based_pricing_enabled"`
	// If this organization has RevOps enabled
	RevopsEnabled *bool `default:"false" json:"revops_enabled"`
	// If this organization has Wallets enabled
	WalletsEnabled *bool `default:"false" json:"wallets_enabled"`
	// If this organization has the Member model enabled
	MemberModelEnabled *bool `default:"false" json:"member_model_enabled"`
	// If this organization reads from Tinybird
	TinybirdRead *bool `default:"false" json:"tinybird_read"`
	// If this organization compares Tinybird results with database
	TinybirdCompare *bool `default:"false" json:"tinybird_compare"`
	// If this organization has checkout localization enabled
	CheckoutLocalizationEnabled *bool `default:"false" json:"checkout_localization_enabled"`
	// Ordered list of metric slugs shown on the dashboard overview.
	OverviewMetrics []string `json:"overview_metrics,omitempty"`
}

func (*OrganizationFeatureSettings) GetCheckoutLocalizationEnabled ¶ added in v0.13.0

func (o *OrganizationFeatureSettings) GetCheckoutLocalizationEnabled() *bool

func (*OrganizationFeatureSettings) GetIssueFundingEnabled ¶

func (o *OrganizationFeatureSettings) GetIssueFundingEnabled() *bool

func (*OrganizationFeatureSettings) GetMemberModelEnabled ¶ added in v0.13.0

func (o *OrganizationFeatureSettings) GetMemberModelEnabled() *bool

func (*OrganizationFeatureSettings) GetOverviewMetrics ¶ added in v0.15.0

func (o *OrganizationFeatureSettings) GetOverviewMetrics() []string

func (*OrganizationFeatureSettings) GetRevopsEnabled ¶ added in v0.12.0

func (o *OrganizationFeatureSettings) GetRevopsEnabled() *bool

func (*OrganizationFeatureSettings) GetSeatBasedPricingEnabled ¶ added in v0.10.0

func (o *OrganizationFeatureSettings) GetSeatBasedPricingEnabled() *bool

func (*OrganizationFeatureSettings) GetTinybirdCompare ¶ added in v0.13.0

func (o *OrganizationFeatureSettings) GetTinybirdCompare() *bool

func (*OrganizationFeatureSettings) GetTinybirdRead ¶ added in v0.13.0

func (o *OrganizationFeatureSettings) GetTinybirdRead() *bool

func (*OrganizationFeatureSettings) GetWalletsEnabled ¶ added in v0.12.0

func (o *OrganizationFeatureSettings) GetWalletsEnabled() *bool

func (OrganizationFeatureSettings) MarshalJSON ¶

func (o OrganizationFeatureSettings) MarshalJSON() ([]byte, error)

func (*OrganizationFeatureSettings) UnmarshalJSON ¶

func (o *OrganizationFeatureSettings) UnmarshalJSON(data []byte) error

type OrganizationIndividualLegalEntitySchema ¶ added in v0.15.1

type OrganizationIndividualLegalEntitySchema struct {
	// contains filtered or unexported fields
}

func (*OrganizationIndividualLegalEntitySchema) GetType ¶ added in v0.15.1

func (OrganizationIndividualLegalEntitySchema) MarshalJSON ¶ added in v0.15.1

func (o OrganizationIndividualLegalEntitySchema) MarshalJSON() ([]byte, error)

func (*OrganizationIndividualLegalEntitySchema) UnmarshalJSON ¶ added in v0.15.1

func (o *OrganizationIndividualLegalEntitySchema) UnmarshalJSON(data []byte) error

type OrganizationNotificationSettings ¶ added in v0.7.2

type OrganizationNotificationSettings struct {
	NewOrder        bool `json:"new_order"`
	NewSubscription bool `json:"new_subscription"`
}

func (*OrganizationNotificationSettings) GetNewOrder ¶ added in v0.7.2

func (o *OrganizationNotificationSettings) GetNewOrder() bool

func (*OrganizationNotificationSettings) GetNewSubscription ¶ added in v0.7.2

func (o *OrganizationNotificationSettings) GetNewSubscription() bool
type OrganizationSocialLink struct {
	Platform OrganizationSocialPlatforms `json:"platform"`
	// The URL to the organization profile
	URL string `json:"url"`
}

func (*OrganizationSocialLink) GetPlatform ¶ added in v0.4.6

func (*OrganizationSocialLink) GetURL ¶ added in v0.4.6

func (o *OrganizationSocialLink) GetURL() string

type OrganizationSocialPlatforms ¶ added in v0.4.6

type OrganizationSocialPlatforms string
const (
	OrganizationSocialPlatformsX         OrganizationSocialPlatforms = "x"
	OrganizationSocialPlatformsGithub    OrganizationSocialPlatforms = "github"
	OrganizationSocialPlatformsFacebook  OrganizationSocialPlatforms = "facebook"
	OrganizationSocialPlatformsInstagram OrganizationSocialPlatforms = "instagram"
	OrganizationSocialPlatformsYoutube   OrganizationSocialPlatforms = "youtube"
	OrganizationSocialPlatformsTiktok    OrganizationSocialPlatforms = "tiktok"
	OrganizationSocialPlatformsLinkedin  OrganizationSocialPlatforms = "linkedin"
	OrganizationSocialPlatformsThreads   OrganizationSocialPlatforms = "threads"
	OrganizationSocialPlatformsDiscord   OrganizationSocialPlatforms = "discord"
	OrganizationSocialPlatformsOther     OrganizationSocialPlatforms = "other"
)

func (OrganizationSocialPlatforms) ToPointer ¶ added in v0.4.6

func (*OrganizationSocialPlatforms) UnmarshalJSON ¶ added in v0.4.6

func (e *OrganizationSocialPlatforms) UnmarshalJSON(data []byte) error

type OrganizationSortProperty ¶

type OrganizationSortProperty string
const (
	OrganizationSortPropertyCreatedAt                OrganizationSortProperty = "created_at"
	OrganizationSortPropertyMinusCreatedAt           OrganizationSortProperty = "-created_at"
	OrganizationSortPropertySlug                     OrganizationSortProperty = "slug"
	OrganizationSortPropertyMinusSlug                OrganizationSortProperty = "-slug"
	OrganizationSortPropertyName                     OrganizationSortProperty = "name"
	OrganizationSortPropertyMinusName                OrganizationSortProperty = "-name"
	OrganizationSortPropertyNextReviewThreshold      OrganizationSortProperty = "next_review_threshold"
	OrganizationSortPropertyMinusNextReviewThreshold OrganizationSortProperty = "-next_review_threshold"
	OrganizationSortPropertyDaysInStatus             OrganizationSortProperty = "days_in_status"
	OrganizationSortPropertyMinusDaysInStatus        OrganizationSortProperty = "-days_in_status"
)

func (OrganizationSortProperty) ToPointer ¶

func (*OrganizationSortProperty) UnmarshalJSON ¶

func (e *OrganizationSortProperty) UnmarshalJSON(data []byte) error

type OrganizationStatus ¶ added in v0.12.0

type OrganizationStatus string
const (
	OrganizationStatusCreated           OrganizationStatus = "created"
	OrganizationStatusOnboardingStarted OrganizationStatus = "onboarding_started"
	OrganizationStatusInitialReview     OrganizationStatus = "initial_review"
	OrganizationStatusOngoingReview     OrganizationStatus = "ongoing_review"
	OrganizationStatusDenied            OrganizationStatus = "denied"
	OrganizationStatusActive            OrganizationStatus = "active"
)

func (OrganizationStatus) ToPointer ¶ added in v0.12.0

func (e OrganizationStatus) ToPointer() *OrganizationStatus

func (*OrganizationStatus) UnmarshalJSON ¶ added in v0.12.0

func (e *OrganizationStatus) UnmarshalJSON(data []byte) error

type OrganizationSubscriptionSettings ¶ added in v0.1.7

type OrganizationSubscriptionSettings struct {
	AllowMultipleSubscriptions   bool                          `json:"allow_multiple_subscriptions"`
	AllowCustomerUpdates         bool                          `json:"allow_customer_updates"`
	ProrationBehavior            SubscriptionProrationBehavior `json:"proration_behavior"`
	BenefitRevocationGracePeriod int64                         `json:"benefit_revocation_grace_period"`
	PreventTrialAbuse            bool                          `json:"prevent_trial_abuse"`
}

func (*OrganizationSubscriptionSettings) GetAllowCustomerUpdates ¶ added in v0.1.7

func (o *OrganizationSubscriptionSettings) GetAllowCustomerUpdates() bool

func (*OrganizationSubscriptionSettings) GetAllowMultipleSubscriptions ¶ added in v0.1.7

func (o *OrganizationSubscriptionSettings) GetAllowMultipleSubscriptions() bool

func (*OrganizationSubscriptionSettings) GetBenefitRevocationGracePeriod ¶ added in v0.12.0

func (o *OrganizationSubscriptionSettings) GetBenefitRevocationGracePeriod() int64

func (*OrganizationSubscriptionSettings) GetPreventTrialAbuse ¶ added in v0.13.0

func (o *OrganizationSubscriptionSettings) GetPreventTrialAbuse() bool

func (*OrganizationSubscriptionSettings) GetProrationBehavior ¶ added in v0.1.7

type OrganizationUpdate ¶

type OrganizationUpdate struct {
	Name      *string `json:"name,omitempty"`
	AvatarURL *string `json:"avatar_url,omitempty"`
	// Public support email.
	Email *string `json:"email,omitempty"`
	// Official website of the organization.
	Website *string `json:"website,omitempty"`
	// Links to social profiles.
	Socials []OrganizationSocialLink `json:"socials,omitempty"`
	// Additional, private, business details Polar needs about active organizations for compliance (KYC).
	Details *OrganizationDetails `json:"details,omitempty"`
	// Two-letter country code (ISO 3166-1 alpha-2).
	Country                *CountryCountryAlpha2Input          `json:"country,omitempty"`
	FeatureSettings        *OrganizationFeatureSettings        `json:"feature_settings,omitempty"`
	SubscriptionSettings   *OrganizationSubscriptionSettings   `json:"subscription_settings,omitempty"`
	NotificationSettings   *OrganizationNotificationSettings   `json:"notification_settings,omitempty"`
	CustomerEmailSettings  *OrganizationCustomerEmailSettings  `json:"customer_email_settings,omitempty"`
	CustomerPortalSettings *OrganizationCustomerPortalSettings `json:"customer_portal_settings,omitempty"`
	// Default presentment currency for the organization
	DefaultPresentmentCurrency *PresentmentCurrency `json:"default_presentment_currency,omitempty"`
	// Default tax behavior applied on products.
	DefaultTaxBehavior *TaxBehaviorOption `json:"default_tax_behavior,omitempty"`
}

func (*OrganizationUpdate) GetAvatarURL ¶

func (o *OrganizationUpdate) GetAvatarURL() *string

func (*OrganizationUpdate) GetCountry ¶ added in v0.15.1

func (*OrganizationUpdate) GetCustomerEmailSettings ¶ added in v0.11.0

func (o *OrganizationUpdate) GetCustomerEmailSettings() *OrganizationCustomerEmailSettings

func (*OrganizationUpdate) GetCustomerPortalSettings ¶ added in v0.13.0

func (o *OrganizationUpdate) GetCustomerPortalSettings() *OrganizationCustomerPortalSettings

func (*OrganizationUpdate) GetDefaultPresentmentCurrency ¶ added in v0.13.0

func (o *OrganizationUpdate) GetDefaultPresentmentCurrency() *PresentmentCurrency

func (*OrganizationUpdate) GetDefaultTaxBehavior ¶ added in v0.15.1

func (o *OrganizationUpdate) GetDefaultTaxBehavior() *TaxBehaviorOption

func (*OrganizationUpdate) GetDetails ¶ added in v0.4.6

func (o *OrganizationUpdate) GetDetails() *OrganizationDetails

func (*OrganizationUpdate) GetEmail ¶ added in v0.4.6

func (o *OrganizationUpdate) GetEmail() *string

func (*OrganizationUpdate) GetFeatureSettings ¶

func (o *OrganizationUpdate) GetFeatureSettings() *OrganizationFeatureSettings

func (*OrganizationUpdate) GetName ¶

func (o *OrganizationUpdate) GetName() *string

func (*OrganizationUpdate) GetNotificationSettings ¶ added in v0.7.2

func (o *OrganizationUpdate) GetNotificationSettings() *OrganizationNotificationSettings

func (*OrganizationUpdate) GetSocials ¶ added in v0.4.6

func (o *OrganizationUpdate) GetSocials() []OrganizationSocialLink

func (*OrganizationUpdate) GetSubscriptionSettings ¶ added in v0.1.7

func (o *OrganizationUpdate) GetSubscriptionSettings() *OrganizationSubscriptionSettings

func (*OrganizationUpdate) GetWebsite ¶ added in v0.4.6

func (o *OrganizationUpdate) GetWebsite() *string

type Pagination ¶

type Pagination struct {
	TotalCount int64 `json:"total_count"`
	MaxPage    int64 `json:"max_page"`
}

func (*Pagination) GetMaxPage ¶

func (p *Pagination) GetMaxPage() int64

func (*Pagination) GetTotalCount ¶

func (p *Pagination) GetTotalCount() int64

func (Pagination) MarshalJSON ¶ added in v0.13.0

func (p Pagination) MarshalJSON() ([]byte, error)

func (*Pagination) UnmarshalJSON ¶ added in v0.13.0

func (p *Pagination) UnmarshalJSON(data []byte) error

type Payment ¶ added in v0.4.17

type Payment struct {
	CardPayment    *CardPayment    `queryParam:"inline" union:"member"`
	GenericPayment *GenericPayment `queryParam:"inline" union:"member"`

	Type PaymentType
}

func CreatePaymentCardPayment ¶ added in v0.4.17

func CreatePaymentCardPayment(cardPayment CardPayment) Payment

func CreatePaymentGenericPayment ¶ added in v0.4.17

func CreatePaymentGenericPayment(genericPayment GenericPayment) Payment

func (Payment) MarshalJSON ¶ added in v0.4.17

func (u Payment) MarshalJSON() ([]byte, error)

func (*Payment) UnmarshalJSON ¶ added in v0.4.17

func (u *Payment) UnmarshalJSON(data []byte) error

type PaymentMethodCard ¶ added in v0.4.0

type PaymentMethodCard struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time       `json:"modified_at"`
	Processor  PaymentProcessor `json:"processor"`
	CustomerID string           `json:"customer_id"`

	MethodMetadata PaymentMethodCardMetadata `json:"method_metadata"`
	// contains filtered or unexported fields
}

func (*PaymentMethodCard) GetCreatedAt ¶ added in v0.4.0

func (p *PaymentMethodCard) GetCreatedAt() time.Time

func (*PaymentMethodCard) GetCustomerID ¶ added in v0.7.2

func (p *PaymentMethodCard) GetCustomerID() string

func (*PaymentMethodCard) GetID ¶ added in v0.4.0

func (p *PaymentMethodCard) GetID() string

func (*PaymentMethodCard) GetMethodMetadata ¶ added in v0.7.2

func (p *PaymentMethodCard) GetMethodMetadata() PaymentMethodCardMetadata

func (*PaymentMethodCard) GetModifiedAt ¶ added in v0.7.2

func (p *PaymentMethodCard) GetModifiedAt() *time.Time

func (*PaymentMethodCard) GetProcessor ¶ added in v0.7.2

func (p *PaymentMethodCard) GetProcessor() PaymentProcessor

func (*PaymentMethodCard) GetType ¶ added in v0.4.0

func (p *PaymentMethodCard) GetType() string

func (PaymentMethodCard) MarshalJSON ¶ added in v0.4.0

func (p PaymentMethodCard) MarshalJSON() ([]byte, error)

func (*PaymentMethodCard) UnmarshalJSON ¶ added in v0.4.0

func (p *PaymentMethodCard) UnmarshalJSON(data []byte) error

type PaymentMethodCardMetadata ¶ added in v0.7.2

type PaymentMethodCardMetadata struct {
	Brand    string  `json:"brand"`
	Last4    string  `json:"last4"`
	ExpMonth int64   `json:"exp_month"`
	ExpYear  int64   `json:"exp_year"`
	Wallet   *string `json:"wallet,omitempty"`
}

func (*PaymentMethodCardMetadata) GetBrand ¶ added in v0.7.2

func (p *PaymentMethodCardMetadata) GetBrand() string

func (*PaymentMethodCardMetadata) GetExpMonth ¶ added in v0.7.2

func (p *PaymentMethodCardMetadata) GetExpMonth() int64

func (*PaymentMethodCardMetadata) GetExpYear ¶ added in v0.7.2

func (p *PaymentMethodCardMetadata) GetExpYear() int64

func (*PaymentMethodCardMetadata) GetLast4 ¶ added in v0.7.2

func (p *PaymentMethodCardMetadata) GetLast4() string

func (*PaymentMethodCardMetadata) GetWallet ¶ added in v0.7.2

func (p *PaymentMethodCardMetadata) GetWallet() *string

func (PaymentMethodCardMetadata) MarshalJSON ¶ added in v0.8.4

func (p PaymentMethodCardMetadata) MarshalJSON() ([]byte, error)

func (*PaymentMethodCardMetadata) UnmarshalJSON ¶ added in v0.8.4

func (p *PaymentMethodCardMetadata) UnmarshalJSON(data []byte) error

type PaymentMethodGeneric ¶ added in v0.4.0

type PaymentMethodGeneric struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time       `json:"modified_at"`
	Processor  PaymentProcessor `json:"processor"`
	CustomerID string           `json:"customer_id"`
	Type       string           `json:"type"`
}

func (*PaymentMethodGeneric) GetCreatedAt ¶ added in v0.4.0

func (p *PaymentMethodGeneric) GetCreatedAt() time.Time

func (*PaymentMethodGeneric) GetCustomerID ¶ added in v0.7.2

func (p *PaymentMethodGeneric) GetCustomerID() string

func (*PaymentMethodGeneric) GetID ¶ added in v0.4.0

func (p *PaymentMethodGeneric) GetID() string

func (*PaymentMethodGeneric) GetModifiedAt ¶ added in v0.7.2

func (p *PaymentMethodGeneric) GetModifiedAt() *time.Time

func (*PaymentMethodGeneric) GetProcessor ¶ added in v0.7.2

func (p *PaymentMethodGeneric) GetProcessor() PaymentProcessor

func (*PaymentMethodGeneric) GetType ¶ added in v0.4.0

func (p *PaymentMethodGeneric) GetType() string

func (PaymentMethodGeneric) MarshalJSON ¶ added in v0.4.0

func (p PaymentMethodGeneric) MarshalJSON() ([]byte, error)

func (*PaymentMethodGeneric) UnmarshalJSON ¶ added in v0.4.0

func (p *PaymentMethodGeneric) UnmarshalJSON(data []byte) error

type PaymentNotReady ¶ added in v0.8.0

type PaymentNotReady struct {
	Detail string `json:"detail"`
	// contains filtered or unexported fields
}

func (*PaymentNotReady) GetDetail ¶ added in v0.8.0

func (p *PaymentNotReady) GetDetail() string

func (*PaymentNotReady) GetError ¶ added in v0.8.0

func (p *PaymentNotReady) GetError() string

func (PaymentNotReady) MarshalJSON ¶ added in v0.8.0

func (p PaymentNotReady) MarshalJSON() ([]byte, error)

func (*PaymentNotReady) UnmarshalJSON ¶ added in v0.8.0

func (p *PaymentNotReady) UnmarshalJSON(data []byte) error

type PaymentProcessor ¶

type PaymentProcessor string
const (
	PaymentProcessorStripe PaymentProcessor = "stripe"
)

func (PaymentProcessor) ToPointer ¶

func (e PaymentProcessor) ToPointer() *PaymentProcessor

func (*PaymentProcessor) UnmarshalJSON ¶

func (e *PaymentProcessor) UnmarshalJSON(data []byte) error

type PaymentSortProperty ¶ added in v0.4.17

type PaymentSortProperty string
const (
	PaymentSortPropertyCreatedAt      PaymentSortProperty = "created_at"
	PaymentSortPropertyMinusCreatedAt PaymentSortProperty = "-created_at"
	PaymentSortPropertyStatus         PaymentSortProperty = "status"
	PaymentSortPropertyMinusStatus    PaymentSortProperty = "-status"
	PaymentSortPropertyAmount         PaymentSortProperty = "amount"
	PaymentSortPropertyMinusAmount    PaymentSortProperty = "-amount"
	PaymentSortPropertyMethod         PaymentSortProperty = "method"
	PaymentSortPropertyMinusMethod    PaymentSortProperty = "-method"
)

func (PaymentSortProperty) ToPointer ¶ added in v0.4.17

func (*PaymentSortProperty) UnmarshalJSON ¶ added in v0.4.17

func (e *PaymentSortProperty) UnmarshalJSON(data []byte) error

type PaymentStatus ¶ added in v0.4.17

type PaymentStatus string
const (
	PaymentStatusPending   PaymentStatus = "pending"
	PaymentStatusSucceeded PaymentStatus = "succeeded"
	PaymentStatusFailed    PaymentStatus = "failed"
)

func (PaymentStatus) ToPointer ¶ added in v0.4.17

func (e PaymentStatus) ToPointer() *PaymentStatus

func (*PaymentStatus) UnmarshalJSON ¶ added in v0.4.17

func (e *PaymentStatus) UnmarshalJSON(data []byte) error

type PaymentType ¶ added in v0.4.17

type PaymentType string
const (
	PaymentTypeCardPayment    PaymentType = "CardPayment"
	PaymentTypeGenericPayment PaymentType = "GenericPayment"
)

type PendingSubscriptionUpdate ¶ added in v0.15.1

type PendingSubscriptionUpdate struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The date and time when the subscription update will be applied.
	AppliesAt time.Time `json:"applies_at"`
	// ID of the new product to apply to the subscription. If `null`, the product won't be changed.
	ProductID *string `json:"product_id"`
	// Number of seats to apply to the subscription. If `null`, the number of seats won't be changed.
	Seats *int64 `json:"seats"`
}

PendingSubscriptionUpdate - Pending update to be applied to a subscription at the beginning of the next period.

func (*PendingSubscriptionUpdate) GetAppliesAt ¶ added in v0.15.1

func (p *PendingSubscriptionUpdate) GetAppliesAt() time.Time

func (*PendingSubscriptionUpdate) GetCreatedAt ¶ added in v0.15.1

func (p *PendingSubscriptionUpdate) GetCreatedAt() time.Time

func (*PendingSubscriptionUpdate) GetID ¶ added in v0.15.1

func (p *PendingSubscriptionUpdate) GetID() string

func (*PendingSubscriptionUpdate) GetModifiedAt ¶ added in v0.15.1

func (p *PendingSubscriptionUpdate) GetModifiedAt() *time.Time

func (*PendingSubscriptionUpdate) GetProductID ¶ added in v0.15.1

func (p *PendingSubscriptionUpdate) GetProductID() *string

func (*PendingSubscriptionUpdate) GetSeats ¶ added in v0.15.1

func (p *PendingSubscriptionUpdate) GetSeats() *int64

func (PendingSubscriptionUpdate) MarshalJSON ¶ added in v0.15.1

func (p PendingSubscriptionUpdate) MarshalJSON() ([]byte, error)

func (*PendingSubscriptionUpdate) UnmarshalJSON ¶ added in v0.15.1

func (p *PendingSubscriptionUpdate) UnmarshalJSON(data []byte) error

type Permission ¶

type Permission string

Permission - The permission level to grant. Read more about roles and their permissions on [GitHub documentation](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role).

const (
	PermissionPull     Permission = "pull"
	PermissionTriage   Permission = "triage"
	PermissionPush     Permission = "push"
	PermissionMaintain Permission = "maintain"
	PermissionAdmin    Permission = "admin"
)

func (Permission) ToPointer ¶

func (e Permission) ToPointer() *Permission

func (*Permission) UnmarshalJSON ¶

func (e *Permission) UnmarshalJSON(data []byte) error

type PortalAuthenticatedUser ¶ added in v0.13.0

type PortalAuthenticatedUser struct {
	// Type of authenticated user: 'customer' or 'member'
	Type string `json:"type"`
	// User's name, if available.
	Name *string `json:"name"`
	// User's email address.
	Email string `json:"email"`
	// Associated customer ID.
	CustomerID string `json:"customer_id"`
	// Member ID. Only set for members.
	MemberID *string `json:"member_id,omitempty"`
	// Member role (owner, billing_manager, member). Only set for members.
	Role *string `json:"role,omitempty"`
}

PortalAuthenticatedUser - Information about the authenticated portal user.

func (*PortalAuthenticatedUser) GetCustomerID ¶ added in v0.13.0

func (p *PortalAuthenticatedUser) GetCustomerID() string

func (*PortalAuthenticatedUser) GetEmail ¶ added in v0.13.0

func (p *PortalAuthenticatedUser) GetEmail() string

func (*PortalAuthenticatedUser) GetMemberID ¶ added in v0.13.0

func (p *PortalAuthenticatedUser) GetMemberID() *string

func (*PortalAuthenticatedUser) GetName ¶ added in v0.13.0

func (p *PortalAuthenticatedUser) GetName() *string

func (*PortalAuthenticatedUser) GetRole ¶ added in v0.13.0

func (p *PortalAuthenticatedUser) GetRole() *string

func (*PortalAuthenticatedUser) GetType ¶ added in v0.13.0

func (p *PortalAuthenticatedUser) GetType() string

type PresentmentCurrency ¶ added in v0.13.0

type PresentmentCurrency string
const (
	PresentmentCurrencyAed PresentmentCurrency = "aed"
	PresentmentCurrencyArs PresentmentCurrency = "ars"
	PresentmentCurrencyAud PresentmentCurrency = "aud"
	PresentmentCurrencyBrl PresentmentCurrency = "brl"
	PresentmentCurrencyCad PresentmentCurrency = "cad"
	PresentmentCurrencyChf PresentmentCurrency = "chf"
	PresentmentCurrencyClp PresentmentCurrency = "clp"
	PresentmentCurrencyCny PresentmentCurrency = "cny"
	PresentmentCurrencyCop PresentmentCurrency = "cop"
	PresentmentCurrencyCzk PresentmentCurrency = "czk"
	PresentmentCurrencyDkk PresentmentCurrency = "dkk"
	PresentmentCurrencyEur PresentmentCurrency = "eur"
	PresentmentCurrencyGbp PresentmentCurrency = "gbp"
	PresentmentCurrencyHkd PresentmentCurrency = "hkd"
	PresentmentCurrencyHuf PresentmentCurrency = "huf"
	PresentmentCurrencyIdr PresentmentCurrency = "idr"
	PresentmentCurrencyIls PresentmentCurrency = "ils"
	PresentmentCurrencyInr PresentmentCurrency = "inr"
	PresentmentCurrencyJpy PresentmentCurrency = "jpy"
	PresentmentCurrencyKrw PresentmentCurrency = "krw"
	PresentmentCurrencyMxn PresentmentCurrency = "mxn"
	PresentmentCurrencyMyr PresentmentCurrency = "myr"
	PresentmentCurrencyNok PresentmentCurrency = "nok"
	PresentmentCurrencyNzd PresentmentCurrency = "nzd"
	PresentmentCurrencyPen PresentmentCurrency = "pen"
	PresentmentCurrencyPhp PresentmentCurrency = "php"
	PresentmentCurrencyPln PresentmentCurrency = "pln"
	PresentmentCurrencyRon PresentmentCurrency = "ron"
	PresentmentCurrencySar PresentmentCurrency = "sar"
	PresentmentCurrencySek PresentmentCurrency = "sek"
	PresentmentCurrencySgd PresentmentCurrency = "sgd"
	PresentmentCurrencyThb PresentmentCurrency = "thb"
	PresentmentCurrencyTry PresentmentCurrency = "try"
	PresentmentCurrencyTwd PresentmentCurrency = "twd"
	PresentmentCurrencyUsd PresentmentCurrency = "usd"
	PresentmentCurrencyZar PresentmentCurrency = "zar"
)

func (PresentmentCurrency) ToPointer ¶ added in v0.13.0

func (*PresentmentCurrency) UnmarshalJSON ¶ added in v0.13.0

func (e *PresentmentCurrency) UnmarshalJSON(data []byte) error

type Prices ¶

type Prices struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type PricesType
}

func CreatePricesLegacyRecurringProductPrice ¶ added in v0.3.0

func CreatePricesLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) Prices

func CreatePricesProductPrice ¶ added in v0.3.0

func CreatePricesProductPrice(productPrice ProductPrice) Prices

func (Prices) MarshalJSON ¶

func (u Prices) MarshalJSON() ([]byte, error)

func (*Prices) UnmarshalJSON ¶

func (u *Prices) UnmarshalJSON(data []byte) error

type PricesType ¶

type PricesType string
const (
	PricesTypeLegacyRecurringProductPrice PricesType = "LegacyRecurringProductPrice"
	PricesTypeProductPrice                PricesType = "ProductPrice"
)

type Product ¶

type Product struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64 `json:"trial_interval_count"`
	// The name of the product.
	Name string `json:"name"`
	// The description of the product.
	Description *string           `json:"description"`
	Visibility  ProductVisibility `json:"visibility"`
	// The recurring interval of the product. If `None`, the product is a one-time purchase.
	RecurringInterval *SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. None for one-time products.
	RecurringIntervalCount *int64 `json:"recurring_interval_count"`
	// Whether the product is a subscription.
	IsRecurring bool `json:"is_recurring"`
	// Whether the product is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the organization owning the product.
	OrganizationID string                        `json:"organization_id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	// List of prices for this product.
	Prices []Prices `json:"prices"`
	// List of benefits granted by the product.
	Benefits []Benefit `json:"benefits"`
	// List of medias associated to the product.
	Medias []ProductMediaFileRead `json:"medias"`
	// List of custom fields attached to the product.
	AttachedCustomFields []AttachedCustomField `json:"attached_custom_fields"`
}

Product - A product.

func (*Product) GetAttachedCustomFields ¶

func (p *Product) GetAttachedCustomFields() []AttachedCustomField

func (*Product) GetBenefits ¶

func (p *Product) GetBenefits() []Benefit

func (*Product) GetCreatedAt ¶

func (p *Product) GetCreatedAt() time.Time

func (*Product) GetDescription ¶

func (p *Product) GetDescription() *string

func (*Product) GetID ¶

func (p *Product) GetID() string

func (*Product) GetIsArchived ¶

func (p *Product) GetIsArchived() bool

func (*Product) GetIsRecurring ¶

func (p *Product) GetIsRecurring() bool

func (*Product) GetMedias ¶

func (p *Product) GetMedias() []ProductMediaFileRead

func (*Product) GetMetadata ¶

func (p *Product) GetMetadata() map[string]MetadataOutputType

func (*Product) GetModifiedAt ¶

func (p *Product) GetModifiedAt() *time.Time

func (*Product) GetName ¶

func (p *Product) GetName() string

func (*Product) GetOrganizationID ¶

func (p *Product) GetOrganizationID() string

func (*Product) GetPrices ¶

func (p *Product) GetPrices() []Prices

func (*Product) GetRecurringInterval ¶ added in v0.3.0

func (p *Product) GetRecurringInterval() *SubscriptionRecurringInterval

func (*Product) GetRecurringIntervalCount ¶ added in v0.12.0

func (p *Product) GetRecurringIntervalCount() *int64

func (*Product) GetTrialInterval ¶ added in v0.9.1

func (p *Product) GetTrialInterval() *TrialInterval

func (*Product) GetTrialIntervalCount ¶ added in v0.9.1

func (p *Product) GetTrialIntervalCount() *int64

func (*Product) GetVisibility ¶ added in v0.13.0

func (p *Product) GetVisibility() ProductVisibility

func (Product) MarshalJSON ¶

func (p Product) MarshalJSON() ([]byte, error)

func (*Product) UnmarshalJSON ¶

func (p *Product) UnmarshalJSON(data []byte) error

type ProductBenefitsUpdate ¶

type ProductBenefitsUpdate struct {
	// List of benefit IDs. Each one must be on the same organization as the product.
	Benefits []string `json:"benefits"`
}

ProductBenefitsUpdate - Schema to update the benefits granted by a product.

func (*ProductBenefitsUpdate) GetBenefits ¶

func (p *ProductBenefitsUpdate) GetBenefits() []string

type ProductBillingType ¶ added in v0.3.0

type ProductBillingType string
const (
	ProductBillingTypeOneTime   ProductBillingType = "one_time"
	ProductBillingTypeRecurring ProductBillingType = "recurring"
)

func (ProductBillingType) ToPointer ¶ added in v0.3.0

func (e ProductBillingType) ToPointer() *ProductBillingType

func (*ProductBillingType) UnmarshalJSON ¶ added in v0.3.0

func (e *ProductBillingType) UnmarshalJSON(data []byte) error

type ProductCreate ¶

type ProductCreate struct {
	ProductCreateRecurring *ProductCreateRecurring `queryParam:"inline" union:"member"`
	ProductCreateOneTime   *ProductCreateOneTime   `queryParam:"inline" union:"member"`

	Type ProductCreateType
}

func CreateProductCreateProductCreateOneTime ¶ added in v0.9.1

func CreateProductCreateProductCreateOneTime(productCreateOneTime ProductCreateOneTime) ProductCreate

func CreateProductCreateProductCreateRecurring ¶ added in v0.9.1

func CreateProductCreateProductCreateRecurring(productCreateRecurring ProductCreateRecurring) ProductCreate

func (ProductCreate) MarshalJSON ¶

func (u ProductCreate) MarshalJSON() ([]byte, error)

func (*ProductCreate) UnmarshalJSON ¶

func (u *ProductCreate) UnmarshalJSON(data []byte) error

type ProductCreateOneTime ¶ added in v0.9.1

type ProductCreateOneTime struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]ProductCreateOneTimeMetadata `json:"metadata,omitempty"`
	// The name of the product.
	Name string `json:"name"`
	// The description of the product.
	Description *string            `json:"description,omitempty"`
	Visibility  *ProductVisibility `json:"visibility,omitempty"`
	// List of available prices for this product. It should contain at most one static price (fixed, custom or free), and any number of metered prices. Metered prices are not supported on one-time purchase products.
	Prices []ProductCreateOneTimePrices `json:"prices"`
	// List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.
	Medias []string `json:"medias,omitempty"`
	// List of custom fields to attach.
	AttachedCustomFields []AttachedCustomFieldCreate `json:"attached_custom_fields,omitempty"`
	// The ID of the organization owning the product. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
	// States that the product is a one-time purchase.
	RecurringInterval any `json:"recurring_interval,omitempty"`
	// One-time products don't have a recurring interval count.
	RecurringIntervalCount any `json:"recurring_interval_count,omitempty"`
}

func (*ProductCreateOneTime) GetAttachedCustomFields ¶ added in v0.9.1

func (p *ProductCreateOneTime) GetAttachedCustomFields() []AttachedCustomFieldCreate

func (*ProductCreateOneTime) GetDescription ¶ added in v0.9.1

func (p *ProductCreateOneTime) GetDescription() *string

func (*ProductCreateOneTime) GetMedias ¶ added in v0.9.1

func (p *ProductCreateOneTime) GetMedias() []string

func (*ProductCreateOneTime) GetMetadata ¶ added in v0.9.1

func (*ProductCreateOneTime) GetName ¶ added in v0.9.1

func (p *ProductCreateOneTime) GetName() string

func (*ProductCreateOneTime) GetOrganizationID ¶ added in v0.9.1

func (p *ProductCreateOneTime) GetOrganizationID() *string

func (*ProductCreateOneTime) GetPrices ¶ added in v0.9.1

func (*ProductCreateOneTime) GetRecurringInterval ¶ added in v0.9.1

func (p *ProductCreateOneTime) GetRecurringInterval() any

func (*ProductCreateOneTime) GetRecurringIntervalCount ¶ added in v0.12.0

func (p *ProductCreateOneTime) GetRecurringIntervalCount() any

func (*ProductCreateOneTime) GetVisibility ¶ added in v0.13.0

func (p *ProductCreateOneTime) GetVisibility() *ProductVisibility

func (ProductCreateOneTime) MarshalJSON ¶ added in v0.9.1

func (p ProductCreateOneTime) MarshalJSON() ([]byte, error)

func (*ProductCreateOneTime) UnmarshalJSON ¶ added in v0.9.1

func (p *ProductCreateOneTime) UnmarshalJSON(data []byte) error

type ProductCreateOneTimeMetadata ¶ added in v0.9.1

type ProductCreateOneTimeMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type ProductCreateOneTimeMetadataType
}

func CreateProductCreateOneTimeMetadataBoolean ¶ added in v0.9.1

func CreateProductCreateOneTimeMetadataBoolean(boolean bool) ProductCreateOneTimeMetadata

func CreateProductCreateOneTimeMetadataInteger ¶ added in v0.9.1

func CreateProductCreateOneTimeMetadataInteger(integer int64) ProductCreateOneTimeMetadata

func CreateProductCreateOneTimeMetadataNumber ¶ added in v0.9.1

func CreateProductCreateOneTimeMetadataNumber(number float64) ProductCreateOneTimeMetadata

func CreateProductCreateOneTimeMetadataStr ¶ added in v0.9.1

func CreateProductCreateOneTimeMetadataStr(str string) ProductCreateOneTimeMetadata

func (ProductCreateOneTimeMetadata) MarshalJSON ¶ added in v0.9.1

func (u ProductCreateOneTimeMetadata) MarshalJSON() ([]byte, error)

func (*ProductCreateOneTimeMetadata) UnmarshalJSON ¶ added in v0.9.1

func (u *ProductCreateOneTimeMetadata) UnmarshalJSON(data []byte) error

type ProductCreateOneTimeMetadataType ¶ added in v0.9.1

type ProductCreateOneTimeMetadataType string
const (
	ProductCreateOneTimeMetadataTypeStr     ProductCreateOneTimeMetadataType = "str"
	ProductCreateOneTimeMetadataTypeInteger ProductCreateOneTimeMetadataType = "integer"
	ProductCreateOneTimeMetadataTypeNumber  ProductCreateOneTimeMetadataType = "number"
	ProductCreateOneTimeMetadataTypeBoolean ProductCreateOneTimeMetadataType = "boolean"
)

type ProductCreateOneTimePrices ¶ added in v0.9.1

type ProductCreateOneTimePrices struct {
	ProductPriceFixedCreate       *ProductPriceFixedCreate       `queryParam:"inline" union:"member"`
	ProductPriceCustomCreate      *ProductPriceCustomCreate      `queryParam:"inline" union:"member"`
	ProductPriceFreeCreate        *ProductPriceFreeCreate        `queryParam:"inline" union:"member"`
	ProductPriceSeatBasedCreate   *ProductPriceSeatBasedCreate   `queryParam:"inline" union:"member"`
	ProductPriceMeteredUnitCreate *ProductPriceMeteredUnitCreate `queryParam:"inline" union:"member"`

	Type ProductCreateOneTimePricesType
}

func CreateProductCreateOneTimePricesCustom ¶ added in v0.10.1

func CreateProductCreateOneTimePricesCustom(custom ProductPriceCustomCreate) ProductCreateOneTimePrices

func CreateProductCreateOneTimePricesFixed ¶ added in v0.10.1

func CreateProductCreateOneTimePricesFixed(fixed ProductPriceFixedCreate) ProductCreateOneTimePrices

func CreateProductCreateOneTimePricesFree ¶ added in v0.10.1

func CreateProductCreateOneTimePricesFree(free ProductPriceFreeCreate) ProductCreateOneTimePrices

func CreateProductCreateOneTimePricesMeteredUnit ¶ added in v0.10.1

func CreateProductCreateOneTimePricesMeteredUnit(meteredUnit ProductPriceMeteredUnitCreate) ProductCreateOneTimePrices

func CreateProductCreateOneTimePricesSeatBased ¶ added in v0.10.1

func CreateProductCreateOneTimePricesSeatBased(seatBased ProductPriceSeatBasedCreate) ProductCreateOneTimePrices

func (ProductCreateOneTimePrices) MarshalJSON ¶ added in v0.9.1

func (u ProductCreateOneTimePrices) MarshalJSON() ([]byte, error)

func (*ProductCreateOneTimePrices) UnmarshalJSON ¶ added in v0.9.1

func (u *ProductCreateOneTimePrices) UnmarshalJSON(data []byte) error

type ProductCreateOneTimePricesType ¶ added in v0.9.1

type ProductCreateOneTimePricesType string
const (
	ProductCreateOneTimePricesTypeCustom      ProductCreateOneTimePricesType = "custom"
	ProductCreateOneTimePricesTypeFixed       ProductCreateOneTimePricesType = "fixed"
	ProductCreateOneTimePricesTypeFree        ProductCreateOneTimePricesType = "free"
	ProductCreateOneTimePricesTypeMeteredUnit ProductCreateOneTimePricesType = "metered_unit"
	ProductCreateOneTimePricesTypeSeatBased   ProductCreateOneTimePricesType = "seat_based"
)

type ProductCreateRecurring ¶ added in v0.9.1

type ProductCreateRecurring struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]ProductCreateRecurringMetadata `json:"metadata,omitempty"`
	// The name of the product.
	Name string `json:"name"`
	// The description of the product.
	Description *string            `json:"description,omitempty"`
	Visibility  *ProductVisibility `json:"visibility,omitempty"`
	// List of available prices for this product. It should contain at most one static price (fixed, custom or free), and any number of metered prices. Metered prices are not supported on one-time purchase products.
	Prices []ProductCreateRecurringPrices `json:"prices"`
	// List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.
	Medias []string `json:"medias,omitempty"`
	// List of custom fields to attach.
	AttachedCustomFields []AttachedCustomFieldCreate `json:"attached_custom_fields,omitempty"`
	// The ID of the organization owning the product. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval,omitempty"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64                        `json:"trial_interval_count,omitempty"`
	RecurringInterval  SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.
	RecurringIntervalCount *int64 `default:"1" json:"recurring_interval_count"`
}

func (*ProductCreateRecurring) GetAttachedCustomFields ¶ added in v0.9.1

func (p *ProductCreateRecurring) GetAttachedCustomFields() []AttachedCustomFieldCreate

func (*ProductCreateRecurring) GetDescription ¶ added in v0.9.1

func (p *ProductCreateRecurring) GetDescription() *string

func (*ProductCreateRecurring) GetMedias ¶ added in v0.9.1

func (p *ProductCreateRecurring) GetMedias() []string

func (*ProductCreateRecurring) GetMetadata ¶ added in v0.9.1

func (*ProductCreateRecurring) GetName ¶ added in v0.9.1

func (p *ProductCreateRecurring) GetName() string

func (*ProductCreateRecurring) GetOrganizationID ¶ added in v0.9.1

func (p *ProductCreateRecurring) GetOrganizationID() *string

func (*ProductCreateRecurring) GetPrices ¶ added in v0.9.1

func (*ProductCreateRecurring) GetRecurringInterval ¶ added in v0.9.1

func (p *ProductCreateRecurring) GetRecurringInterval() SubscriptionRecurringInterval

func (*ProductCreateRecurring) GetRecurringIntervalCount ¶ added in v0.12.0

func (p *ProductCreateRecurring) GetRecurringIntervalCount() *int64

func (*ProductCreateRecurring) GetTrialInterval ¶ added in v0.9.1

func (p *ProductCreateRecurring) GetTrialInterval() *TrialInterval

func (*ProductCreateRecurring) GetTrialIntervalCount ¶ added in v0.9.1

func (p *ProductCreateRecurring) GetTrialIntervalCount() *int64

func (*ProductCreateRecurring) GetVisibility ¶ added in v0.13.0

func (p *ProductCreateRecurring) GetVisibility() *ProductVisibility

func (ProductCreateRecurring) MarshalJSON ¶ added in v0.9.1

func (p ProductCreateRecurring) MarshalJSON() ([]byte, error)

func (*ProductCreateRecurring) UnmarshalJSON ¶ added in v0.9.1

func (p *ProductCreateRecurring) UnmarshalJSON(data []byte) error

type ProductCreateRecurringMetadata ¶ added in v0.9.1

type ProductCreateRecurringMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type ProductCreateRecurringMetadataType
}

func CreateProductCreateRecurringMetadataBoolean ¶ added in v0.9.1

func CreateProductCreateRecurringMetadataBoolean(boolean bool) ProductCreateRecurringMetadata

func CreateProductCreateRecurringMetadataInteger ¶ added in v0.9.1

func CreateProductCreateRecurringMetadataInteger(integer int64) ProductCreateRecurringMetadata

func CreateProductCreateRecurringMetadataNumber ¶ added in v0.9.1

func CreateProductCreateRecurringMetadataNumber(number float64) ProductCreateRecurringMetadata

func CreateProductCreateRecurringMetadataStr ¶ added in v0.9.1

func CreateProductCreateRecurringMetadataStr(str string) ProductCreateRecurringMetadata

func (ProductCreateRecurringMetadata) MarshalJSON ¶ added in v0.9.1

func (u ProductCreateRecurringMetadata) MarshalJSON() ([]byte, error)

func (*ProductCreateRecurringMetadata) UnmarshalJSON ¶ added in v0.9.1

func (u *ProductCreateRecurringMetadata) UnmarshalJSON(data []byte) error

type ProductCreateRecurringMetadataType ¶ added in v0.9.1

type ProductCreateRecurringMetadataType string
const (
	ProductCreateRecurringMetadataTypeStr     ProductCreateRecurringMetadataType = "str"
	ProductCreateRecurringMetadataTypeInteger ProductCreateRecurringMetadataType = "integer"
	ProductCreateRecurringMetadataTypeNumber  ProductCreateRecurringMetadataType = "number"
	ProductCreateRecurringMetadataTypeBoolean ProductCreateRecurringMetadataType = "boolean"
)

type ProductCreateRecurringPrices ¶ added in v0.9.1

type ProductCreateRecurringPrices struct {
	ProductPriceFixedCreate       *ProductPriceFixedCreate       `queryParam:"inline" union:"member"`
	ProductPriceCustomCreate      *ProductPriceCustomCreate      `queryParam:"inline" union:"member"`
	ProductPriceFreeCreate        *ProductPriceFreeCreate        `queryParam:"inline" union:"member"`
	ProductPriceSeatBasedCreate   *ProductPriceSeatBasedCreate   `queryParam:"inline" union:"member"`
	ProductPriceMeteredUnitCreate *ProductPriceMeteredUnitCreate `queryParam:"inline" union:"member"`

	Type ProductCreateRecurringPricesType
}

func CreateProductCreateRecurringPricesCustom ¶ added in v0.10.1

func CreateProductCreateRecurringPricesCustom(custom ProductPriceCustomCreate) ProductCreateRecurringPrices

func CreateProductCreateRecurringPricesFixed ¶ added in v0.10.1

func CreateProductCreateRecurringPricesFixed(fixed ProductPriceFixedCreate) ProductCreateRecurringPrices

func CreateProductCreateRecurringPricesFree ¶ added in v0.10.1

func CreateProductCreateRecurringPricesFree(free ProductPriceFreeCreate) ProductCreateRecurringPrices

func CreateProductCreateRecurringPricesMeteredUnit ¶ added in v0.10.1

func CreateProductCreateRecurringPricesMeteredUnit(meteredUnit ProductPriceMeteredUnitCreate) ProductCreateRecurringPrices

func CreateProductCreateRecurringPricesSeatBased ¶ added in v0.10.1

func CreateProductCreateRecurringPricesSeatBased(seatBased ProductPriceSeatBasedCreate) ProductCreateRecurringPrices

func (ProductCreateRecurringPrices) MarshalJSON ¶ added in v0.9.1

func (u ProductCreateRecurringPrices) MarshalJSON() ([]byte, error)

func (*ProductCreateRecurringPrices) UnmarshalJSON ¶ added in v0.9.1

func (u *ProductCreateRecurringPrices) UnmarshalJSON(data []byte) error

type ProductCreateRecurringPricesType ¶ added in v0.9.1

type ProductCreateRecurringPricesType string
const (
	ProductCreateRecurringPricesTypeCustom      ProductCreateRecurringPricesType = "custom"
	ProductCreateRecurringPricesTypeFixed       ProductCreateRecurringPricesType = "fixed"
	ProductCreateRecurringPricesTypeFree        ProductCreateRecurringPricesType = "free"
	ProductCreateRecurringPricesTypeMeteredUnit ProductCreateRecurringPricesType = "metered_unit"
	ProductCreateRecurringPricesTypeSeatBased   ProductCreateRecurringPricesType = "seat_based"
)

type ProductCreateType ¶

type ProductCreateType string
const (
	ProductCreateTypeProductCreateRecurring ProductCreateType = "ProductCreateRecurring"
	ProductCreateTypeProductCreateOneTime   ProductCreateType = "ProductCreateOneTime"
)

type ProductMediaFileCreate ¶

type ProductMediaFileCreate struct {
	OrganizationID *string `json:"organization_id,omitempty"`
	Name           string  `json:"name"`
	// MIME type of the file. Only images are supported for this type of file.
	MimeType string `json:"mime_type"`
	// Size of the file. A maximum of 10 MB is allowed for this type of file.
	Size                 int64                 `json:"size"`
	ChecksumSha256Base64 *string               `json:"checksum_sha256_base64,omitempty"`
	Upload               S3FileCreateMultipart `json:"upload"`

	Version *string `json:"version,omitempty"`
	// contains filtered or unexported fields
}

ProductMediaFileCreate - Schema to create a file to be used as a product media file.

func (*ProductMediaFileCreate) GetChecksumSha256Base64 ¶

func (p *ProductMediaFileCreate) GetChecksumSha256Base64() *string

func (*ProductMediaFileCreate) GetMimeType ¶

func (p *ProductMediaFileCreate) GetMimeType() string

func (*ProductMediaFileCreate) GetName ¶

func (p *ProductMediaFileCreate) GetName() string

func (*ProductMediaFileCreate) GetOrganizationID ¶

func (p *ProductMediaFileCreate) GetOrganizationID() *string

func (*ProductMediaFileCreate) GetService ¶

func (p *ProductMediaFileCreate) GetService() string

func (*ProductMediaFileCreate) GetSize ¶

func (p *ProductMediaFileCreate) GetSize() int64

func (*ProductMediaFileCreate) GetUpload ¶

func (*ProductMediaFileCreate) GetVersion ¶

func (p *ProductMediaFileCreate) GetVersion() *string

func (ProductMediaFileCreate) MarshalJSON ¶

func (p ProductMediaFileCreate) MarshalJSON() ([]byte, error)

func (*ProductMediaFileCreate) UnmarshalJSON ¶

func (p *ProductMediaFileCreate) UnmarshalJSON(data []byte) error

type ProductMediaFileRead ¶

type ProductMediaFileRead struct {
	// The ID of the object.
	ID                   string     `json:"id"`
	OrganizationID       string     `json:"organization_id"`
	Name                 string     `json:"name"`
	Path                 string     `json:"path"`
	MimeType             string     `json:"mime_type"`
	Size                 int64      `json:"size"`
	StorageVersion       *string    `json:"storage_version"`
	ChecksumEtag         *string    `json:"checksum_etag"`
	ChecksumSha256Base64 *string    `json:"checksum_sha256_base64"`
	ChecksumSha256Hex    *string    `json:"checksum_sha256_hex"`
	LastModifiedAt       *time.Time `json:"last_modified_at"`
	Version              *string    `json:"version"`

	IsUploaded   bool      `json:"is_uploaded"`
	CreatedAt    time.Time `json:"created_at"`
	SizeReadable string    `json:"size_readable"`
	PublicURL    string    `json:"public_url"`
	// contains filtered or unexported fields
}

ProductMediaFileRead - File to be used as a product media file.

func (*ProductMediaFileRead) GetChecksumEtag ¶

func (p *ProductMediaFileRead) GetChecksumEtag() *string

func (*ProductMediaFileRead) GetChecksumSha256Base64 ¶

func (p *ProductMediaFileRead) GetChecksumSha256Base64() *string

func (*ProductMediaFileRead) GetChecksumSha256Hex ¶

func (p *ProductMediaFileRead) GetChecksumSha256Hex() *string

func (*ProductMediaFileRead) GetCreatedAt ¶

func (p *ProductMediaFileRead) GetCreatedAt() time.Time

func (*ProductMediaFileRead) GetID ¶

func (p *ProductMediaFileRead) GetID() string

func (*ProductMediaFileRead) GetIsUploaded ¶

func (p *ProductMediaFileRead) GetIsUploaded() bool

func (*ProductMediaFileRead) GetLastModifiedAt ¶

func (p *ProductMediaFileRead) GetLastModifiedAt() *time.Time

func (*ProductMediaFileRead) GetMimeType ¶

func (p *ProductMediaFileRead) GetMimeType() string

func (*ProductMediaFileRead) GetName ¶

func (p *ProductMediaFileRead) GetName() string

func (*ProductMediaFileRead) GetOrganizationID ¶

func (p *ProductMediaFileRead) GetOrganizationID() string

func (*ProductMediaFileRead) GetPath ¶

func (p *ProductMediaFileRead) GetPath() string

func (*ProductMediaFileRead) GetPublicURL ¶

func (p *ProductMediaFileRead) GetPublicURL() string

func (*ProductMediaFileRead) GetService ¶

func (p *ProductMediaFileRead) GetService() string

func (*ProductMediaFileRead) GetSize ¶

func (p *ProductMediaFileRead) GetSize() int64

func (*ProductMediaFileRead) GetSizeReadable ¶

func (p *ProductMediaFileRead) GetSizeReadable() string

func (*ProductMediaFileRead) GetStorageVersion ¶

func (p *ProductMediaFileRead) GetStorageVersion() *string

func (*ProductMediaFileRead) GetVersion ¶

func (p *ProductMediaFileRead) GetVersion() *string

func (ProductMediaFileRead) MarshalJSON ¶

func (p ProductMediaFileRead) MarshalJSON() ([]byte, error)

func (*ProductMediaFileRead) UnmarshalJSON ¶

func (p *ProductMediaFileRead) UnmarshalJSON(data []byte) error

type ProductPrice ¶

type ProductPrice struct {
	ProductPriceFixed       *ProductPriceFixed       `queryParam:"inline" union:"member"`
	ProductPriceCustom      *ProductPriceCustom      `queryParam:"inline" union:"member"`
	ProductPriceFree        *ProductPriceFree        `queryParam:"inline" union:"member"`
	ProductPriceSeatBased   *ProductPriceSeatBased   `queryParam:"inline" union:"member"`
	ProductPriceMeteredUnit *ProductPriceMeteredUnit `queryParam:"inline" union:"member"`

	Type ProductPriceType
}

func CreateProductPriceCustom ¶ added in v0.4.20

func CreateProductPriceCustom(custom ProductPriceCustom) ProductPrice

func CreateProductPriceFixed ¶ added in v0.4.20

func CreateProductPriceFixed(fixed ProductPriceFixed) ProductPrice

func CreateProductPriceFree ¶ added in v0.4.20

func CreateProductPriceFree(free ProductPriceFree) ProductPrice

func CreateProductPriceMeteredUnit ¶ added in v0.4.20

func CreateProductPriceMeteredUnit(meteredUnit ProductPriceMeteredUnit) ProductPrice

func CreateProductPriceSeatBased ¶ added in v0.10.0

func CreateProductPriceSeatBased(seatBased ProductPriceSeatBased) ProductPrice

func (ProductPrice) MarshalJSON ¶

func (u ProductPrice) MarshalJSON() ([]byte, error)

func (*ProductPrice) UnmarshalJSON ¶

func (u *ProductPrice) UnmarshalJSON(data []byte) error

type ProductPriceCustom ¶ added in v0.3.0

type ProductPriceCustom struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the price.
	ID     string             `json:"id"`
	Source ProductPriceSource `json:"source"`

	// The currency in which the customer will be charged.
	PriceCurrency string `json:"price_currency"`
	// The tax behavior of the price. If null, it defaults to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior"`
	// Whether the price is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the product owning the price.
	ProductID string `json:"product_id"`
	// The minimum amount the customer can pay. If 0, the price is 'free or pay what you want'. Defaults to 50 cents.
	MinimumAmount int64 `json:"minimum_amount"`
	// The maximum amount the customer can pay.
	MaximumAmount *int64 `json:"maximum_amount"`
	// The initial amount shown to the customer.
	PresetAmount *int64 `json:"preset_amount"`
	// contains filtered or unexported fields
}

ProductPriceCustom - A pay-what-you-want price for a product.

func (*ProductPriceCustom) GetAmountType ¶ added in v0.3.0

func (p *ProductPriceCustom) GetAmountType() string

func (*ProductPriceCustom) GetCreatedAt ¶ added in v0.3.0

func (p *ProductPriceCustom) GetCreatedAt() time.Time

func (*ProductPriceCustom) GetID ¶ added in v0.3.0

func (p *ProductPriceCustom) GetID() string

func (*ProductPriceCustom) GetIsArchived ¶ added in v0.3.0

func (p *ProductPriceCustom) GetIsArchived() bool

func (*ProductPriceCustom) GetMaximumAmount ¶ added in v0.3.0

func (p *ProductPriceCustom) GetMaximumAmount() *int64

func (*ProductPriceCustom) GetMinimumAmount ¶ added in v0.3.0

func (p *ProductPriceCustom) GetMinimumAmount() int64

func (*ProductPriceCustom) GetModifiedAt ¶ added in v0.3.0

func (p *ProductPriceCustom) GetModifiedAt() *time.Time

func (*ProductPriceCustom) GetPresetAmount ¶ added in v0.3.0

func (p *ProductPriceCustom) GetPresetAmount() *int64

func (*ProductPriceCustom) GetPriceCurrency ¶ added in v0.3.0

func (p *ProductPriceCustom) GetPriceCurrency() string

func (*ProductPriceCustom) GetProductID ¶ added in v0.3.0

func (p *ProductPriceCustom) GetProductID() string

func (*ProductPriceCustom) GetSource ¶ added in v0.13.0

func (p *ProductPriceCustom) GetSource() ProductPriceSource

func (*ProductPriceCustom) GetTaxBehavior ¶ added in v0.15.1

func (p *ProductPriceCustom) GetTaxBehavior() *TaxBehaviorOption

func (ProductPriceCustom) MarshalJSON ¶ added in v0.3.0

func (p ProductPriceCustom) MarshalJSON() ([]byte, error)

func (*ProductPriceCustom) UnmarshalJSON ¶ added in v0.3.0

func (p *ProductPriceCustom) UnmarshalJSON(data []byte) error

type ProductPriceCustomCreate ¶ added in v0.3.0

type ProductPriceCustomCreate struct {
	PriceCurrency *PresentmentCurrency `json:"price_currency,omitempty"`
	// The tax behavior of the price. If not set, it will default to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior,omitempty"`
	// The minimum amount the customer can pay. If set to 0, the price is 'free or pay what you want' and $0 is accepted. If set to a value between 1-49, it will be rejected. Defaults to 50 cents.
	MinimumAmount *int64 `default:"50" json:"minimum_amount"`
	// The maximum amount the customer can pay.
	MaximumAmount *int64 `json:"maximum_amount,omitempty"`
	// The initial amount shown to the customer. If 0, the customer will see $0 as the default. Values between 1-49 are rejected.
	PresetAmount *int64 `json:"preset_amount,omitempty"`
	// contains filtered or unexported fields
}

ProductPriceCustomCreate - Schema to create a pay-what-you-want price.

func (*ProductPriceCustomCreate) GetAmountType ¶ added in v0.3.0

func (p *ProductPriceCustomCreate) GetAmountType() string

func (*ProductPriceCustomCreate) GetMaximumAmount ¶ added in v0.3.0

func (p *ProductPriceCustomCreate) GetMaximumAmount() *int64

func (*ProductPriceCustomCreate) GetMinimumAmount ¶ added in v0.3.0

func (p *ProductPriceCustomCreate) GetMinimumAmount() *int64

func (*ProductPriceCustomCreate) GetPresetAmount ¶ added in v0.3.0

func (p *ProductPriceCustomCreate) GetPresetAmount() *int64

func (*ProductPriceCustomCreate) GetPriceCurrency ¶ added in v0.3.0

func (p *ProductPriceCustomCreate) GetPriceCurrency() *PresentmentCurrency

func (*ProductPriceCustomCreate) GetTaxBehavior ¶ added in v0.15.1

func (p *ProductPriceCustomCreate) GetTaxBehavior() *TaxBehaviorOption

func (ProductPriceCustomCreate) MarshalJSON ¶ added in v0.3.0

func (p ProductPriceCustomCreate) MarshalJSON() ([]byte, error)

func (*ProductPriceCustomCreate) UnmarshalJSON ¶ added in v0.3.0

func (p *ProductPriceCustomCreate) UnmarshalJSON(data []byte) error

type ProductPriceFixed ¶ added in v0.3.0

type ProductPriceFixed struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the price.
	ID     string             `json:"id"`
	Source ProductPriceSource `json:"source"`

	// The currency in which the customer will be charged.
	PriceCurrency string `json:"price_currency"`
	// The tax behavior of the price. If null, it defaults to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior"`
	// Whether the price is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the product owning the price.
	ProductID string `json:"product_id"`
	// The price in cents.
	PriceAmount int64 `json:"price_amount"`
	// contains filtered or unexported fields
}

ProductPriceFixed - A fixed price for a product.

func (*ProductPriceFixed) GetAmountType ¶ added in v0.3.0

func (p *ProductPriceFixed) GetAmountType() string

func (*ProductPriceFixed) GetCreatedAt ¶ added in v0.3.0

func (p *ProductPriceFixed) GetCreatedAt() time.Time

func (*ProductPriceFixed) GetID ¶ added in v0.3.0

func (p *ProductPriceFixed) GetID() string

func (*ProductPriceFixed) GetIsArchived ¶ added in v0.3.0

func (p *ProductPriceFixed) GetIsArchived() bool

func (*ProductPriceFixed) GetModifiedAt ¶ added in v0.3.0

func (p *ProductPriceFixed) GetModifiedAt() *time.Time

func (*ProductPriceFixed) GetPriceAmount ¶ added in v0.3.0

func (p *ProductPriceFixed) GetPriceAmount() int64

func (*ProductPriceFixed) GetPriceCurrency ¶ added in v0.3.0

func (p *ProductPriceFixed) GetPriceCurrency() string

func (*ProductPriceFixed) GetProductID ¶ added in v0.3.0

func (p *ProductPriceFixed) GetProductID() string

func (*ProductPriceFixed) GetSource ¶ added in v0.13.0

func (p *ProductPriceFixed) GetSource() ProductPriceSource

func (*ProductPriceFixed) GetTaxBehavior ¶ added in v0.15.1

func (p *ProductPriceFixed) GetTaxBehavior() *TaxBehaviorOption

func (ProductPriceFixed) MarshalJSON ¶ added in v0.3.0

func (p ProductPriceFixed) MarshalJSON() ([]byte, error)

func (*ProductPriceFixed) UnmarshalJSON ¶ added in v0.3.0

func (p *ProductPriceFixed) UnmarshalJSON(data []byte) error

type ProductPriceFixedCreate ¶ added in v0.3.0

type ProductPriceFixedCreate struct {
	PriceCurrency *PresentmentCurrency `json:"price_currency,omitempty"`
	// The tax behavior of the price. If not set, it will default to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior,omitempty"`
	// The price in cents.
	// Minimum amounts per currency:
	// - USD: $0.50
	// - AED: AED2.00
	// - ARS: ARS0.50
	// - AUD: A$0.50
	// - BRL: R$0.50
	// - CAD: CA$0.50
	// - CHF: CHF0.50
	// - COP: COP0.50
	// - CZK: CZK15.00
	// - DKK: DKK2.50
	// - EUR: €0.50
	// - GBP: ÂŁ0.30
	// - HKD: HK$4.00
	// - HUF: HUF175.00
	// - IDR: IDR0.50
	// - ILS: ₪0.50
	// - INR: ₹60.00
	// - JPY: ÂĄ50
	// - KRW: â‚©50
	// - MXN: MX$0.10
	// - MYR: MYR2.00
	// - NOK: NOK3.00
	// - NZD: NZ$0.50
	// - PHP: ₱0.50
	// - PLN: PLN2.00
	// - RON: RON2.00
	// - RUB: RUB0.50
	// - SEK: SEK3.00
	// - SGD: SGD0.50
	// - THB: THB0.10
	// - ZAR: ZAR0.50
	PriceAmount int64 `json:"price_amount"`
	// contains filtered or unexported fields
}

ProductPriceFixedCreate - Schema to create a fixed price.

func (*ProductPriceFixedCreate) GetAmountType ¶ added in v0.3.0

func (p *ProductPriceFixedCreate) GetAmountType() string

func (*ProductPriceFixedCreate) GetPriceAmount ¶ added in v0.3.0

func (p *ProductPriceFixedCreate) GetPriceAmount() int64

func (*ProductPriceFixedCreate) GetPriceCurrency ¶ added in v0.3.0

func (p *ProductPriceFixedCreate) GetPriceCurrency() *PresentmentCurrency

func (*ProductPriceFixedCreate) GetTaxBehavior ¶ added in v0.15.1

func (p *ProductPriceFixedCreate) GetTaxBehavior() *TaxBehaviorOption

func (ProductPriceFixedCreate) MarshalJSON ¶ added in v0.3.0

func (p ProductPriceFixedCreate) MarshalJSON() ([]byte, error)

func (*ProductPriceFixedCreate) UnmarshalJSON ¶ added in v0.3.0

func (p *ProductPriceFixedCreate) UnmarshalJSON(data []byte) error

type ProductPriceFree ¶ added in v0.3.0

type ProductPriceFree struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the price.
	ID     string             `json:"id"`
	Source ProductPriceSource `json:"source"`

	// The currency in which the customer will be charged.
	PriceCurrency string `json:"price_currency"`
	// The tax behavior of the price. If null, it defaults to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior"`
	// Whether the price is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the product owning the price.
	ProductID string `json:"product_id"`
	// contains filtered or unexported fields
}

ProductPriceFree - A free price for a product.

func (*ProductPriceFree) GetAmountType ¶ added in v0.3.0

func (p *ProductPriceFree) GetAmountType() string

func (*ProductPriceFree) GetCreatedAt ¶ added in v0.3.0

func (p *ProductPriceFree) GetCreatedAt() time.Time

func (*ProductPriceFree) GetID ¶ added in v0.3.0

func (p *ProductPriceFree) GetID() string

func (*ProductPriceFree) GetIsArchived ¶ added in v0.3.0

func (p *ProductPriceFree) GetIsArchived() bool

func (*ProductPriceFree) GetModifiedAt ¶ added in v0.3.0

func (p *ProductPriceFree) GetModifiedAt() *time.Time

func (*ProductPriceFree) GetPriceCurrency ¶ added in v0.13.0

func (p *ProductPriceFree) GetPriceCurrency() string

func (*ProductPriceFree) GetProductID ¶ added in v0.3.0

func (p *ProductPriceFree) GetProductID() string

func (*ProductPriceFree) GetSource ¶ added in v0.13.0

func (p *ProductPriceFree) GetSource() ProductPriceSource

func (*ProductPriceFree) GetTaxBehavior ¶ added in v0.15.1

func (p *ProductPriceFree) GetTaxBehavior() *TaxBehaviorOption

func (ProductPriceFree) MarshalJSON ¶ added in v0.3.0

func (p ProductPriceFree) MarshalJSON() ([]byte, error)

func (*ProductPriceFree) UnmarshalJSON ¶ added in v0.3.0

func (p *ProductPriceFree) UnmarshalJSON(data []byte) error

type ProductPriceFreeCreate ¶ added in v0.3.0

type ProductPriceFreeCreate struct {
	PriceCurrency *PresentmentCurrency `json:"price_currency,omitempty"`
	// The tax behavior of the price. If not set, it will default to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior,omitempty"`
	// contains filtered or unexported fields
}

ProductPriceFreeCreate - Schema to create a free price.

func (*ProductPriceFreeCreate) GetAmountType ¶ added in v0.3.0

func (p *ProductPriceFreeCreate) GetAmountType() string

func (*ProductPriceFreeCreate) GetPriceCurrency ¶ added in v0.13.0

func (p *ProductPriceFreeCreate) GetPriceCurrency() *PresentmentCurrency

func (*ProductPriceFreeCreate) GetTaxBehavior ¶ added in v0.15.1

func (p *ProductPriceFreeCreate) GetTaxBehavior() *TaxBehaviorOption

func (ProductPriceFreeCreate) MarshalJSON ¶ added in v0.3.0

func (p ProductPriceFreeCreate) MarshalJSON() ([]byte, error)

func (*ProductPriceFreeCreate) UnmarshalJSON ¶ added in v0.3.0

func (p *ProductPriceFreeCreate) UnmarshalJSON(data []byte) error

type ProductPriceMeter ¶ added in v0.4.8

type ProductPriceMeter struct {
	// The ID of the object.
	ID string `json:"id"`
	// The name of the meter.
	Name string `json:"name"`
}

ProductPriceMeter - A meter associated to a metered price.

func (*ProductPriceMeter) GetID ¶ added in v0.4.8

func (p *ProductPriceMeter) GetID() string

func (*ProductPriceMeter) GetName ¶ added in v0.4.8

func (p *ProductPriceMeter) GetName() string

func (ProductPriceMeter) MarshalJSON ¶ added in v0.8.4

func (p ProductPriceMeter) MarshalJSON() ([]byte, error)

func (*ProductPriceMeter) UnmarshalJSON ¶ added in v0.8.4

func (p *ProductPriceMeter) UnmarshalJSON(data []byte) error

type ProductPriceMeteredUnit ¶ added in v0.4.8

type ProductPriceMeteredUnit struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the price.
	ID     string             `json:"id"`
	Source ProductPriceSource `json:"source"`

	// The currency in which the customer will be charged.
	PriceCurrency string `json:"price_currency"`
	// The tax behavior of the price. If null, it defaults to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior"`
	// Whether the price is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the product owning the price.
	ProductID string `json:"product_id"`
	// The price per unit in cents.
	UnitAmount string `json:"unit_amount"`
	// The maximum amount in cents that can be charged, regardless of the number of units consumed.
	CapAmount *int64 `json:"cap_amount"`
	// The ID of the meter associated to the price.
	MeterID string `json:"meter_id"`
	// A meter associated to a metered price.
	Meter ProductPriceMeter `json:"meter"`
	// contains filtered or unexported fields
}

ProductPriceMeteredUnit - A metered, usage-based, price for a product, with a fixed unit price.

func (*ProductPriceMeteredUnit) GetAmountType ¶ added in v0.4.8

func (p *ProductPriceMeteredUnit) GetAmountType() string

func (*ProductPriceMeteredUnit) GetCapAmount ¶ added in v0.4.8

func (p *ProductPriceMeteredUnit) GetCapAmount() *int64

func (*ProductPriceMeteredUnit) GetCreatedAt ¶ added in v0.4.8

func (p *ProductPriceMeteredUnit) GetCreatedAt() time.Time

func (*ProductPriceMeteredUnit) GetID ¶ added in v0.4.8

func (p *ProductPriceMeteredUnit) GetID() string

func (*ProductPriceMeteredUnit) GetIsArchived ¶ added in v0.4.8

func (p *ProductPriceMeteredUnit) GetIsArchived() bool

func (*ProductPriceMeteredUnit) GetMeter ¶ added in v0.4.8

func (*ProductPriceMeteredUnit) GetMeterID ¶ added in v0.4.8

func (p *ProductPriceMeteredUnit) GetMeterID() string

func (*ProductPriceMeteredUnit) GetModifiedAt ¶ added in v0.4.8

func (p *ProductPriceMeteredUnit) GetModifiedAt() *time.Time

func (*ProductPriceMeteredUnit) GetPriceCurrency ¶ added in v0.4.8

func (p *ProductPriceMeteredUnit) GetPriceCurrency() string

func (*ProductPriceMeteredUnit) GetProductID ¶ added in v0.4.8

func (p *ProductPriceMeteredUnit) GetProductID() string

func (*ProductPriceMeteredUnit) GetSource ¶ added in v0.13.0

func (*ProductPriceMeteredUnit) GetTaxBehavior ¶ added in v0.15.1

func (p *ProductPriceMeteredUnit) GetTaxBehavior() *TaxBehaviorOption

func (*ProductPriceMeteredUnit) GetUnitAmount ¶ added in v0.4.8

func (p *ProductPriceMeteredUnit) GetUnitAmount() string

func (ProductPriceMeteredUnit) MarshalJSON ¶ added in v0.4.8

func (p ProductPriceMeteredUnit) MarshalJSON() ([]byte, error)

func (*ProductPriceMeteredUnit) UnmarshalJSON ¶ added in v0.4.8

func (p *ProductPriceMeteredUnit) UnmarshalJSON(data []byte) error

type ProductPriceMeteredUnitCreate ¶ added in v0.4.9

type ProductPriceMeteredUnitCreate struct {
	PriceCurrency *PresentmentCurrency `json:"price_currency,omitempty"`
	// The tax behavior of the price. If not set, it will default to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior,omitempty"`
	// The ID of the meter associated to the price.
	MeterID string `json:"meter_id"`
	// The price per unit in cents. Supports up to 12 decimal places.
	UnitAmount UnitAmount `json:"unit_amount"`
	// Optional maximum amount in cents that can be charged, regardless of the number of units consumed.
	CapAmount *int64 `json:"cap_amount,omitempty"`
	// contains filtered or unexported fields
}

ProductPriceMeteredUnitCreate - Schema to create a metered price with a fixed unit price.

func (*ProductPriceMeteredUnitCreate) GetAmountType ¶ added in v0.4.9

func (p *ProductPriceMeteredUnitCreate) GetAmountType() string

func (*ProductPriceMeteredUnitCreate) GetCapAmount ¶ added in v0.4.9

func (p *ProductPriceMeteredUnitCreate) GetCapAmount() *int64

func (*ProductPriceMeteredUnitCreate) GetMeterID ¶ added in v0.4.9

func (p *ProductPriceMeteredUnitCreate) GetMeterID() string

func (*ProductPriceMeteredUnitCreate) GetPriceCurrency ¶ added in v0.4.9

func (p *ProductPriceMeteredUnitCreate) GetPriceCurrency() *PresentmentCurrency

func (*ProductPriceMeteredUnitCreate) GetTaxBehavior ¶ added in v0.15.1

func (p *ProductPriceMeteredUnitCreate) GetTaxBehavior() *TaxBehaviorOption

func (*ProductPriceMeteredUnitCreate) GetUnitAmount ¶ added in v0.4.9

func (p *ProductPriceMeteredUnitCreate) GetUnitAmount() UnitAmount

func (ProductPriceMeteredUnitCreate) MarshalJSON ¶ added in v0.4.9

func (p ProductPriceMeteredUnitCreate) MarshalJSON() ([]byte, error)

func (*ProductPriceMeteredUnitCreate) UnmarshalJSON ¶ added in v0.4.9

func (p *ProductPriceMeteredUnitCreate) UnmarshalJSON(data []byte) error

type ProductPriceSeatBased ¶ added in v0.10.0

type ProductPriceSeatBased struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the price.
	ID     string             `json:"id"`
	Source ProductPriceSource `json:"source"`

	// The currency in which the customer will be charged.
	PriceCurrency string `json:"price_currency"`
	// The tax behavior of the price. If null, it defaults to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior"`
	// Whether the price is archived and no longer available.
	IsArchived bool `json:"is_archived"`
	// The ID of the product owning the price.
	ProductID string `json:"product_id"`
	// List of pricing tiers for seat-based pricing.
	//
	// The minimum and maximum seat limits are derived from the tiers:
	// - minimum_seats = first tier's min_seats
	// - maximum_seats = last tier's max_seats (None for unlimited)
	SeatTiers ProductPriceSeatTiersOutput `json:"seat_tiers"`
	// contains filtered or unexported fields
}

ProductPriceSeatBased - A seat-based price for a product.

func (*ProductPriceSeatBased) GetAmountType ¶ added in v0.10.0

func (p *ProductPriceSeatBased) GetAmountType() string

func (*ProductPriceSeatBased) GetCreatedAt ¶ added in v0.10.0

func (p *ProductPriceSeatBased) GetCreatedAt() time.Time

func (*ProductPriceSeatBased) GetID ¶ added in v0.10.0

func (p *ProductPriceSeatBased) GetID() string

func (*ProductPriceSeatBased) GetIsArchived ¶ added in v0.10.0

func (p *ProductPriceSeatBased) GetIsArchived() bool

func (*ProductPriceSeatBased) GetModifiedAt ¶ added in v0.10.0

func (p *ProductPriceSeatBased) GetModifiedAt() *time.Time

func (*ProductPriceSeatBased) GetPriceCurrency ¶ added in v0.10.0

func (p *ProductPriceSeatBased) GetPriceCurrency() string

func (*ProductPriceSeatBased) GetProductID ¶ added in v0.10.0

func (p *ProductPriceSeatBased) GetProductID() string

func (*ProductPriceSeatBased) GetSeatTiers ¶ added in v0.10.1

func (*ProductPriceSeatBased) GetSource ¶ added in v0.13.0

func (*ProductPriceSeatBased) GetTaxBehavior ¶ added in v0.15.1

func (p *ProductPriceSeatBased) GetTaxBehavior() *TaxBehaviorOption

func (ProductPriceSeatBased) MarshalJSON ¶ added in v0.10.0

func (p ProductPriceSeatBased) MarshalJSON() ([]byte, error)

func (*ProductPriceSeatBased) UnmarshalJSON ¶ added in v0.10.0

func (p *ProductPriceSeatBased) UnmarshalJSON(data []byte) error

type ProductPriceSeatBasedCreate ¶ added in v0.10.0

type ProductPriceSeatBasedCreate struct {
	PriceCurrency *PresentmentCurrency `json:"price_currency,omitempty"`
	// The tax behavior of the price. If not set, it will default to the organization's default tax behavior.
	TaxBehavior *TaxBehaviorOption `json:"tax_behavior,omitempty"`
	// List of pricing tiers for seat-based pricing.
	//
	// The minimum and maximum seat limits are derived from the tiers:
	// - minimum_seats = first tier's min_seats
	// - maximum_seats = last tier's max_seats (None for unlimited)
	SeatTiers ProductPriceSeatTiersInput `json:"seat_tiers"`
	// contains filtered or unexported fields
}

ProductPriceSeatBasedCreate - Schema to create a seat-based price with volume-based tiers.

func (*ProductPriceSeatBasedCreate) GetAmountType ¶ added in v0.10.0

func (p *ProductPriceSeatBasedCreate) GetAmountType() string

func (*ProductPriceSeatBasedCreate) GetPriceCurrency ¶ added in v0.10.0

func (p *ProductPriceSeatBasedCreate) GetPriceCurrency() *PresentmentCurrency

func (*ProductPriceSeatBasedCreate) GetSeatTiers ¶ added in v0.10.1

func (*ProductPriceSeatBasedCreate) GetTaxBehavior ¶ added in v0.15.1

func (p *ProductPriceSeatBasedCreate) GetTaxBehavior() *TaxBehaviorOption

func (ProductPriceSeatBasedCreate) MarshalJSON ¶ added in v0.10.0

func (p ProductPriceSeatBasedCreate) MarshalJSON() ([]byte, error)

func (*ProductPriceSeatBasedCreate) UnmarshalJSON ¶ added in v0.10.0

func (p *ProductPriceSeatBasedCreate) UnmarshalJSON(data []byte) error

type ProductPriceSeatTier ¶ added in v0.10.1

type ProductPriceSeatTier struct {
	// Minimum number of seats (inclusive)
	MinSeats int64 `json:"min_seats"`
	// Maximum number of seats (inclusive). None for unlimited.
	MaxSeats *int64 `json:"max_seats,omitempty"`
	// Price per seat in cents for this tier
	PricePerSeat int64 `json:"price_per_seat"`
}

ProductPriceSeatTier - A pricing tier for seat-based pricing.

func (*ProductPriceSeatTier) GetMaxSeats ¶ added in v0.10.1

func (p *ProductPriceSeatTier) GetMaxSeats() *int64

func (*ProductPriceSeatTier) GetMinSeats ¶ added in v0.10.1

func (p *ProductPriceSeatTier) GetMinSeats() int64

func (*ProductPriceSeatTier) GetPricePerSeat ¶ added in v0.10.1

func (p *ProductPriceSeatTier) GetPricePerSeat() int64

func (ProductPriceSeatTier) MarshalJSON ¶ added in v0.10.1

func (p ProductPriceSeatTier) MarshalJSON() ([]byte, error)

func (*ProductPriceSeatTier) UnmarshalJSON ¶ added in v0.10.1

func (p *ProductPriceSeatTier) UnmarshalJSON(data []byte) error

type ProductPriceSeatTiersInput ¶ added in v0.13.0

type ProductPriceSeatTiersInput struct {
	SeatTierType *SeatTierType `json:"seat_tier_type,omitempty"`
	// List of pricing tiers
	Tiers []ProductPriceSeatTier `json:"tiers"`
}

ProductPriceSeatTiersInput - List of pricing tiers for seat-based pricing.

The minimum and maximum seat limits are derived from the tiers: - minimum_seats = first tier's min_seats - maximum_seats = last tier's max_seats (None for unlimited)

func (*ProductPriceSeatTiersInput) GetSeatTierType ¶ added in v0.15.1

func (p *ProductPriceSeatTiersInput) GetSeatTierType() *SeatTierType

func (*ProductPriceSeatTiersInput) GetTiers ¶ added in v0.13.0

func (ProductPriceSeatTiersInput) MarshalJSON ¶ added in v0.13.0

func (p ProductPriceSeatTiersInput) MarshalJSON() ([]byte, error)

func (*ProductPriceSeatTiersInput) UnmarshalJSON ¶ added in v0.13.0

func (p *ProductPriceSeatTiersInput) UnmarshalJSON(data []byte) error

type ProductPriceSeatTiersOutput ¶ added in v0.13.0

type ProductPriceSeatTiersOutput struct {
	SeatTierType *SeatTierType `json:"seat_tier_type,omitempty"`
	// List of pricing tiers
	Tiers []ProductPriceSeatTier `json:"tiers"`
	// Minimum number of seats required for purchase, derived from first tier.
	MinimumSeats int64 `json:"minimum_seats"`
	// Maximum number of seats allowed for purchase, derived from last tier. None for unlimited.
	MaximumSeats *int64 `json:"maximum_seats"`
}

ProductPriceSeatTiersOutput - List of pricing tiers for seat-based pricing.

The minimum and maximum seat limits are derived from the tiers: - minimum_seats = first tier's min_seats - maximum_seats = last tier's max_seats (None for unlimited)

func (*ProductPriceSeatTiersOutput) GetMaximumSeats ¶ added in v0.13.0

func (p *ProductPriceSeatTiersOutput) GetMaximumSeats() *int64

func (*ProductPriceSeatTiersOutput) GetMinimumSeats ¶ added in v0.13.0

func (p *ProductPriceSeatTiersOutput) GetMinimumSeats() int64

func (*ProductPriceSeatTiersOutput) GetSeatTierType ¶ added in v0.15.1

func (p *ProductPriceSeatTiersOutput) GetSeatTierType() *SeatTierType

func (*ProductPriceSeatTiersOutput) GetTiers ¶ added in v0.13.0

func (ProductPriceSeatTiersOutput) MarshalJSON ¶ added in v0.13.0

func (p ProductPriceSeatTiersOutput) MarshalJSON() ([]byte, error)

func (*ProductPriceSeatTiersOutput) UnmarshalJSON ¶ added in v0.13.0

func (p *ProductPriceSeatTiersOutput) UnmarshalJSON(data []byte) error

type ProductPriceSource ¶ added in v0.13.0

type ProductPriceSource string
const (
	ProductPriceSourceCatalog ProductPriceSource = "catalog"
	ProductPriceSourceAdHoc   ProductPriceSource = "ad_hoc"
)

func (ProductPriceSource) ToPointer ¶ added in v0.13.0

func (e ProductPriceSource) ToPointer() *ProductPriceSource

func (*ProductPriceSource) UnmarshalJSON ¶ added in v0.13.0

func (e *ProductPriceSource) UnmarshalJSON(data []byte) error

type ProductPriceType ¶

type ProductPriceType string
const (
	ProductPriceTypeCustom      ProductPriceType = "custom"
	ProductPriceTypeFixed       ProductPriceType = "fixed"
	ProductPriceTypeFree        ProductPriceType = "free"
	ProductPriceTypeMeteredUnit ProductPriceType = "metered_unit"
	ProductPriceTypeSeatBased   ProductPriceType = "seat_based"
)

type ProductSortProperty ¶

type ProductSortProperty string
const (
	ProductSortPropertyCreatedAt            ProductSortProperty = "created_at"
	ProductSortPropertyMinusCreatedAt       ProductSortProperty = "-created_at"
	ProductSortPropertyName                 ProductSortProperty = "name"
	ProductSortPropertyMinusName            ProductSortProperty = "-name"
	ProductSortPropertyPriceAmountType      ProductSortProperty = "price_amount_type"
	ProductSortPropertyMinusPriceAmountType ProductSortProperty = "-price_amount_type"
	ProductSortPropertyPriceAmount          ProductSortProperty = "price_amount"
	ProductSortPropertyMinusPriceAmount     ProductSortProperty = "-price_amount"
)

func (ProductSortProperty) ToPointer ¶

func (*ProductSortProperty) UnmarshalJSON ¶

func (e *ProductSortProperty) UnmarshalJSON(data []byte) error

type ProductUpdate ¶

type ProductUpdate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]ProductUpdateMetadata `json:"metadata,omitempty"`
	// The interval unit for the trial period.
	TrialInterval *TrialInterval `json:"trial_interval,omitempty"`
	// The number of interval units for the trial period.
	TrialIntervalCount *int64  `json:"trial_interval_count,omitempty"`
	Name               *string `json:"name,omitempty"`
	// The description of the product.
	Description *string `json:"description,omitempty"`
	// The recurring interval of the product. If `None`, the product is a one-time purchase. **Can only be set on legacy recurring products. Once set, it can't be changed.**
	RecurringInterval *SubscriptionRecurringInterval `json:"recurring_interval,omitempty"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. Once set, it can't be changed.**
	RecurringIntervalCount *int64 `json:"recurring_interval_count,omitempty"`
	// Whether the product is archived. If `true`, the product won't be available for purchase anymore. Existing customers will still have access to their benefits, and subscriptions will continue normally.
	IsArchived *bool `json:"is_archived,omitempty"`
	// The visibility of the product.
	Visibility *ProductVisibility `json:"visibility,omitempty"`
	// List of available prices for this product. If you want to keep existing prices, include them in the list as an `ExistingProductPrice` object.
	Prices []ProductUpdatePrices `json:"prices,omitempty"`
	// List of file IDs. Each one must be on the same organization as the product, of type `product_media` and correctly uploaded.
	Medias               []string                    `json:"medias,omitempty"`
	AttachedCustomFields []AttachedCustomFieldCreate `json:"attached_custom_fields,omitempty"`
}

ProductUpdate - Schema to update a product.

func (*ProductUpdate) GetAttachedCustomFields ¶

func (p *ProductUpdate) GetAttachedCustomFields() []AttachedCustomFieldCreate

func (*ProductUpdate) GetDescription ¶

func (p *ProductUpdate) GetDescription() *string

func (*ProductUpdate) GetIsArchived ¶

func (p *ProductUpdate) GetIsArchived() *bool

func (*ProductUpdate) GetMedias ¶

func (p *ProductUpdate) GetMedias() []string

func (*ProductUpdate) GetMetadata ¶

func (p *ProductUpdate) GetMetadata() map[string]ProductUpdateMetadata

func (*ProductUpdate) GetName ¶

func (p *ProductUpdate) GetName() *string

func (*ProductUpdate) GetPrices ¶

func (p *ProductUpdate) GetPrices() []ProductUpdatePrices

func (*ProductUpdate) GetRecurringInterval ¶ added in v0.3.0

func (p *ProductUpdate) GetRecurringInterval() *SubscriptionRecurringInterval

func (*ProductUpdate) GetRecurringIntervalCount ¶ added in v0.12.0

func (p *ProductUpdate) GetRecurringIntervalCount() *int64

func (*ProductUpdate) GetTrialInterval ¶ added in v0.9.1

func (p *ProductUpdate) GetTrialInterval() *TrialInterval

func (*ProductUpdate) GetTrialIntervalCount ¶ added in v0.9.1

func (p *ProductUpdate) GetTrialIntervalCount() *int64

func (*ProductUpdate) GetVisibility ¶ added in v0.13.0

func (p *ProductUpdate) GetVisibility() *ProductVisibility

type ProductUpdateMetadata ¶

type ProductUpdateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type ProductUpdateMetadataType
}

func CreateProductUpdateMetadataBoolean ¶

func CreateProductUpdateMetadataBoolean(boolean bool) ProductUpdateMetadata

func CreateProductUpdateMetadataInteger ¶

func CreateProductUpdateMetadataInteger(integer int64) ProductUpdateMetadata

func CreateProductUpdateMetadataNumber ¶ added in v0.4.12

func CreateProductUpdateMetadataNumber(number float64) ProductUpdateMetadata

func CreateProductUpdateMetadataStr ¶

func CreateProductUpdateMetadataStr(str string) ProductUpdateMetadata

func (ProductUpdateMetadata) MarshalJSON ¶

func (u ProductUpdateMetadata) MarshalJSON() ([]byte, error)

func (*ProductUpdateMetadata) UnmarshalJSON ¶

func (u *ProductUpdateMetadata) UnmarshalJSON(data []byte) error

type ProductUpdateMetadataType ¶

type ProductUpdateMetadataType string
const (
	ProductUpdateMetadataTypeStr     ProductUpdateMetadataType = "str"
	ProductUpdateMetadataTypeInteger ProductUpdateMetadataType = "integer"
	ProductUpdateMetadataTypeNumber  ProductUpdateMetadataType = "number"
	ProductUpdateMetadataTypeBoolean ProductUpdateMetadataType = "boolean"
)

type ProductUpdatePrices ¶

type ProductUpdatePrices struct {
	ExistingProductPrice *ExistingProductPrice `queryParam:"inline" union:"member"`
	Two                  *Two                  `queryParam:"inline" union:"member"`

	Type ProductUpdatePricesType
}

func CreateProductUpdatePricesExistingProductPrice ¶

func CreateProductUpdatePricesExistingProductPrice(existingProductPrice ExistingProductPrice) ProductUpdatePrices

func CreateProductUpdatePricesTwo ¶ added in v0.10.1

func CreateProductUpdatePricesTwo(two Two) ProductUpdatePrices

func (ProductUpdatePrices) MarshalJSON ¶

func (u ProductUpdatePrices) MarshalJSON() ([]byte, error)

func (*ProductUpdatePrices) UnmarshalJSON ¶

func (u *ProductUpdatePrices) UnmarshalJSON(data []byte) error

type ProductUpdatePricesType ¶

type ProductUpdatePricesType string
const (
	ProductUpdatePricesTypeExistingProductPrice ProductUpdatePricesType = "ExistingProductPrice"
	ProductUpdatePricesTypeTwo                  ProductUpdatePricesType = "2"
)

type ProductVisibility ¶ added in v0.13.0

type ProductVisibility string
const (
	ProductVisibilityDraft   ProductVisibility = "draft"
	ProductVisibilityPrivate ProductVisibility = "private"
	ProductVisibilityPublic  ProductVisibility = "public"
)

func (ProductVisibility) ToPointer ¶ added in v0.13.0

func (e ProductVisibility) ToPointer() *ProductVisibility

func (*ProductVisibility) UnmarshalJSON ¶ added in v0.13.0

func (e *ProductVisibility) UnmarshalJSON(data []byte) error

type Properties ¶

type Properties struct {
	BenefitGrantDiscordProperties          *BenefitGrantDiscordProperties          `queryParam:"inline" union:"member"`
	BenefitGrantGitHubRepositoryProperties *BenefitGrantGitHubRepositoryProperties `queryParam:"inline" union:"member"`
	BenefitGrantDownloadablesProperties    *BenefitGrantDownloadablesProperties    `queryParam:"inline" union:"member"`
	BenefitGrantLicenseKeysProperties      *BenefitGrantLicenseKeysProperties      `queryParam:"inline" union:"member"`
	BenefitGrantCustomProperties           *BenefitGrantCustomProperties           `queryParam:"inline" union:"member"`
	BenefitGrantFeatureFlagProperties      *BenefitGrantFeatureFlagProperties      `queryParam:"inline" union:"member"`

	Type PropertiesType
}

func CreatePropertiesBenefitGrantCustomProperties ¶

func CreatePropertiesBenefitGrantCustomProperties(benefitGrantCustomProperties BenefitGrantCustomProperties) Properties

func CreatePropertiesBenefitGrantDiscordProperties ¶

func CreatePropertiesBenefitGrantDiscordProperties(benefitGrantDiscordProperties BenefitGrantDiscordProperties) Properties

func CreatePropertiesBenefitGrantDownloadablesProperties ¶

func CreatePropertiesBenefitGrantDownloadablesProperties(benefitGrantDownloadablesProperties BenefitGrantDownloadablesProperties) Properties

func CreatePropertiesBenefitGrantFeatureFlagProperties ¶ added in v0.15.0

func CreatePropertiesBenefitGrantFeatureFlagProperties(benefitGrantFeatureFlagProperties BenefitGrantFeatureFlagProperties) Properties

func CreatePropertiesBenefitGrantGitHubRepositoryProperties ¶

func CreatePropertiesBenefitGrantGitHubRepositoryProperties(benefitGrantGitHubRepositoryProperties BenefitGrantGitHubRepositoryProperties) Properties

func CreatePropertiesBenefitGrantLicenseKeysProperties ¶

func CreatePropertiesBenefitGrantLicenseKeysProperties(benefitGrantLicenseKeysProperties BenefitGrantLicenseKeysProperties) Properties

func (Properties) MarshalJSON ¶

func (u Properties) MarshalJSON() ([]byte, error)

func (*Properties) UnmarshalJSON ¶

func (u *Properties) UnmarshalJSON(data []byte) error

type PropertiesType ¶

type PropertiesType string
const (
	PropertiesTypeBenefitGrantDiscordProperties          PropertiesType = "BenefitGrantDiscordProperties"
	PropertiesTypeBenefitGrantGitHubRepositoryProperties PropertiesType = "BenefitGrantGitHubRepositoryProperties"
	PropertiesTypeBenefitGrantDownloadablesProperties    PropertiesType = "BenefitGrantDownloadablesProperties"
	PropertiesTypeBenefitGrantLicenseKeysProperties      PropertiesType = "BenefitGrantLicenseKeysProperties"
	PropertiesTypeBenefitGrantCustomProperties           PropertiesType = "BenefitGrantCustomProperties"
	PropertiesTypeBenefitGrantFeatureFlagProperties      PropertiesType = "BenefitGrantFeatureFlagProperties"
)

type PropertyAggregation ¶ added in v0.1.8

type PropertyAggregation struct {
	Func     Func   `json:"func"`
	Property string `json:"property"`
}

func (*PropertyAggregation) GetFunc ¶ added in v0.1.8

func (p *PropertyAggregation) GetFunc() Func

func (*PropertyAggregation) GetProperty ¶ added in v0.1.8

func (p *PropertyAggregation) GetProperty() string

func (PropertyAggregation) MarshalJSON ¶ added in v0.8.4

func (p PropertyAggregation) MarshalJSON() ([]byte, error)

func (*PropertyAggregation) UnmarshalJSON ¶ added in v0.8.4

func (p *PropertyAggregation) UnmarshalJSON(data []byte) error

type RefreshTokenRequest ¶ added in v0.3.0

type RefreshTokenRequest struct {
	ClientID     string `form:"name=client_id"`
	ClientSecret string `form:"name=client_secret"`
	RefreshToken string `form:"name=refresh_token"`
	// contains filtered or unexported fields
}

func (*RefreshTokenRequest) GetClientID ¶ added in v0.3.0

func (r *RefreshTokenRequest) GetClientID() string

func (*RefreshTokenRequest) GetClientSecret ¶ added in v0.3.0

func (r *RefreshTokenRequest) GetClientSecret() string

func (*RefreshTokenRequest) GetGrantType ¶ added in v0.3.0

func (r *RefreshTokenRequest) GetGrantType() string

func (*RefreshTokenRequest) GetRefreshToken ¶ added in v0.3.0

func (r *RefreshTokenRequest) GetRefreshToken() string

func (RefreshTokenRequest) MarshalJSON ¶ added in v0.3.0

func (r RefreshTokenRequest) MarshalJSON() ([]byte, error)

func (*RefreshTokenRequest) UnmarshalJSON ¶ added in v0.3.0

func (r *RefreshTokenRequest) UnmarshalJSON(data []byte) error

type Refund ¶ added in v0.1.5

type Refund struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID             string                        `json:"id"`
	Metadata       map[string]MetadataOutputType `json:"metadata"`
	Status         RefundStatus                  `json:"status"`
	Reason         RefundReason                  `json:"reason"`
	Amount         int64                         `json:"amount"`
	TaxAmount      int64                         `json:"tax_amount"`
	Currency       string                        `json:"currency"`
	OrganizationID string                        `json:"organization_id"`
	OrderID        string                        `json:"order_id"`
	SubscriptionID *string                       `json:"subscription_id"`
	CustomerID     string                        `json:"customer_id"`
	RevokeBenefits bool                          `json:"revoke_benefits"`
	Dispute        *RefundDispute                `json:"dispute"`
}

func (*Refund) GetAmount ¶ added in v0.1.5

func (r *Refund) GetAmount() int64

func (*Refund) GetCreatedAt ¶ added in v0.1.5

func (r *Refund) GetCreatedAt() time.Time

func (*Refund) GetCurrency ¶ added in v0.1.5

func (r *Refund) GetCurrency() string

func (*Refund) GetCustomerID ¶ added in v0.1.5

func (r *Refund) GetCustomerID() string

func (*Refund) GetDispute ¶ added in v0.13.0

func (r *Refund) GetDispute() *RefundDispute

func (*Refund) GetID ¶ added in v0.1.5

func (r *Refund) GetID() string

func (*Refund) GetMetadata ¶ added in v0.1.5

func (r *Refund) GetMetadata() map[string]MetadataOutputType

func (*Refund) GetModifiedAt ¶ added in v0.1.5

func (r *Refund) GetModifiedAt() *time.Time

func (*Refund) GetOrderID ¶ added in v0.1.5

func (r *Refund) GetOrderID() string

func (*Refund) GetOrganizationID ¶ added in v0.1.5

func (r *Refund) GetOrganizationID() string

func (*Refund) GetReason ¶ added in v0.1.5

func (r *Refund) GetReason() RefundReason

func (*Refund) GetRevokeBenefits ¶ added in v0.1.5

func (r *Refund) GetRevokeBenefits() bool

func (*Refund) GetStatus ¶ added in v0.1.5

func (r *Refund) GetStatus() RefundStatus

func (*Refund) GetSubscriptionID ¶ added in v0.1.5

func (r *Refund) GetSubscriptionID() *string

func (*Refund) GetTaxAmount ¶ added in v0.1.5

func (r *Refund) GetTaxAmount() int64

func (Refund) MarshalJSON ¶ added in v0.1.5

func (r Refund) MarshalJSON() ([]byte, error)

func (*Refund) UnmarshalJSON ¶ added in v0.1.5

func (r *Refund) UnmarshalJSON(data []byte) error

type RefundCreate ¶ added in v0.1.5

type RefundCreate struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]RefundCreateMetadata `json:"metadata,omitempty"`
	OrderID  string                          `json:"order_id"`
	Reason   RefundReason                    `json:"reason"`
	// Amount to refund in cents. Minimum is 1.
	Amount int64 `json:"amount"`
	// An internal comment about the refund.
	Comment *string `json:"comment,omitempty"`
	// Should this refund trigger the associated customer benefits to be revoked?
	//
	// **Note:**
	// Only allowed in case the `order` is a one-time purchase.
	// Subscriptions automatically revoke customer benefits once the
	// subscription itself is revoked, i.e fully canceled.
	RevokeBenefits *bool `default:"false" json:"revoke_benefits"`
}

func (*RefundCreate) GetAmount ¶ added in v0.1.5

func (r *RefundCreate) GetAmount() int64

func (*RefundCreate) GetComment ¶ added in v0.1.5

func (r *RefundCreate) GetComment() *string

func (*RefundCreate) GetMetadata ¶ added in v0.1.5

func (r *RefundCreate) GetMetadata() map[string]RefundCreateMetadata

func (*RefundCreate) GetOrderID ¶ added in v0.1.5

func (r *RefundCreate) GetOrderID() string

func (*RefundCreate) GetReason ¶ added in v0.1.5

func (r *RefundCreate) GetReason() RefundReason

func (*RefundCreate) GetRevokeBenefits ¶ added in v0.1.5

func (r *RefundCreate) GetRevokeBenefits() *bool

func (RefundCreate) MarshalJSON ¶ added in v0.1.5

func (r RefundCreate) MarshalJSON() ([]byte, error)

func (*RefundCreate) UnmarshalJSON ¶ added in v0.1.5

func (r *RefundCreate) UnmarshalJSON(data []byte) error

type RefundCreateMetadata ¶ added in v0.1.5

type RefundCreateMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type RefundCreateMetadataType
}

func CreateRefundCreateMetadataBoolean ¶ added in v0.1.5

func CreateRefundCreateMetadataBoolean(boolean bool) RefundCreateMetadata

func CreateRefundCreateMetadataInteger ¶ added in v0.1.5

func CreateRefundCreateMetadataInteger(integer int64) RefundCreateMetadata

func CreateRefundCreateMetadataNumber ¶ added in v0.4.12

func CreateRefundCreateMetadataNumber(number float64) RefundCreateMetadata

func CreateRefundCreateMetadataStr ¶ added in v0.1.5

func CreateRefundCreateMetadataStr(str string) RefundCreateMetadata

func (RefundCreateMetadata) MarshalJSON ¶ added in v0.1.5

func (u RefundCreateMetadata) MarshalJSON() ([]byte, error)

func (*RefundCreateMetadata) UnmarshalJSON ¶ added in v0.1.5

func (u *RefundCreateMetadata) UnmarshalJSON(data []byte) error

type RefundCreateMetadataType ¶ added in v0.1.5

type RefundCreateMetadataType string
const (
	RefundCreateMetadataTypeStr     RefundCreateMetadataType = "str"
	RefundCreateMetadataTypeInteger RefundCreateMetadataType = "integer"
	RefundCreateMetadataTypeNumber  RefundCreateMetadataType = "number"
	RefundCreateMetadataTypeBoolean RefundCreateMetadataType = "boolean"
)

type RefundDispute ¶ added in v0.13.0

type RefundDispute struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID     string        `json:"id"`
	Status DisputeStatus `json:"status"`
	// Whether the dispute has been resolved (won or lost).
	Resolved bool `json:"resolved"`
	// Whether the dispute is closed (prevented, won, or lost).
	Closed bool `json:"closed"`
	// Amount in cents disputed.
	Amount int64 `json:"amount"`
	// Tax amount in cents disputed.
	TaxAmount int64 `json:"tax_amount"`
	// Currency code of the dispute.
	Currency string `json:"currency"`
	// The ID of the order associated with the dispute.
	OrderID string `json:"order_id"`
	// The ID of the payment associated with the dispute.
	PaymentID string `json:"payment_id"`
}

RefundDispute - Dispute associated with a refund, in case we prevented a dispute by issuing a refund.

func (*RefundDispute) GetAmount ¶ added in v0.13.0

func (r *RefundDispute) GetAmount() int64

func (*RefundDispute) GetClosed ¶ added in v0.13.0

func (r *RefundDispute) GetClosed() bool

func (*RefundDispute) GetCreatedAt ¶ added in v0.13.0

func (r *RefundDispute) GetCreatedAt() time.Time

func (*RefundDispute) GetCurrency ¶ added in v0.13.0

func (r *RefundDispute) GetCurrency() string

func (*RefundDispute) GetID ¶ added in v0.13.0

func (r *RefundDispute) GetID() string

func (*RefundDispute) GetModifiedAt ¶ added in v0.13.0

func (r *RefundDispute) GetModifiedAt() *time.Time

func (*RefundDispute) GetOrderID ¶ added in v0.13.0

func (r *RefundDispute) GetOrderID() string

func (*RefundDispute) GetPaymentID ¶ added in v0.13.0

func (r *RefundDispute) GetPaymentID() string

func (*RefundDispute) GetResolved ¶ added in v0.13.0

func (r *RefundDispute) GetResolved() bool

func (*RefundDispute) GetStatus ¶ added in v0.13.0

func (r *RefundDispute) GetStatus() DisputeStatus

func (*RefundDispute) GetTaxAmount ¶ added in v0.13.0

func (r *RefundDispute) GetTaxAmount() int64

func (RefundDispute) MarshalJSON ¶ added in v0.13.0

func (r RefundDispute) MarshalJSON() ([]byte, error)

func (*RefundDispute) UnmarshalJSON ¶ added in v0.13.0

func (r *RefundDispute) UnmarshalJSON(data []byte) error

type RefundReason ¶ added in v0.1.5

type RefundReason string
const (
	RefundReasonDuplicate             RefundReason = "duplicate"
	RefundReasonFraudulent            RefundReason = "fraudulent"
	RefundReasonCustomerRequest       RefundReason = "customer_request"
	RefundReasonServiceDisruption     RefundReason = "service_disruption"
	RefundReasonSatisfactionGuarantee RefundReason = "satisfaction_guarantee"
	RefundReasonDisputePrevention     RefundReason = "dispute_prevention"
	RefundReasonOther                 RefundReason = "other"
)

func (RefundReason) ToPointer ¶ added in v0.1.5

func (e RefundReason) ToPointer() *RefundReason

func (*RefundReason) UnmarshalJSON ¶ added in v0.1.5

func (e *RefundReason) UnmarshalJSON(data []byte) error

type RefundSortProperty ¶ added in v0.1.5

type RefundSortProperty string
const (
	RefundSortPropertyCreatedAt      RefundSortProperty = "created_at"
	RefundSortPropertyMinusCreatedAt RefundSortProperty = "-created_at"
	RefundSortPropertyAmount         RefundSortProperty = "amount"
	RefundSortPropertyMinusAmount    RefundSortProperty = "-amount"
)

func (RefundSortProperty) ToPointer ¶ added in v0.1.5

func (e RefundSortProperty) ToPointer() *RefundSortProperty

func (*RefundSortProperty) UnmarshalJSON ¶ added in v0.1.5

func (e *RefundSortProperty) UnmarshalJSON(data []byte) error

type RefundStatus ¶ added in v0.1.5

type RefundStatus string
const (
	RefundStatusPending   RefundStatus = "pending"
	RefundStatusSucceeded RefundStatus = "succeeded"
	RefundStatusFailed    RefundStatus = "failed"
	RefundStatusCanceled  RefundStatus = "canceled"
)

func (RefundStatus) ToPointer ¶ added in v0.1.5

func (e RefundStatus) ToPointer() *RefundStatus

func (*RefundStatus) UnmarshalJSON ¶ added in v0.1.5

func (e *RefundStatus) UnmarshalJSON(data []byte) error

type RenewedSubscriptions ¶ added in v0.4.17

type RenewedSubscriptions struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type RenewedSubscriptionsType
}

func CreateRenewedSubscriptionsInteger ¶ added in v0.4.17

func CreateRenewedSubscriptionsInteger(integer int64) RenewedSubscriptions

func CreateRenewedSubscriptionsNumber ¶ added in v0.4.17

func CreateRenewedSubscriptionsNumber(number float64) RenewedSubscriptions

func (RenewedSubscriptions) MarshalJSON ¶ added in v0.4.17

func (u RenewedSubscriptions) MarshalJSON() ([]byte, error)

func (*RenewedSubscriptions) UnmarshalJSON ¶ added in v0.4.17

func (u *RenewedSubscriptions) UnmarshalJSON(data []byte) error

type RenewedSubscriptionsNetRevenue ¶ added in v0.8.1

type RenewedSubscriptionsNetRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type RenewedSubscriptionsNetRevenueType
}

func CreateRenewedSubscriptionsNetRevenueInteger ¶ added in v0.8.1

func CreateRenewedSubscriptionsNetRevenueInteger(integer int64) RenewedSubscriptionsNetRevenue

func CreateRenewedSubscriptionsNetRevenueNumber ¶ added in v0.8.1

func CreateRenewedSubscriptionsNetRevenueNumber(number float64) RenewedSubscriptionsNetRevenue

func (RenewedSubscriptionsNetRevenue) MarshalJSON ¶ added in v0.8.1

func (u RenewedSubscriptionsNetRevenue) MarshalJSON() ([]byte, error)

func (*RenewedSubscriptionsNetRevenue) UnmarshalJSON ¶ added in v0.8.1

func (u *RenewedSubscriptionsNetRevenue) UnmarshalJSON(data []byte) error

type RenewedSubscriptionsNetRevenueType ¶ added in v0.8.1

type RenewedSubscriptionsNetRevenueType string
const (
	RenewedSubscriptionsNetRevenueTypeInteger RenewedSubscriptionsNetRevenueType = "integer"
	RenewedSubscriptionsNetRevenueTypeNumber  RenewedSubscriptionsNetRevenueType = "number"
)

type RenewedSubscriptionsRevenue ¶ added in v0.4.17

type RenewedSubscriptionsRevenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type RenewedSubscriptionsRevenueType
}

func CreateRenewedSubscriptionsRevenueInteger ¶ added in v0.4.17

func CreateRenewedSubscriptionsRevenueInteger(integer int64) RenewedSubscriptionsRevenue

func CreateRenewedSubscriptionsRevenueNumber ¶ added in v0.4.17

func CreateRenewedSubscriptionsRevenueNumber(number float64) RenewedSubscriptionsRevenue

func (RenewedSubscriptionsRevenue) MarshalJSON ¶ added in v0.4.17

func (u RenewedSubscriptionsRevenue) MarshalJSON() ([]byte, error)

func (*RenewedSubscriptionsRevenue) UnmarshalJSON ¶ added in v0.4.17

func (u *RenewedSubscriptionsRevenue) UnmarshalJSON(data []byte) error

type RenewedSubscriptionsRevenueType ¶ added in v0.4.17

type RenewedSubscriptionsRevenueType string
const (
	RenewedSubscriptionsRevenueTypeInteger RenewedSubscriptionsRevenueType = "integer"
	RenewedSubscriptionsRevenueTypeNumber  RenewedSubscriptionsRevenueType = "number"
)

type RenewedSubscriptionsType ¶ added in v0.4.17

type RenewedSubscriptionsType string
const (
	RenewedSubscriptionsTypeInteger RenewedSubscriptionsType = "integer"
	RenewedSubscriptionsTypeNumber  RenewedSubscriptionsType = "number"
)

type Revenue ¶ added in v0.4.17

type Revenue struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type RevenueType
}

func CreateRevenueInteger ¶ added in v0.4.17

func CreateRevenueInteger(integer int64) Revenue

func CreateRevenueNumber ¶ added in v0.4.17

func CreateRevenueNumber(number float64) Revenue

func (Revenue) MarshalJSON ¶ added in v0.4.17

func (u Revenue) MarshalJSON() ([]byte, error)

func (*Revenue) UnmarshalJSON ¶ added in v0.4.17

func (u *Revenue) UnmarshalJSON(data []byte) error

type RevenueType ¶ added in v0.4.17

type RevenueType string
const (
	RevenueTypeInteger RevenueType = "integer"
	RevenueTypeNumber  RevenueType = "number"
)

type RevokeTokenRequest ¶ added in v0.3.0

type RevokeTokenRequest struct {
	Token         string         `form:"name=token"`
	TokenTypeHint *TokenTypeHint `form:"name=token_type_hint"`
	ClientID      string         `form:"name=client_id"`
	ClientSecret  string         `form:"name=client_secret"`
}

func (*RevokeTokenRequest) GetClientID ¶ added in v0.3.0

func (r *RevokeTokenRequest) GetClientID() string

func (*RevokeTokenRequest) GetClientSecret ¶ added in v0.3.0

func (r *RevokeTokenRequest) GetClientSecret() string

func (*RevokeTokenRequest) GetToken ¶ added in v0.3.0

func (r *RevokeTokenRequest) GetToken() string

func (*RevokeTokenRequest) GetTokenTypeHint ¶ added in v0.3.0

func (r *RevokeTokenRequest) GetTokenTypeHint() *TokenTypeHint

type RevokeTokenResponse ¶

type RevokeTokenResponse struct {
}

type S3DownloadURL ¶

type S3DownloadURL struct {
	URL       string            `json:"url"`
	Headers   map[string]string `json:"headers,omitempty"`
	ExpiresAt time.Time         `json:"expires_at"`
}

func (*S3DownloadURL) GetExpiresAt ¶

func (s *S3DownloadURL) GetExpiresAt() time.Time

func (*S3DownloadURL) GetHeaders ¶

func (s *S3DownloadURL) GetHeaders() map[string]string

func (*S3DownloadURL) GetURL ¶

func (s *S3DownloadURL) GetURL() string

func (S3DownloadURL) MarshalJSON ¶

func (s S3DownloadURL) MarshalJSON() ([]byte, error)

func (*S3DownloadURL) UnmarshalJSON ¶

func (s *S3DownloadURL) UnmarshalJSON(data []byte) error

type S3FileCreateMultipart ¶

type S3FileCreateMultipart struct {
	Parts []S3FileCreatePart `json:"parts"`
}

func (*S3FileCreateMultipart) GetParts ¶

func (s *S3FileCreateMultipart) GetParts() []S3FileCreatePart

func (S3FileCreateMultipart) MarshalJSON ¶ added in v0.8.4

func (s S3FileCreateMultipart) MarshalJSON() ([]byte, error)

func (*S3FileCreateMultipart) UnmarshalJSON ¶ added in v0.8.4

func (s *S3FileCreateMultipart) UnmarshalJSON(data []byte) error

type S3FileCreatePart ¶

type S3FileCreatePart struct {
	Number               int64   `json:"number"`
	ChunkStart           int64   `json:"chunk_start"`
	ChunkEnd             int64   `json:"chunk_end"`
	ChecksumSha256Base64 *string `json:"checksum_sha256_base64,omitempty"`
}

func (*S3FileCreatePart) GetChecksumSha256Base64 ¶

func (s *S3FileCreatePart) GetChecksumSha256Base64() *string

func (*S3FileCreatePart) GetChunkEnd ¶

func (s *S3FileCreatePart) GetChunkEnd() int64

func (*S3FileCreatePart) GetChunkStart ¶

func (s *S3FileCreatePart) GetChunkStart() int64

func (*S3FileCreatePart) GetNumber ¶

func (s *S3FileCreatePart) GetNumber() int64

func (S3FileCreatePart) MarshalJSON ¶ added in v0.8.4

func (s S3FileCreatePart) MarshalJSON() ([]byte, error)

func (*S3FileCreatePart) UnmarshalJSON ¶ added in v0.8.4

func (s *S3FileCreatePart) UnmarshalJSON(data []byte) error

type S3FileUploadCompletedPart ¶

type S3FileUploadCompletedPart struct {
	Number               int64   `json:"number"`
	ChecksumEtag         string  `json:"checksum_etag"`
	ChecksumSha256Base64 *string `json:"checksum_sha256_base64"`
}

func (*S3FileUploadCompletedPart) GetChecksumEtag ¶

func (s *S3FileUploadCompletedPart) GetChecksumEtag() string

func (*S3FileUploadCompletedPart) GetChecksumSha256Base64 ¶

func (s *S3FileUploadCompletedPart) GetChecksumSha256Base64() *string

func (*S3FileUploadCompletedPart) GetNumber ¶

func (s *S3FileUploadCompletedPart) GetNumber() int64

type S3FileUploadMultipart ¶

type S3FileUploadMultipart struct {
	ID    string             `json:"id"`
	Path  string             `json:"path"`
	Parts []S3FileUploadPart `json:"parts"`
}

func (*S3FileUploadMultipart) GetID ¶

func (s *S3FileUploadMultipart) GetID() string

func (*S3FileUploadMultipart) GetParts ¶

func (s *S3FileUploadMultipart) GetParts() []S3FileUploadPart

func (*S3FileUploadMultipart) GetPath ¶

func (s *S3FileUploadMultipart) GetPath() string

type S3FileUploadPart ¶

type S3FileUploadPart struct {
	Number               int64             `json:"number"`
	ChunkStart           int64             `json:"chunk_start"`
	ChunkEnd             int64             `json:"chunk_end"`
	ChecksumSha256Base64 *string           `json:"checksum_sha256_base64,omitempty"`
	URL                  string            `json:"url"`
	ExpiresAt            time.Time         `json:"expires_at"`
	Headers              map[string]string `json:"headers,omitempty"`
}

func (*S3FileUploadPart) GetChecksumSha256Base64 ¶

func (s *S3FileUploadPart) GetChecksumSha256Base64() *string

func (*S3FileUploadPart) GetChunkEnd ¶

func (s *S3FileUploadPart) GetChunkEnd() int64

func (*S3FileUploadPart) GetChunkStart ¶

func (s *S3FileUploadPart) GetChunkStart() int64

func (*S3FileUploadPart) GetExpiresAt ¶

func (s *S3FileUploadPart) GetExpiresAt() time.Time

func (*S3FileUploadPart) GetHeaders ¶

func (s *S3FileUploadPart) GetHeaders() map[string]string

func (*S3FileUploadPart) GetNumber ¶

func (s *S3FileUploadPart) GetNumber() int64

func (*S3FileUploadPart) GetURL ¶

func (s *S3FileUploadPart) GetURL() string

func (S3FileUploadPart) MarshalJSON ¶

func (s S3FileUploadPart) MarshalJSON() ([]byte, error)

func (*S3FileUploadPart) UnmarshalJSON ¶

func (s *S3FileUploadPart) UnmarshalJSON(data []byte) error

type Scope ¶

type Scope string
const (
	ScopeOpenid                        Scope = "openid"
	ScopeProfile                       Scope = "profile"
	ScopeEmail                         Scope = "email"
	ScopeUserRead                      Scope = "user:read"
	ScopeUserWrite                     Scope = "user:write"
	ScopeWebRead                       Scope = "web:read"
	ScopeWebWrite                      Scope = "web:write"
	ScopeOrganizationsRead             Scope = "organizations:read"
	ScopeOrganizationsWrite            Scope = "organizations:write"
	ScopeCustomFieldsRead              Scope = "custom_fields:read"
	ScopeCustomFieldsWrite             Scope = "custom_fields:write"
	ScopeDiscountsRead                 Scope = "discounts:read"
	ScopeDiscountsWrite                Scope = "discounts:write"
	ScopeCheckoutLinksRead             Scope = "checkout_links:read"
	ScopeCheckoutLinksWrite            Scope = "checkout_links:write"
	ScopeCheckoutsRead                 Scope = "checkouts:read"
	ScopeCheckoutsWrite                Scope = "checkouts:write"
	ScopeTransactionsRead              Scope = "transactions:read"
	ScopeTransactionsWrite             Scope = "transactions:write"
	ScopePayoutsRead                   Scope = "payouts:read"
	ScopePayoutsWrite                  Scope = "payouts:write"
	ScopeProductsRead                  Scope = "products:read"
	ScopeProductsWrite                 Scope = "products:write"
	ScopeBenefitsRead                  Scope = "benefits:read"
	ScopeBenefitsWrite                 Scope = "benefits:write"
	ScopeEventsRead                    Scope = "events:read"
	ScopeEventsWrite                   Scope = "events:write"
	ScopeMetersRead                    Scope = "meters:read"
	ScopeMetersWrite                   Scope = "meters:write"
	ScopeFilesRead                     Scope = "files:read"
	ScopeFilesWrite                    Scope = "files:write"
	ScopeSubscriptionsRead             Scope = "subscriptions:read"
	ScopeSubscriptionsWrite            Scope = "subscriptions:write"
	ScopeCustomersRead                 Scope = "customers:read"
	ScopeCustomersWrite                Scope = "customers:write"
	ScopeMembersRead                   Scope = "members:read"
	ScopeMembersWrite                  Scope = "members:write"
	ScopeWalletsRead                   Scope = "wallets:read"
	ScopeWalletsWrite                  Scope = "wallets:write"
	ScopeDisputesRead                  Scope = "disputes:read"
	ScopeCustomerMetersRead            Scope = "customer_meters:read"
	ScopeCustomerSessionsWrite         Scope = "customer_sessions:write"
	ScopeMemberSessionsWrite           Scope = "member_sessions:write"
	ScopeCustomerSeatsRead             Scope = "customer_seats:read"
	ScopeCustomerSeatsWrite            Scope = "customer_seats:write"
	ScopeOrdersRead                    Scope = "orders:read"
	ScopeOrdersWrite                   Scope = "orders:write"
	ScopeRefundsRead                   Scope = "refunds:read"
	ScopeRefundsWrite                  Scope = "refunds:write"
	ScopePaymentsRead                  Scope = "payments:read"
	ScopeMetricsRead                   Scope = "metrics:read"
	ScopeMetricsWrite                  Scope = "metrics:write"
	ScopeWebhooksRead                  Scope = "webhooks:read"
	ScopeWebhooksWrite                 Scope = "webhooks:write"
	ScopeLicenseKeysRead               Scope = "license_keys:read"
	ScopeLicenseKeysWrite              Scope = "license_keys:write"
	ScopeCustomerPortalRead            Scope = "customer_portal:read"
	ScopeCustomerPortalWrite           Scope = "customer_portal:write"
	ScopeNotificationsRead             Scope = "notifications:read"
	ScopeNotificationsWrite            Scope = "notifications:write"
	ScopeNotificationRecipientsRead    Scope = "notification_recipients:read"
	ScopeNotificationRecipientsWrite   Scope = "notification_recipients:write"
	ScopeOrganizationAccessTokensRead  Scope = "organization_access_tokens:read"
	ScopeOrganizationAccessTokensWrite Scope = "organization_access_tokens:write"
)

func (Scope) ToPointer ¶

func (e Scope) ToPointer() *Scope

func (*Scope) UnmarshalJSON ¶

func (e *Scope) UnmarshalJSON(data []byte) error

type SeatAssign ¶ added in v0.10.1

type SeatAssign struct {
	// Subscription ID. Required if checkout_id and order_id are not provided.
	SubscriptionID *string `json:"subscription_id,omitempty"`
	// Checkout ID. Used to look up subscription or order from the checkout page.
	CheckoutID *string `json:"checkout_id,omitempty"`
	// Order ID for one-time purchases. Required if subscription_id and checkout_id are not provided.
	OrderID *string `json:"order_id,omitempty"`
	// Email of the customer to assign the seat to
	Email *string `json:"email,omitempty"`
	// External customer ID for the seat assignment
	ExternalCustomerID *string `json:"external_customer_id,omitempty"`
	// Customer ID for the seat assignment
	CustomerID *string `json:"customer_id,omitempty"`
	// External member ID for the seat assignment. Can be used alone (lookup existing member) or with email (create/validate member).
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Member ID for the seat assignment.
	MemberID *string `json:"member_id,omitempty"`
	// Additional metadata for the seat (max 10 keys, 1KB total)
	Metadata map[string]any `json:"metadata,omitempty"`
	// If true, the seat will be immediately claimed without sending an invitation email. API-only feature.
	ImmediateClaim *bool `default:"false" json:"immediate_claim"`
}

func (*SeatAssign) GetCheckoutID ¶ added in v0.10.1

func (s *SeatAssign) GetCheckoutID() *string

func (*SeatAssign) GetCustomerID ¶ added in v0.10.1

func (s *SeatAssign) GetCustomerID() *string

func (*SeatAssign) GetEmail ¶ added in v0.10.1

func (s *SeatAssign) GetEmail() *string

func (*SeatAssign) GetExternalCustomerID ¶ added in v0.10.1

func (s *SeatAssign) GetExternalCustomerID() *string

func (*SeatAssign) GetExternalMemberID ¶ added in v0.13.0

func (s *SeatAssign) GetExternalMemberID() *string

func (*SeatAssign) GetImmediateClaim ¶ added in v0.12.0

func (s *SeatAssign) GetImmediateClaim() *bool

func (*SeatAssign) GetMemberID ¶ added in v0.13.0

func (s *SeatAssign) GetMemberID() *string

func (*SeatAssign) GetMetadata ¶ added in v0.10.1

func (s *SeatAssign) GetMetadata() map[string]any

func (*SeatAssign) GetOrderID ¶ added in v0.12.0

func (s *SeatAssign) GetOrderID() *string

func (*SeatAssign) GetSubscriptionID ¶ added in v0.10.1

func (s *SeatAssign) GetSubscriptionID() *string

func (SeatAssign) MarshalJSON ¶ added in v0.12.0

func (s SeatAssign) MarshalJSON() ([]byte, error)

func (*SeatAssign) UnmarshalJSON ¶ added in v0.12.0

func (s *SeatAssign) UnmarshalJSON(data []byte) error

type SeatClaim ¶ added in v0.12.0

type SeatClaim struct {
	// Invitation token to claim the seat
	InvitationToken string `json:"invitation_token"`
}

func (*SeatClaim) GetInvitationToken ¶ added in v0.12.0

func (s *SeatClaim) GetInvitationToken() string

type SeatClaimInfo ¶ added in v0.12.0

type SeatClaimInfo struct {
	// Name of the product
	ProductName string `json:"product_name"`
	// ID of the product
	ProductID string `json:"product_id"`
	// Name of the organization
	OrganizationName string `json:"organization_name"`
	// Slug of the organization
	OrganizationSlug string `json:"organization_slug"`
	// Email of the customer assigned to this seat
	CustomerEmail string `json:"customer_email"`
	// Whether the seat can be claimed
	CanClaim bool `json:"can_claim"`
}

SeatClaimInfo - Read-only information about a seat claim invitation. Safe for email scanners - no side effects when fetched.

func (*SeatClaimInfo) GetCanClaim ¶ added in v0.12.0

func (s *SeatClaimInfo) GetCanClaim() bool

func (*SeatClaimInfo) GetCustomerEmail ¶ added in v0.12.0

func (s *SeatClaimInfo) GetCustomerEmail() string

func (*SeatClaimInfo) GetOrganizationName ¶ added in v0.12.0

func (s *SeatClaimInfo) GetOrganizationName() string

func (*SeatClaimInfo) GetOrganizationSlug ¶ added in v0.12.0

func (s *SeatClaimInfo) GetOrganizationSlug() string

func (*SeatClaimInfo) GetProductID ¶ added in v0.12.0

func (s *SeatClaimInfo) GetProductID() string

func (*SeatClaimInfo) GetProductName ¶ added in v0.12.0

func (s *SeatClaimInfo) GetProductName() string

type SeatStatus ¶ added in v0.10.1

type SeatStatus string
const (
	SeatStatusPending SeatStatus = "pending"
	SeatStatusClaimed SeatStatus = "claimed"
	SeatStatusRevoked SeatStatus = "revoked"
)

func (SeatStatus) ToPointer ¶ added in v0.10.1

func (e SeatStatus) ToPointer() *SeatStatus

func (*SeatStatus) UnmarshalJSON ¶ added in v0.10.1

func (e *SeatStatus) UnmarshalJSON(data []byte) error

type SeatTierType ¶ added in v0.15.1

type SeatTierType string
const (
	SeatTierTypeVolume    SeatTierType = "volume"
	SeatTierTypeGraduated SeatTierType = "graduated"
)

func (SeatTierType) ToPointer ¶ added in v0.15.1

func (e SeatTierType) ToPointer() *SeatTierType

func (*SeatTierType) UnmarshalJSON ¶ added in v0.15.1

func (e *SeatTierType) UnmarshalJSON(data []byte) error

type SeatsList ¶ added in v0.10.1

type SeatsList struct {
	// List of seats
	Seats []CustomerSeat `json:"seats"`
	// Number of available seats
	AvailableSeats int64 `json:"available_seats"`
	// Total number of seats for the subscription
	TotalSeats int64 `json:"total_seats"`
}

func (*SeatsList) GetAvailableSeats ¶ added in v0.10.1

func (s *SeatsList) GetAvailableSeats() int64

func (*SeatsList) GetSeats ¶ added in v0.10.1

func (s *SeatsList) GetSeats() []CustomerSeat

func (*SeatsList) GetTotalSeats ¶ added in v0.10.1

func (s *SeatsList) GetTotalSeats() int64

type Security ¶

type Security struct {
	AccessToken *string `security:"scheme,type=http,subtype=bearer,name=Authorization,env=polar_access_token"`
}

func (*Security) GetAccessToken ¶

func (s *Security) GetAccessToken() *string

type Status ¶ added in v0.8.3

type Status string
const (
	StatusActive   Status = "active"
	StatusTrialing Status = "trialing"
)

func (Status) ToPointer ¶ added in v0.8.3

func (e Status) ToPointer() *Status

func (*Status) UnmarshalJSON ¶ added in v0.8.3

func (e *Status) UnmarshalJSON(data []byte) error

type SubType ¶

type SubType string
const (
	SubTypeUser         SubType = "user"
	SubTypeOrganization SubType = "organization"
)

func (SubType) ToPointer ¶

func (e SubType) ToPointer() *SubType

func (*SubType) UnmarshalJSON ¶

func (e *SubType) UnmarshalJSON(data []byte) error

type Subscription ¶

type Subscription struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The amount of the subscription.
	Amount int64 `json:"amount"`
	// The currency of the subscription.
	Currency          string                        `json:"currency"`
	RecurringInterval SubscriptionRecurringInterval `json:"recurring_interval"`
	// Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.
	RecurringIntervalCount int64              `json:"recurring_interval_count"`
	Status                 SubscriptionStatus `json:"status"`
	// The start timestamp of the current billing period.
	CurrentPeriodStart time.Time `json:"current_period_start"`
	// The end timestamp of the current billing period.
	CurrentPeriodEnd time.Time `json:"current_period_end"`
	// The start timestamp of the trial period, if any.
	TrialStart *time.Time `json:"trial_start"`
	// The end timestamp of the trial period, if any.
	TrialEnd *time.Time `json:"trial_end"`
	// Whether the subscription will be canceled at the end of the current period.
	CancelAtPeriodEnd bool `json:"cancel_at_period_end"`
	// The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.
	CanceledAt *time.Time `json:"canceled_at"`
	// The timestamp when the subscription started.
	StartedAt *time.Time `json:"started_at"`
	// The timestamp when the subscription will end.
	EndsAt *time.Time `json:"ends_at"`
	// The timestamp when the subscription ended.
	EndedAt *time.Time `json:"ended_at"`
	// The ID of the subscribed customer.
	CustomerID string `json:"customer_id"`
	// The ID of the subscribed product.
	ProductID string `json:"product_id"`
	// The ID of the applied discount, if any.
	DiscountID *string `json:"discount_id"`
	CheckoutID *string `json:"checkout_id"`
	// The number of seats for seat-based subscriptions. None for non-seat subscriptions.
	Seats                       *int64                        `json:"seats,omitempty"`
	CustomerCancellationReason  *CustomerCancellationReason   `json:"customer_cancellation_reason"`
	CustomerCancellationComment *string                       `json:"customer_cancellation_comment"`
	Metadata                    map[string]MetadataOutputType `json:"metadata"`
	// Key-value object storing custom field values.
	CustomFieldData map[string]*CustomFieldData `json:"custom_field_data,omitempty"`
	Customer        SubscriptionCustomer        `json:"customer"`
	// A product.
	Product  Product               `json:"product"`
	Discount *SubscriptionDiscount `json:"discount"`
	// List of enabled prices for the subscription.
	Prices []SubscriptionPrices `json:"prices"`
	// List of meters associated with the subscription.
	Meters []SubscriptionMeter `json:"meters"`
	// Pending subscription update that will be applied at the beginning of the next period. If `null`, there is no pending update.
	PendingUpdate *PendingSubscriptionUpdate `json:"pending_update"`
}

func (*Subscription) GetAmount ¶

func (s *Subscription) GetAmount() int64

func (*Subscription) GetCancelAtPeriodEnd ¶

func (s *Subscription) GetCancelAtPeriodEnd() bool

func (*Subscription) GetCanceledAt ¶ added in v0.1.1

func (s *Subscription) GetCanceledAt() *time.Time

func (*Subscription) GetCheckoutID ¶

func (s *Subscription) GetCheckoutID() *string

func (*Subscription) GetCreatedAt ¶

func (s *Subscription) GetCreatedAt() time.Time

func (*Subscription) GetCurrency ¶

func (s *Subscription) GetCurrency() string

func (*Subscription) GetCurrentPeriodEnd ¶

func (s *Subscription) GetCurrentPeriodEnd() time.Time

func (*Subscription) GetCurrentPeriodStart ¶

func (s *Subscription) GetCurrentPeriodStart() time.Time

func (*Subscription) GetCustomFieldData ¶

func (s *Subscription) GetCustomFieldData() map[string]*CustomFieldData

func (*Subscription) GetCustomer ¶

func (s *Subscription) GetCustomer() SubscriptionCustomer

func (*Subscription) GetCustomerCancellationComment ¶ added in v0.1.1

func (s *Subscription) GetCustomerCancellationComment() *string

func (*Subscription) GetCustomerCancellationReason ¶ added in v0.1.1

func (s *Subscription) GetCustomerCancellationReason() *CustomerCancellationReason

func (*Subscription) GetCustomerID ¶

func (s *Subscription) GetCustomerID() string

func (*Subscription) GetDiscount ¶

func (s *Subscription) GetDiscount() *SubscriptionDiscount

func (*Subscription) GetDiscountID ¶

func (s *Subscription) GetDiscountID() *string

func (*Subscription) GetEndedAt ¶

func (s *Subscription) GetEndedAt() *time.Time

func (*Subscription) GetEndsAt ¶ added in v0.1.1

func (s *Subscription) GetEndsAt() *time.Time

func (*Subscription) GetID ¶

func (s *Subscription) GetID() string

func (*Subscription) GetMetadata ¶

func (s *Subscription) GetMetadata() map[string]MetadataOutputType

func (*Subscription) GetMeters ¶ added in v0.4.11

func (s *Subscription) GetMeters() []SubscriptionMeter

func (*Subscription) GetModifiedAt ¶

func (s *Subscription) GetModifiedAt() *time.Time

func (*Subscription) GetPendingUpdate ¶ added in v0.15.1

func (s *Subscription) GetPendingUpdate() *PendingSubscriptionUpdate

func (*Subscription) GetPrices ¶ added in v0.4.6

func (s *Subscription) GetPrices() []SubscriptionPrices

func (*Subscription) GetProduct ¶

func (s *Subscription) GetProduct() Product

func (*Subscription) GetProductID ¶

func (s *Subscription) GetProductID() string

func (*Subscription) GetRecurringInterval ¶

func (s *Subscription) GetRecurringInterval() SubscriptionRecurringInterval

func (*Subscription) GetRecurringIntervalCount ¶ added in v0.12.0

func (s *Subscription) GetRecurringIntervalCount() int64

func (*Subscription) GetSeats ¶ added in v0.12.0

func (s *Subscription) GetSeats() *int64

func (*Subscription) GetStartedAt ¶

func (s *Subscription) GetStartedAt() *time.Time

func (*Subscription) GetStatus ¶

func (s *Subscription) GetStatus() SubscriptionStatus

func (*Subscription) GetTrialEnd ¶ added in v0.9.1

func (s *Subscription) GetTrialEnd() *time.Time

func (*Subscription) GetTrialStart ¶ added in v0.9.1

func (s *Subscription) GetTrialStart() *time.Time

func (Subscription) MarshalJSON ¶

func (s Subscription) MarshalJSON() ([]byte, error)

func (*Subscription) UnmarshalJSON ¶

func (s *Subscription) UnmarshalJSON(data []byte) error

type SubscriptionBillingPeriodUpdatedEvent ¶ added in v0.13.0

type SubscriptionBillingPeriodUpdatedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata SubscriptionBillingPeriodUpdatedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

SubscriptionBillingPeriodUpdatedEvent - An event created by Polar when a subscription billing period is updated.

func (*SubscriptionBillingPeriodUpdatedEvent) GetChildCount ¶ added in v0.13.0

func (s *SubscriptionBillingPeriodUpdatedEvent) GetChildCount() *int64

func (*SubscriptionBillingPeriodUpdatedEvent) GetCustomer ¶ added in v0.13.0

func (*SubscriptionBillingPeriodUpdatedEvent) GetCustomerID ¶ added in v0.13.0

func (s *SubscriptionBillingPeriodUpdatedEvent) GetCustomerID() *string

func (*SubscriptionBillingPeriodUpdatedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (s *SubscriptionBillingPeriodUpdatedEvent) GetCustomerIndividual() *CustomerIndividual

func (*SubscriptionBillingPeriodUpdatedEvent) GetCustomerTeam ¶ added in v0.16.0

func (*SubscriptionBillingPeriodUpdatedEvent) GetExternalCustomerID ¶ added in v0.13.0

func (s *SubscriptionBillingPeriodUpdatedEvent) GetExternalCustomerID() *string

func (*SubscriptionBillingPeriodUpdatedEvent) GetExternalMemberID ¶ added in v0.13.0

func (s *SubscriptionBillingPeriodUpdatedEvent) GetExternalMemberID() *string

func (*SubscriptionBillingPeriodUpdatedEvent) GetID ¶ added in v0.13.0

func (*SubscriptionBillingPeriodUpdatedEvent) GetLabel ¶ added in v0.13.0

func (*SubscriptionBillingPeriodUpdatedEvent) GetMemberID ¶ added in v0.13.0

func (*SubscriptionBillingPeriodUpdatedEvent) GetMetadata ¶ added in v0.13.0

func (*SubscriptionBillingPeriodUpdatedEvent) GetName ¶ added in v0.13.0

func (*SubscriptionBillingPeriodUpdatedEvent) GetOrganizationID ¶ added in v0.13.0

func (s *SubscriptionBillingPeriodUpdatedEvent) GetOrganizationID() string

func (*SubscriptionBillingPeriodUpdatedEvent) GetParentID ¶ added in v0.13.0

func (*SubscriptionBillingPeriodUpdatedEvent) GetSource ¶ added in v0.13.0

func (*SubscriptionBillingPeriodUpdatedEvent) GetTimestamp ¶ added in v0.13.0

func (SubscriptionBillingPeriodUpdatedEvent) MarshalJSON ¶ added in v0.13.0

func (s SubscriptionBillingPeriodUpdatedEvent) MarshalJSON() ([]byte, error)

func (*SubscriptionBillingPeriodUpdatedEvent) UnmarshalJSON ¶ added in v0.13.0

func (s *SubscriptionBillingPeriodUpdatedEvent) UnmarshalJSON(data []byte) error

type SubscriptionBillingPeriodUpdatedMetadata ¶ added in v0.13.0

type SubscriptionBillingPeriodUpdatedMetadata struct {
	SubscriptionID string `json:"subscription_id"`
	OldPeriodEnd   string `json:"old_period_end"`
	NewPeriodEnd   string `json:"new_period_end"`
}

func (*SubscriptionBillingPeriodUpdatedMetadata) GetNewPeriodEnd ¶ added in v0.13.0

func (s *SubscriptionBillingPeriodUpdatedMetadata) GetNewPeriodEnd() string

func (*SubscriptionBillingPeriodUpdatedMetadata) GetOldPeriodEnd ¶ added in v0.13.0

func (s *SubscriptionBillingPeriodUpdatedMetadata) GetOldPeriodEnd() string

func (*SubscriptionBillingPeriodUpdatedMetadata) GetSubscriptionID ¶ added in v0.13.0

func (s *SubscriptionBillingPeriodUpdatedMetadata) GetSubscriptionID() string

func (SubscriptionBillingPeriodUpdatedMetadata) MarshalJSON ¶ added in v0.13.0

func (*SubscriptionBillingPeriodUpdatedMetadata) UnmarshalJSON ¶ added in v0.13.0

func (s *SubscriptionBillingPeriodUpdatedMetadata) UnmarshalJSON(data []byte) error

type SubscriptionCancel ¶ added in v0.1.1

type SubscriptionCancel struct {
	// Customer reason for cancellation.
	//
	// Helpful to monitor reasons behind churn for future improvements.
	//
	// Only set this in case your own service is requesting the reason from the
	// customer. Or you know based on direct conversations, i.e support, with
	// the customer.
	//
	// * `too_expensive`: Too expensive for the customer.
	// * `missing_features`: Customer is missing certain features.
	// * `switched_service`: Customer switched to another service.
	// * `unused`: Customer is not using it enough.
	// * `customer_service`: Customer is not satisfied with the customer service.
	// * `low_quality`: Customer is unhappy with the quality.
	// * `too_complex`: Customer considers the service too complicated.
	// * `other`: Other reason(s).
	CustomerCancellationReason *CustomerCancellationReason `json:"customer_cancellation_reason,omitempty"`
	// Customer feedback and why they decided to cancel.
	//
	// **IMPORTANT:**
	// Do not use this to store internal notes! It's intended to be input
	// from the customer and is therefore also available in their Polar
	// purchases library.
	//
	// Only set this in case your own service is requesting the reason from the
	// customer. Or you copy a message directly from a customer
	// conversation, i.e support.
	CustomerCancellationComment *string `json:"customer_cancellation_comment,omitempty"`
	// Cancel an active subscription once the current period ends.
	//
	// Or uncancel a subscription currently set to be revoked at period end.
	CancelAtPeriodEnd bool `json:"cancel_at_period_end"`
}

func (*SubscriptionCancel) GetCancelAtPeriodEnd ¶ added in v0.1.1

func (s *SubscriptionCancel) GetCancelAtPeriodEnd() bool

func (*SubscriptionCancel) GetCustomerCancellationComment ¶ added in v0.1.1

func (s *SubscriptionCancel) GetCustomerCancellationComment() *string

func (*SubscriptionCancel) GetCustomerCancellationReason ¶ added in v0.1.1

func (s *SubscriptionCancel) GetCustomerCancellationReason() *CustomerCancellationReason

func (SubscriptionCancel) MarshalJSON ¶ added in v0.1.1

func (s SubscriptionCancel) MarshalJSON() ([]byte, error)

func (*SubscriptionCancel) UnmarshalJSON ¶ added in v0.1.1

func (s *SubscriptionCancel) UnmarshalJSON(data []byte) error

type SubscriptionCanceledEvent ¶ added in v0.13.0

type SubscriptionCanceledEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata SubscriptionCanceledMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

SubscriptionCanceledEvent - An event created by Polar when a subscription is canceled.

func (*SubscriptionCanceledEvent) GetChildCount ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetChildCount() *int64

func (*SubscriptionCanceledEvent) GetCustomer ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetCustomer() *Customer

func (*SubscriptionCanceledEvent) GetCustomerID ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetCustomerID() *string

func (*SubscriptionCanceledEvent) GetCustomerIndividual ¶ added in v0.16.0

func (s *SubscriptionCanceledEvent) GetCustomerIndividual() *CustomerIndividual

func (*SubscriptionCanceledEvent) GetCustomerTeam ¶ added in v0.16.0

func (s *SubscriptionCanceledEvent) GetCustomerTeam() *CustomerTeam

func (*SubscriptionCanceledEvent) GetExternalCustomerID ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetExternalCustomerID() *string

func (*SubscriptionCanceledEvent) GetExternalMemberID ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetExternalMemberID() *string

func (*SubscriptionCanceledEvent) GetID ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetID() string

func (*SubscriptionCanceledEvent) GetLabel ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetLabel() string

func (*SubscriptionCanceledEvent) GetMemberID ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetMemberID() *string

func (*SubscriptionCanceledEvent) GetMetadata ¶ added in v0.13.0

func (*SubscriptionCanceledEvent) GetName ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetName() string

func (*SubscriptionCanceledEvent) GetOrganizationID ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetOrganizationID() string

func (*SubscriptionCanceledEvent) GetParentID ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetParentID() *string

func (*SubscriptionCanceledEvent) GetSource ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetSource() string

func (*SubscriptionCanceledEvent) GetTimestamp ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) GetTimestamp() time.Time

func (SubscriptionCanceledEvent) MarshalJSON ¶ added in v0.13.0

func (s SubscriptionCanceledEvent) MarshalJSON() ([]byte, error)

func (*SubscriptionCanceledEvent) UnmarshalJSON ¶ added in v0.13.0

func (s *SubscriptionCanceledEvent) UnmarshalJSON(data []byte) error

type SubscriptionCanceledMetadata ¶ added in v0.13.0

type SubscriptionCanceledMetadata struct {
	SubscriptionID              string  `json:"subscription_id"`
	ProductID                   *string `json:"product_id,omitempty"`
	Amount                      int64   `json:"amount"`
	Currency                    string  `json:"currency"`
	RecurringInterval           string  `json:"recurring_interval"`
	RecurringIntervalCount      int64   `json:"recurring_interval_count"`
	CustomerCancellationReason  *string `json:"customer_cancellation_reason,omitempty"`
	CustomerCancellationComment *string `json:"customer_cancellation_comment,omitempty"`
	CanceledAt                  string  `json:"canceled_at"`
	EndsAt                      *string `json:"ends_at,omitempty"`
	CancelAtPeriodEnd           *bool   `json:"cancel_at_period_end,omitempty"`
}

func (*SubscriptionCanceledMetadata) GetAmount ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) GetAmount() int64

func (*SubscriptionCanceledMetadata) GetCancelAtPeriodEnd ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) GetCancelAtPeriodEnd() *bool

func (*SubscriptionCanceledMetadata) GetCanceledAt ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) GetCanceledAt() string

func (*SubscriptionCanceledMetadata) GetCurrency ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) GetCurrency() string

func (*SubscriptionCanceledMetadata) GetCustomerCancellationComment ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) GetCustomerCancellationComment() *string

func (*SubscriptionCanceledMetadata) GetCustomerCancellationReason ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) GetCustomerCancellationReason() *string

func (*SubscriptionCanceledMetadata) GetEndsAt ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) GetEndsAt() *string

func (*SubscriptionCanceledMetadata) GetProductID ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) GetProductID() *string

func (*SubscriptionCanceledMetadata) GetRecurringInterval ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) GetRecurringInterval() string

func (*SubscriptionCanceledMetadata) GetRecurringIntervalCount ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) GetRecurringIntervalCount() int64

func (*SubscriptionCanceledMetadata) GetSubscriptionID ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) GetSubscriptionID() string

func (SubscriptionCanceledMetadata) MarshalJSON ¶ added in v0.13.0

func (s SubscriptionCanceledMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionCanceledMetadata) UnmarshalJSON ¶ added in v0.13.0

func (s *SubscriptionCanceledMetadata) UnmarshalJSON(data []byte) error

type SubscriptionCreateCustomer ¶ added in v0.12.0

type SubscriptionCreateCustomer struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]Metadata `json:"metadata,omitempty"`
	// The ID of the recurring product to subscribe to. Must be a free product, otherwise the customer should go through a checkout flow.
	ProductID string `json:"product_id"`
	// The ID of the customer to create the subscription for.
	CustomerID string `json:"customer_id"`
}

SubscriptionCreateCustomer - Create a subscription for an existing customer.

func (*SubscriptionCreateCustomer) GetCustomerID ¶ added in v0.12.0

func (s *SubscriptionCreateCustomer) GetCustomerID() string

func (*SubscriptionCreateCustomer) GetMetadata ¶ added in v0.12.0

func (s *SubscriptionCreateCustomer) GetMetadata() map[string]Metadata

func (*SubscriptionCreateCustomer) GetProductID ¶ added in v0.12.0

func (s *SubscriptionCreateCustomer) GetProductID() string

func (SubscriptionCreateCustomer) MarshalJSON ¶ added in v0.12.0

func (s SubscriptionCreateCustomer) MarshalJSON() ([]byte, error)

func (*SubscriptionCreateCustomer) UnmarshalJSON ¶ added in v0.12.0

func (s *SubscriptionCreateCustomer) UnmarshalJSON(data []byte) error

type SubscriptionCreateExternalCustomer ¶ added in v0.12.0

type SubscriptionCreateExternalCustomer struct {
	// Key-value object allowing you to store additional information.
	//
	// The key must be a string with a maximum length of **40 characters**.
	// The value must be either:
	//
	// * A string with a maximum length of **500 characters**
	// * An integer
	// * A floating-point number
	// * A boolean
	//
	// You can store up to **50 key-value pairs**.
	Metadata map[string]SubscriptionCreateExternalCustomerMetadata `json:"metadata,omitempty"`
	// The ID of the recurring product to subscribe to. Must be a free product, otherwise the customer should go through a checkout flow.
	ProductID string `json:"product_id"`
	// The ID of the customer in your system to create the subscription for. It must already exist in Polar.
	ExternalCustomerID string `json:"external_customer_id"`
}

SubscriptionCreateExternalCustomer - Create a subscription for an existing customer identified by an external ID.

func (*SubscriptionCreateExternalCustomer) GetExternalCustomerID ¶ added in v0.12.0

func (s *SubscriptionCreateExternalCustomer) GetExternalCustomerID() string

func (*SubscriptionCreateExternalCustomer) GetMetadata ¶ added in v0.12.0

func (*SubscriptionCreateExternalCustomer) GetProductID ¶ added in v0.12.0

func (s *SubscriptionCreateExternalCustomer) GetProductID() string

func (SubscriptionCreateExternalCustomer) MarshalJSON ¶ added in v0.12.0

func (s SubscriptionCreateExternalCustomer) MarshalJSON() ([]byte, error)

func (*SubscriptionCreateExternalCustomer) UnmarshalJSON ¶ added in v0.12.0

func (s *SubscriptionCreateExternalCustomer) UnmarshalJSON(data []byte) error

type SubscriptionCreateExternalCustomerMetadata ¶ added in v0.12.0

type SubscriptionCreateExternalCustomerMetadata struct {
	Str     *string  `queryParam:"inline" union:"member"`
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`
	Boolean *bool    `queryParam:"inline" union:"member"`

	Type SubscriptionCreateExternalCustomerMetadataType
}

func CreateSubscriptionCreateExternalCustomerMetadataBoolean ¶ added in v0.12.0

func CreateSubscriptionCreateExternalCustomerMetadataBoolean(boolean bool) SubscriptionCreateExternalCustomerMetadata

func CreateSubscriptionCreateExternalCustomerMetadataInteger ¶ added in v0.12.0

func CreateSubscriptionCreateExternalCustomerMetadataInteger(integer int64) SubscriptionCreateExternalCustomerMetadata

func CreateSubscriptionCreateExternalCustomerMetadataNumber ¶ added in v0.12.0

func CreateSubscriptionCreateExternalCustomerMetadataNumber(number float64) SubscriptionCreateExternalCustomerMetadata

func CreateSubscriptionCreateExternalCustomerMetadataStr ¶ added in v0.12.0

func CreateSubscriptionCreateExternalCustomerMetadataStr(str string) SubscriptionCreateExternalCustomerMetadata

func (SubscriptionCreateExternalCustomerMetadata) MarshalJSON ¶ added in v0.12.0

func (*SubscriptionCreateExternalCustomerMetadata) UnmarshalJSON ¶ added in v0.12.0

func (u *SubscriptionCreateExternalCustomerMetadata) UnmarshalJSON(data []byte) error

type SubscriptionCreateExternalCustomerMetadataType ¶ added in v0.12.0

type SubscriptionCreateExternalCustomerMetadataType string
const (
	SubscriptionCreateExternalCustomerMetadataTypeStr     SubscriptionCreateExternalCustomerMetadataType = "str"
	SubscriptionCreateExternalCustomerMetadataTypeInteger SubscriptionCreateExternalCustomerMetadataType = "integer"
	SubscriptionCreateExternalCustomerMetadataTypeNumber  SubscriptionCreateExternalCustomerMetadataType = "number"
	SubscriptionCreateExternalCustomerMetadataTypeBoolean SubscriptionCreateExternalCustomerMetadataType = "boolean"
)

type SubscriptionCreatedEvent ¶ added in v0.13.0

type SubscriptionCreatedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata SubscriptionCreatedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

SubscriptionCreatedEvent - An event created by Polar when a subscription is created.

func (*SubscriptionCreatedEvent) GetChildCount ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetChildCount() *int64

func (*SubscriptionCreatedEvent) GetCustomer ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetCustomer() *Customer

func (*SubscriptionCreatedEvent) GetCustomerID ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetCustomerID() *string

func (*SubscriptionCreatedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (s *SubscriptionCreatedEvent) GetCustomerIndividual() *CustomerIndividual

func (*SubscriptionCreatedEvent) GetCustomerTeam ¶ added in v0.16.0

func (s *SubscriptionCreatedEvent) GetCustomerTeam() *CustomerTeam

func (*SubscriptionCreatedEvent) GetExternalCustomerID ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetExternalCustomerID() *string

func (*SubscriptionCreatedEvent) GetExternalMemberID ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetExternalMemberID() *string

func (*SubscriptionCreatedEvent) GetID ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetID() string

func (*SubscriptionCreatedEvent) GetLabel ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetLabel() string

func (*SubscriptionCreatedEvent) GetMemberID ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetMemberID() *string

func (*SubscriptionCreatedEvent) GetMetadata ¶ added in v0.13.0

func (*SubscriptionCreatedEvent) GetName ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetName() string

func (*SubscriptionCreatedEvent) GetOrganizationID ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetOrganizationID() string

func (*SubscriptionCreatedEvent) GetParentID ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetParentID() *string

func (*SubscriptionCreatedEvent) GetSource ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetSource() string

func (*SubscriptionCreatedEvent) GetTimestamp ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) GetTimestamp() time.Time

func (SubscriptionCreatedEvent) MarshalJSON ¶ added in v0.13.0

func (s SubscriptionCreatedEvent) MarshalJSON() ([]byte, error)

func (*SubscriptionCreatedEvent) UnmarshalJSON ¶ added in v0.13.0

func (s *SubscriptionCreatedEvent) UnmarshalJSON(data []byte) error

type SubscriptionCreatedMetadata ¶ added in v0.13.0

type SubscriptionCreatedMetadata struct {
	SubscriptionID         string `json:"subscription_id"`
	ProductID              string `json:"product_id"`
	Amount                 int64  `json:"amount"`
	Currency               string `json:"currency"`
	RecurringInterval      string `json:"recurring_interval"`
	RecurringIntervalCount int64  `json:"recurring_interval_count"`
	StartedAt              string `json:"started_at"`
}

func (*SubscriptionCreatedMetadata) GetAmount ¶ added in v0.13.0

func (s *SubscriptionCreatedMetadata) GetAmount() int64

func (*SubscriptionCreatedMetadata) GetCurrency ¶ added in v0.13.0

func (s *SubscriptionCreatedMetadata) GetCurrency() string

func (*SubscriptionCreatedMetadata) GetProductID ¶ added in v0.13.0

func (s *SubscriptionCreatedMetadata) GetProductID() string

func (*SubscriptionCreatedMetadata) GetRecurringInterval ¶ added in v0.13.0

func (s *SubscriptionCreatedMetadata) GetRecurringInterval() string

func (*SubscriptionCreatedMetadata) GetRecurringIntervalCount ¶ added in v0.13.0

func (s *SubscriptionCreatedMetadata) GetRecurringIntervalCount() int64

func (*SubscriptionCreatedMetadata) GetStartedAt ¶ added in v0.13.0

func (s *SubscriptionCreatedMetadata) GetStartedAt() string

func (*SubscriptionCreatedMetadata) GetSubscriptionID ¶ added in v0.13.0

func (s *SubscriptionCreatedMetadata) GetSubscriptionID() string

func (SubscriptionCreatedMetadata) MarshalJSON ¶ added in v0.13.0

func (s SubscriptionCreatedMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionCreatedMetadata) UnmarshalJSON ¶ added in v0.13.0

func (s *SubscriptionCreatedMetadata) UnmarshalJSON(data []byte) error

type SubscriptionCustomer ¶

type SubscriptionCustomer struct {
	// The ID of the customer.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time                    `json:"modified_at"`
	Metadata   map[string]MetadataOutputType `json:"metadata"`
	// The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
	ExternalID *string `json:"external_id,omitempty"`
	// The email address of the customer. This must be unique within the organization.
	Email *string `json:"email,omitempty"`
	// Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.
	EmailVerified bool         `json:"email_verified"`
	Type          CustomerType `json:"type"`
	// The name of the customer.
	Name           *string  `json:"name"`
	BillingAddress *Address `json:"billing_address"`
	TaxID          []*TaxID `json:"tax_id"`
	Locale         *string  `json:"locale,omitempty"`
	// The ID of the organization owning the customer.
	OrganizationID string `json:"organization_id"`
	// Timestamp for when the customer was soft deleted.
	DeletedAt *time.Time `json:"deleted_at"`
	AvatarURL string     `json:"avatar_url"`
}

func (*SubscriptionCustomer) GetAvatarURL ¶

func (s *SubscriptionCustomer) GetAvatarURL() string

func (*SubscriptionCustomer) GetBillingAddress ¶

func (s *SubscriptionCustomer) GetBillingAddress() *Address

func (*SubscriptionCustomer) GetCreatedAt ¶

func (s *SubscriptionCustomer) GetCreatedAt() time.Time

func (*SubscriptionCustomer) GetDeletedAt ¶ added in v0.4.6

func (s *SubscriptionCustomer) GetDeletedAt() *time.Time

func (*SubscriptionCustomer) GetEmail ¶

func (s *SubscriptionCustomer) GetEmail() *string

func (*SubscriptionCustomer) GetEmailVerified ¶

func (s *SubscriptionCustomer) GetEmailVerified() bool

func (*SubscriptionCustomer) GetExternalID ¶ added in v0.4.1

func (s *SubscriptionCustomer) GetExternalID() *string

func (*SubscriptionCustomer) GetID ¶

func (s *SubscriptionCustomer) GetID() string

func (*SubscriptionCustomer) GetLocale ¶ added in v0.13.0

func (s *SubscriptionCustomer) GetLocale() *string

func (*SubscriptionCustomer) GetMetadata ¶

func (s *SubscriptionCustomer) GetMetadata() map[string]MetadataOutputType

func (*SubscriptionCustomer) GetModifiedAt ¶

func (s *SubscriptionCustomer) GetModifiedAt() *time.Time

func (*SubscriptionCustomer) GetName ¶

func (s *SubscriptionCustomer) GetName() *string

func (*SubscriptionCustomer) GetOrganizationID ¶

func (s *SubscriptionCustomer) GetOrganizationID() string

func (*SubscriptionCustomer) GetTaxID ¶

func (s *SubscriptionCustomer) GetTaxID() []*TaxID

func (*SubscriptionCustomer) GetType ¶ added in v0.13.0

func (s *SubscriptionCustomer) GetType() CustomerType

func (SubscriptionCustomer) MarshalJSON ¶

func (s SubscriptionCustomer) MarshalJSON() ([]byte, error)

func (*SubscriptionCustomer) UnmarshalJSON ¶

func (s *SubscriptionCustomer) UnmarshalJSON(data []byte) error

type SubscriptionCycledEvent ¶ added in v0.8.4

type SubscriptionCycledEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata SubscriptionCycledMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

SubscriptionCycledEvent - An event created by Polar when a subscription is cycled.

func (*SubscriptionCycledEvent) GetChildCount ¶ added in v0.12.0

func (s *SubscriptionCycledEvent) GetChildCount() *int64

func (*SubscriptionCycledEvent) GetCustomer ¶ added in v0.8.4

func (s *SubscriptionCycledEvent) GetCustomer() *Customer

func (*SubscriptionCycledEvent) GetCustomerID ¶ added in v0.8.4

func (s *SubscriptionCycledEvent) GetCustomerID() *string

func (*SubscriptionCycledEvent) GetCustomerIndividual ¶ added in v0.16.0

func (s *SubscriptionCycledEvent) GetCustomerIndividual() *CustomerIndividual

func (*SubscriptionCycledEvent) GetCustomerTeam ¶ added in v0.16.0

func (s *SubscriptionCycledEvent) GetCustomerTeam() *CustomerTeam

func (*SubscriptionCycledEvent) GetExternalCustomerID ¶ added in v0.8.4

func (s *SubscriptionCycledEvent) GetExternalCustomerID() *string

func (*SubscriptionCycledEvent) GetExternalMemberID ¶ added in v0.13.0

func (s *SubscriptionCycledEvent) GetExternalMemberID() *string

func (*SubscriptionCycledEvent) GetID ¶ added in v0.8.4

func (s *SubscriptionCycledEvent) GetID() string

func (*SubscriptionCycledEvent) GetLabel ¶ added in v0.13.0

func (s *SubscriptionCycledEvent) GetLabel() string

func (*SubscriptionCycledEvent) GetMemberID ¶ added in v0.13.0

func (s *SubscriptionCycledEvent) GetMemberID() *string

func (*SubscriptionCycledEvent) GetMetadata ¶ added in v0.8.4

func (*SubscriptionCycledEvent) GetName ¶ added in v0.8.4

func (s *SubscriptionCycledEvent) GetName() string

func (*SubscriptionCycledEvent) GetOrganizationID ¶ added in v0.8.4

func (s *SubscriptionCycledEvent) GetOrganizationID() string

func (*SubscriptionCycledEvent) GetParentID ¶ added in v0.13.0

func (s *SubscriptionCycledEvent) GetParentID() *string

func (*SubscriptionCycledEvent) GetSource ¶ added in v0.8.4

func (s *SubscriptionCycledEvent) GetSource() string

func (*SubscriptionCycledEvent) GetTimestamp ¶ added in v0.8.4

func (s *SubscriptionCycledEvent) GetTimestamp() time.Time

func (SubscriptionCycledEvent) MarshalJSON ¶ added in v0.8.4

func (s SubscriptionCycledEvent) MarshalJSON() ([]byte, error)

func (*SubscriptionCycledEvent) UnmarshalJSON ¶ added in v0.8.4

func (s *SubscriptionCycledEvent) UnmarshalJSON(data []byte) error

type SubscriptionCycledMetadata ¶ added in v0.8.4

type SubscriptionCycledMetadata struct {
	SubscriptionID         string  `json:"subscription_id"`
	ProductID              *string `json:"product_id,omitempty"`
	Amount                 *int64  `json:"amount,omitempty"`
	Currency               *string `json:"currency,omitempty"`
	RecurringInterval      *string `json:"recurring_interval,omitempty"`
	RecurringIntervalCount *int64  `json:"recurring_interval_count,omitempty"`
}

func (*SubscriptionCycledMetadata) GetAmount ¶ added in v0.13.0

func (s *SubscriptionCycledMetadata) GetAmount() *int64

func (*SubscriptionCycledMetadata) GetCurrency ¶ added in v0.13.0

func (s *SubscriptionCycledMetadata) GetCurrency() *string

func (*SubscriptionCycledMetadata) GetProductID ¶ added in v0.13.0

func (s *SubscriptionCycledMetadata) GetProductID() *string

func (*SubscriptionCycledMetadata) GetRecurringInterval ¶ added in v0.13.0

func (s *SubscriptionCycledMetadata) GetRecurringInterval() *string

func (*SubscriptionCycledMetadata) GetRecurringIntervalCount ¶ added in v0.13.0

func (s *SubscriptionCycledMetadata) GetRecurringIntervalCount() *int64

func (*SubscriptionCycledMetadata) GetSubscriptionID ¶ added in v0.8.4

func (s *SubscriptionCycledMetadata) GetSubscriptionID() string

func (SubscriptionCycledMetadata) MarshalJSON ¶ added in v0.8.4

func (s SubscriptionCycledMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionCycledMetadata) UnmarshalJSON ¶ added in v0.8.4

func (s *SubscriptionCycledMetadata) UnmarshalJSON(data []byte) error

type SubscriptionDiscount ¶

type SubscriptionDiscount struct {
	DiscountFixedOnceForeverDurationBase      *DiscountFixedOnceForeverDurationBase      `queryParam:"inline" union:"member"`
	DiscountFixedRepeatDurationBase           *DiscountFixedRepeatDurationBase           `queryParam:"inline" union:"member"`
	DiscountPercentageOnceForeverDurationBase *DiscountPercentageOnceForeverDurationBase `queryParam:"inline" union:"member"`
	DiscountPercentageRepeatDurationBase      *DiscountPercentageRepeatDurationBase      `queryParam:"inline" union:"member"`

	Type SubscriptionDiscountType
}

func CreateSubscriptionDiscountDiscountFixedOnceForeverDurationBase ¶

func CreateSubscriptionDiscountDiscountFixedOnceForeverDurationBase(discountFixedOnceForeverDurationBase DiscountFixedOnceForeverDurationBase) SubscriptionDiscount

func CreateSubscriptionDiscountDiscountFixedRepeatDurationBase ¶

func CreateSubscriptionDiscountDiscountFixedRepeatDurationBase(discountFixedRepeatDurationBase DiscountFixedRepeatDurationBase) SubscriptionDiscount

func CreateSubscriptionDiscountDiscountPercentageOnceForeverDurationBase ¶

func CreateSubscriptionDiscountDiscountPercentageOnceForeverDurationBase(discountPercentageOnceForeverDurationBase DiscountPercentageOnceForeverDurationBase) SubscriptionDiscount

func CreateSubscriptionDiscountDiscountPercentageRepeatDurationBase ¶

func CreateSubscriptionDiscountDiscountPercentageRepeatDurationBase(discountPercentageRepeatDurationBase DiscountPercentageRepeatDurationBase) SubscriptionDiscount

func (SubscriptionDiscount) MarshalJSON ¶

func (u SubscriptionDiscount) MarshalJSON() ([]byte, error)

func (*SubscriptionDiscount) UnmarshalJSON ¶

func (u *SubscriptionDiscount) UnmarshalJSON(data []byte) error

type SubscriptionDiscountType ¶

type SubscriptionDiscountType string
const (
	SubscriptionDiscountTypeDiscountFixedOnceForeverDurationBase      SubscriptionDiscountType = "DiscountFixedOnceForeverDurationBase"
	SubscriptionDiscountTypeDiscountFixedRepeatDurationBase           SubscriptionDiscountType = "DiscountFixedRepeatDurationBase"
	SubscriptionDiscountTypeDiscountPercentageOnceForeverDurationBase SubscriptionDiscountType = "DiscountPercentageOnceForeverDurationBase"
	SubscriptionDiscountTypeDiscountPercentageRepeatDurationBase      SubscriptionDiscountType = "DiscountPercentageRepeatDurationBase"
)

type SubscriptionMeter ¶ added in v0.4.11

type SubscriptionMeter struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The number of consumed units so far in this billing period.
	ConsumedUnits float64 `json:"consumed_units"`
	// The number of credited units so far in this billing period.
	CreditedUnits int64 `json:"credited_units"`
	// The amount due in cents so far in this billing period.
	Amount int64 `json:"amount"`
	// The ID of the meter.
	MeterID string `json:"meter_id"`
	Meter   Meter  `json:"meter"`
}

SubscriptionMeter - Current consumption and spending for a subscription meter.

func (*SubscriptionMeter) GetAmount ¶ added in v0.4.11

func (s *SubscriptionMeter) GetAmount() int64

func (*SubscriptionMeter) GetConsumedUnits ¶ added in v0.4.11

func (s *SubscriptionMeter) GetConsumedUnits() float64

func (*SubscriptionMeter) GetCreatedAt ¶ added in v0.4.11

func (s *SubscriptionMeter) GetCreatedAt() time.Time

func (*SubscriptionMeter) GetCreditedUnits ¶ added in v0.4.11

func (s *SubscriptionMeter) GetCreditedUnits() int64

func (*SubscriptionMeter) GetID ¶ added in v0.4.11

func (s *SubscriptionMeter) GetID() string

func (*SubscriptionMeter) GetMeter ¶ added in v0.4.11

func (s *SubscriptionMeter) GetMeter() Meter

func (*SubscriptionMeter) GetMeterID ¶ added in v0.4.11

func (s *SubscriptionMeter) GetMeterID() string

func (*SubscriptionMeter) GetModifiedAt ¶ added in v0.4.11

func (s *SubscriptionMeter) GetModifiedAt() *time.Time

func (SubscriptionMeter) MarshalJSON ¶ added in v0.4.11

func (s SubscriptionMeter) MarshalJSON() ([]byte, error)

func (*SubscriptionMeter) UnmarshalJSON ¶ added in v0.4.11

func (s *SubscriptionMeter) UnmarshalJSON(data []byte) error

type SubscriptionPrices ¶ added in v0.4.6

type SubscriptionPrices struct {
	LegacyRecurringProductPrice *LegacyRecurringProductPrice `queryParam:"inline" union:"member"`
	ProductPrice                *ProductPrice                `queryParam:"inline" union:"member"`

	Type SubscriptionPricesType
}

func CreateSubscriptionPricesLegacyRecurringProductPrice ¶ added in v0.4.6

func CreateSubscriptionPricesLegacyRecurringProductPrice(legacyRecurringProductPrice LegacyRecurringProductPrice) SubscriptionPrices

func CreateSubscriptionPricesProductPrice ¶ added in v0.4.6

func CreateSubscriptionPricesProductPrice(productPrice ProductPrice) SubscriptionPrices

func (SubscriptionPrices) MarshalJSON ¶ added in v0.4.6

func (u SubscriptionPrices) MarshalJSON() ([]byte, error)

func (*SubscriptionPrices) UnmarshalJSON ¶ added in v0.4.6

func (u *SubscriptionPrices) UnmarshalJSON(data []byte) error

type SubscriptionPricesType ¶ added in v0.4.6

type SubscriptionPricesType string
const (
	SubscriptionPricesTypeLegacyRecurringProductPrice SubscriptionPricesType = "LegacyRecurringProductPrice"
	SubscriptionPricesTypeProductPrice                SubscriptionPricesType = "ProductPrice"
)

type SubscriptionProductUpdatedEvent ¶ added in v0.8.4

type SubscriptionProductUpdatedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata SubscriptionProductUpdatedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

SubscriptionProductUpdatedEvent - An event created by Polar when a subscription changes the product.

func (*SubscriptionProductUpdatedEvent) GetChildCount ¶ added in v0.12.0

func (s *SubscriptionProductUpdatedEvent) GetChildCount() *int64

func (*SubscriptionProductUpdatedEvent) GetCustomer ¶ added in v0.8.4

func (s *SubscriptionProductUpdatedEvent) GetCustomer() *Customer

func (*SubscriptionProductUpdatedEvent) GetCustomerID ¶ added in v0.8.4

func (s *SubscriptionProductUpdatedEvent) GetCustomerID() *string

func (*SubscriptionProductUpdatedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (s *SubscriptionProductUpdatedEvent) GetCustomerIndividual() *CustomerIndividual

func (*SubscriptionProductUpdatedEvent) GetCustomerTeam ¶ added in v0.16.0

func (s *SubscriptionProductUpdatedEvent) GetCustomerTeam() *CustomerTeam

func (*SubscriptionProductUpdatedEvent) GetExternalCustomerID ¶ added in v0.8.4

func (s *SubscriptionProductUpdatedEvent) GetExternalCustomerID() *string

func (*SubscriptionProductUpdatedEvent) GetExternalMemberID ¶ added in v0.13.0

func (s *SubscriptionProductUpdatedEvent) GetExternalMemberID() *string

func (*SubscriptionProductUpdatedEvent) GetID ¶ added in v0.8.4

func (*SubscriptionProductUpdatedEvent) GetLabel ¶ added in v0.13.0

func (*SubscriptionProductUpdatedEvent) GetMemberID ¶ added in v0.13.0

func (s *SubscriptionProductUpdatedEvent) GetMemberID() *string

func (*SubscriptionProductUpdatedEvent) GetMetadata ¶ added in v0.8.4

func (*SubscriptionProductUpdatedEvent) GetName ¶ added in v0.8.4

func (*SubscriptionProductUpdatedEvent) GetOrganizationID ¶ added in v0.8.4

func (s *SubscriptionProductUpdatedEvent) GetOrganizationID() string

func (*SubscriptionProductUpdatedEvent) GetParentID ¶ added in v0.13.0

func (s *SubscriptionProductUpdatedEvent) GetParentID() *string

func (*SubscriptionProductUpdatedEvent) GetSource ¶ added in v0.8.4

func (s *SubscriptionProductUpdatedEvent) GetSource() string

func (*SubscriptionProductUpdatedEvent) GetTimestamp ¶ added in v0.8.4

func (s *SubscriptionProductUpdatedEvent) GetTimestamp() time.Time

func (SubscriptionProductUpdatedEvent) MarshalJSON ¶ added in v0.8.4

func (s SubscriptionProductUpdatedEvent) MarshalJSON() ([]byte, error)

func (*SubscriptionProductUpdatedEvent) UnmarshalJSON ¶ added in v0.8.4

func (s *SubscriptionProductUpdatedEvent) UnmarshalJSON(data []byte) error

type SubscriptionProductUpdatedMetadata ¶ added in v0.8.4

type SubscriptionProductUpdatedMetadata struct {
	SubscriptionID string `json:"subscription_id"`
	OldProductID   string `json:"old_product_id"`
	NewProductID   string `json:"new_product_id"`
}

func (*SubscriptionProductUpdatedMetadata) GetNewProductID ¶ added in v0.8.4

func (s *SubscriptionProductUpdatedMetadata) GetNewProductID() string

func (*SubscriptionProductUpdatedMetadata) GetOldProductID ¶ added in v0.8.4

func (s *SubscriptionProductUpdatedMetadata) GetOldProductID() string

func (*SubscriptionProductUpdatedMetadata) GetSubscriptionID ¶ added in v0.8.4

func (s *SubscriptionProductUpdatedMetadata) GetSubscriptionID() string

func (SubscriptionProductUpdatedMetadata) MarshalJSON ¶ added in v0.8.4

func (s SubscriptionProductUpdatedMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionProductUpdatedMetadata) UnmarshalJSON ¶ added in v0.8.4

func (s *SubscriptionProductUpdatedMetadata) UnmarshalJSON(data []byte) error

type SubscriptionProrationBehavior ¶ added in v0.1.7

type SubscriptionProrationBehavior string
const (
	SubscriptionProrationBehaviorInvoice    SubscriptionProrationBehavior = "invoice"
	SubscriptionProrationBehaviorProrate    SubscriptionProrationBehavior = "prorate"
	SubscriptionProrationBehaviorNextPeriod SubscriptionProrationBehavior = "next_period"
)

func (SubscriptionProrationBehavior) ToPointer ¶ added in v0.1.7

func (*SubscriptionProrationBehavior) UnmarshalJSON ¶ added in v0.1.7

func (e *SubscriptionProrationBehavior) UnmarshalJSON(data []byte) error

type SubscriptionRecurringInterval ¶

type SubscriptionRecurringInterval string
const (
	SubscriptionRecurringIntervalDay   SubscriptionRecurringInterval = "day"
	SubscriptionRecurringIntervalWeek  SubscriptionRecurringInterval = "week"
	SubscriptionRecurringIntervalMonth SubscriptionRecurringInterval = "month"
	SubscriptionRecurringIntervalYear  SubscriptionRecurringInterval = "year"
)

func (SubscriptionRecurringInterval) ToPointer ¶

func (*SubscriptionRecurringInterval) UnmarshalJSON ¶

func (e *SubscriptionRecurringInterval) UnmarshalJSON(data []byte) error

type SubscriptionRevoke ¶ added in v0.4.14

type SubscriptionRevoke struct {
	// Customer reason for cancellation.
	//
	// Helpful to monitor reasons behind churn for future improvements.
	//
	// Only set this in case your own service is requesting the reason from the
	// customer. Or you know based on direct conversations, i.e support, with
	// the customer.
	//
	// * `too_expensive`: Too expensive for the customer.
	// * `missing_features`: Customer is missing certain features.
	// * `switched_service`: Customer switched to another service.
	// * `unused`: Customer is not using it enough.
	// * `customer_service`: Customer is not satisfied with the customer service.
	// * `low_quality`: Customer is unhappy with the quality.
	// * `too_complex`: Customer considers the service too complicated.
	// * `other`: Other reason(s).
	CustomerCancellationReason *CustomerCancellationReason `json:"customer_cancellation_reason,omitempty"`
	// Customer feedback and why they decided to cancel.
	//
	// **IMPORTANT:**
	// Do not use this to store internal notes! It's intended to be input
	// from the customer and is therefore also available in their Polar
	// purchases library.
	//
	// Only set this in case your own service is requesting the reason from the
	// customer. Or you copy a message directly from a customer
	// conversation, i.e support.
	CustomerCancellationComment *string `json:"customer_cancellation_comment,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscriptionRevoke) GetCustomerCancellationComment ¶ added in v0.4.14

func (s *SubscriptionRevoke) GetCustomerCancellationComment() *string

func (*SubscriptionRevoke) GetCustomerCancellationReason ¶ added in v0.4.14

func (s *SubscriptionRevoke) GetCustomerCancellationReason() *CustomerCancellationReason

func (*SubscriptionRevoke) GetRevoke ¶ added in v0.4.14

func (s *SubscriptionRevoke) GetRevoke() bool

func (SubscriptionRevoke) MarshalJSON ¶ added in v0.4.14

func (s SubscriptionRevoke) MarshalJSON() ([]byte, error)

func (*SubscriptionRevoke) UnmarshalJSON ¶ added in v0.4.14

func (s *SubscriptionRevoke) UnmarshalJSON(data []byte) error

type SubscriptionRevokedEvent ¶ added in v0.8.4

type SubscriptionRevokedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata SubscriptionRevokedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

SubscriptionRevokedEvent - An event created by Polar when a subscription is revoked from a customer.

func (*SubscriptionRevokedEvent) GetChildCount ¶ added in v0.12.0

func (s *SubscriptionRevokedEvent) GetChildCount() *int64

func (*SubscriptionRevokedEvent) GetCustomer ¶ added in v0.8.4

func (s *SubscriptionRevokedEvent) GetCustomer() *Customer

func (*SubscriptionRevokedEvent) GetCustomerID ¶ added in v0.8.4

func (s *SubscriptionRevokedEvent) GetCustomerID() *string

func (*SubscriptionRevokedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (s *SubscriptionRevokedEvent) GetCustomerIndividual() *CustomerIndividual

func (*SubscriptionRevokedEvent) GetCustomerTeam ¶ added in v0.16.0

func (s *SubscriptionRevokedEvent) GetCustomerTeam() *CustomerTeam

func (*SubscriptionRevokedEvent) GetExternalCustomerID ¶ added in v0.8.4

func (s *SubscriptionRevokedEvent) GetExternalCustomerID() *string

func (*SubscriptionRevokedEvent) GetExternalMemberID ¶ added in v0.13.0

func (s *SubscriptionRevokedEvent) GetExternalMemberID() *string

func (*SubscriptionRevokedEvent) GetID ¶ added in v0.8.4

func (s *SubscriptionRevokedEvent) GetID() string

func (*SubscriptionRevokedEvent) GetLabel ¶ added in v0.13.0

func (s *SubscriptionRevokedEvent) GetLabel() string

func (*SubscriptionRevokedEvent) GetMemberID ¶ added in v0.13.0

func (s *SubscriptionRevokedEvent) GetMemberID() *string

func (*SubscriptionRevokedEvent) GetMetadata ¶ added in v0.8.4

func (*SubscriptionRevokedEvent) GetName ¶ added in v0.8.4

func (s *SubscriptionRevokedEvent) GetName() string

func (*SubscriptionRevokedEvent) GetOrganizationID ¶ added in v0.8.4

func (s *SubscriptionRevokedEvent) GetOrganizationID() string

func (*SubscriptionRevokedEvent) GetParentID ¶ added in v0.13.0

func (s *SubscriptionRevokedEvent) GetParentID() *string

func (*SubscriptionRevokedEvent) GetSource ¶ added in v0.8.4

func (s *SubscriptionRevokedEvent) GetSource() string

func (*SubscriptionRevokedEvent) GetTimestamp ¶ added in v0.8.4

func (s *SubscriptionRevokedEvent) GetTimestamp() time.Time

func (SubscriptionRevokedEvent) MarshalJSON ¶ added in v0.8.4

func (s SubscriptionRevokedEvent) MarshalJSON() ([]byte, error)

func (*SubscriptionRevokedEvent) UnmarshalJSON ¶ added in v0.8.4

func (s *SubscriptionRevokedEvent) UnmarshalJSON(data []byte) error

type SubscriptionRevokedMetadata ¶ added in v0.8.4

type SubscriptionRevokedMetadata struct {
	SubscriptionID         string  `json:"subscription_id"`
	ProductID              *string `json:"product_id,omitempty"`
	Amount                 *int64  `json:"amount,omitempty"`
	Currency               *string `json:"currency,omitempty"`
	RecurringInterval      *string `json:"recurring_interval,omitempty"`
	RecurringIntervalCount *int64  `json:"recurring_interval_count,omitempty"`
}

func (*SubscriptionRevokedMetadata) GetAmount ¶ added in v0.13.0

func (s *SubscriptionRevokedMetadata) GetAmount() *int64

func (*SubscriptionRevokedMetadata) GetCurrency ¶ added in v0.13.0

func (s *SubscriptionRevokedMetadata) GetCurrency() *string

func (*SubscriptionRevokedMetadata) GetProductID ¶ added in v0.13.0

func (s *SubscriptionRevokedMetadata) GetProductID() *string

func (*SubscriptionRevokedMetadata) GetRecurringInterval ¶ added in v0.13.0

func (s *SubscriptionRevokedMetadata) GetRecurringInterval() *string

func (*SubscriptionRevokedMetadata) GetRecurringIntervalCount ¶ added in v0.13.0

func (s *SubscriptionRevokedMetadata) GetRecurringIntervalCount() *int64

func (*SubscriptionRevokedMetadata) GetSubscriptionID ¶ added in v0.8.4

func (s *SubscriptionRevokedMetadata) GetSubscriptionID() string

func (SubscriptionRevokedMetadata) MarshalJSON ¶ added in v0.8.4

func (s SubscriptionRevokedMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionRevokedMetadata) UnmarshalJSON ¶ added in v0.8.4

func (s *SubscriptionRevokedMetadata) UnmarshalJSON(data []byte) error

type SubscriptionSeatsUpdatedEvent ¶ added in v0.13.0

type SubscriptionSeatsUpdatedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata SubscriptionSeatsUpdatedMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

SubscriptionSeatsUpdatedEvent - An event created by Polar when a the seats on a subscription is changed.

func (*SubscriptionSeatsUpdatedEvent) GetChildCount ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) GetChildCount() *int64

func (*SubscriptionSeatsUpdatedEvent) GetCustomer ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) GetCustomer() *Customer

func (*SubscriptionSeatsUpdatedEvent) GetCustomerID ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) GetCustomerID() *string

func (*SubscriptionSeatsUpdatedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (s *SubscriptionSeatsUpdatedEvent) GetCustomerIndividual() *CustomerIndividual

func (*SubscriptionSeatsUpdatedEvent) GetCustomerTeam ¶ added in v0.16.0

func (s *SubscriptionSeatsUpdatedEvent) GetCustomerTeam() *CustomerTeam

func (*SubscriptionSeatsUpdatedEvent) GetExternalCustomerID ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) GetExternalCustomerID() *string

func (*SubscriptionSeatsUpdatedEvent) GetExternalMemberID ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) GetExternalMemberID() *string

func (*SubscriptionSeatsUpdatedEvent) GetID ¶ added in v0.13.0

func (*SubscriptionSeatsUpdatedEvent) GetLabel ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) GetLabel() string

func (*SubscriptionSeatsUpdatedEvent) GetMemberID ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) GetMemberID() *string

func (*SubscriptionSeatsUpdatedEvent) GetMetadata ¶ added in v0.13.0

func (*SubscriptionSeatsUpdatedEvent) GetName ¶ added in v0.13.0

func (*SubscriptionSeatsUpdatedEvent) GetOrganizationID ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) GetOrganizationID() string

func (*SubscriptionSeatsUpdatedEvent) GetParentID ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) GetParentID() *string

func (*SubscriptionSeatsUpdatedEvent) GetSource ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) GetSource() string

func (*SubscriptionSeatsUpdatedEvent) GetTimestamp ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) GetTimestamp() time.Time

func (SubscriptionSeatsUpdatedEvent) MarshalJSON ¶ added in v0.13.0

func (s SubscriptionSeatsUpdatedEvent) MarshalJSON() ([]byte, error)

func (*SubscriptionSeatsUpdatedEvent) UnmarshalJSON ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedEvent) UnmarshalJSON(data []byte) error

type SubscriptionSeatsUpdatedMetadata ¶ added in v0.13.0

type SubscriptionSeatsUpdatedMetadata struct {
	SubscriptionID    string `json:"subscription_id"`
	OldSeats          int64  `json:"old_seats"`
	NewSeats          int64  `json:"new_seats"`
	ProrationBehavior string `json:"proration_behavior"`
}

func (*SubscriptionSeatsUpdatedMetadata) GetNewSeats ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedMetadata) GetNewSeats() int64

func (*SubscriptionSeatsUpdatedMetadata) GetOldSeats ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedMetadata) GetOldSeats() int64

func (*SubscriptionSeatsUpdatedMetadata) GetProrationBehavior ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedMetadata) GetProrationBehavior() string

func (*SubscriptionSeatsUpdatedMetadata) GetSubscriptionID ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedMetadata) GetSubscriptionID() string

func (SubscriptionSeatsUpdatedMetadata) MarshalJSON ¶ added in v0.13.0

func (s SubscriptionSeatsUpdatedMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionSeatsUpdatedMetadata) UnmarshalJSON ¶ added in v0.13.0

func (s *SubscriptionSeatsUpdatedMetadata) UnmarshalJSON(data []byte) error

type SubscriptionSortProperty ¶

type SubscriptionSortProperty string
const (
	SubscriptionSortPropertyCustomer              SubscriptionSortProperty = "customer"
	SubscriptionSortPropertyMinusCustomer         SubscriptionSortProperty = "-customer"
	SubscriptionSortPropertyStatus                SubscriptionSortProperty = "status"
	SubscriptionSortPropertyMinusStatus           SubscriptionSortProperty = "-status"
	SubscriptionSortPropertyStartedAt             SubscriptionSortProperty = "started_at"
	SubscriptionSortPropertyMinusStartedAt        SubscriptionSortProperty = "-started_at"
	SubscriptionSortPropertyCurrentPeriodEnd      SubscriptionSortProperty = "current_period_end"
	SubscriptionSortPropertyMinusCurrentPeriodEnd SubscriptionSortProperty = "-current_period_end"
	SubscriptionSortPropertyEndedAt               SubscriptionSortProperty = "ended_at"
	SubscriptionSortPropertyMinusEndedAt          SubscriptionSortProperty = "-ended_at"
	SubscriptionSortPropertyEndsAt                SubscriptionSortProperty = "ends_at"
	SubscriptionSortPropertyMinusEndsAt           SubscriptionSortProperty = "-ends_at"
	SubscriptionSortPropertyAmount                SubscriptionSortProperty = "amount"
	SubscriptionSortPropertyMinusAmount           SubscriptionSortProperty = "-amount"
	SubscriptionSortPropertyProduct               SubscriptionSortProperty = "product"
	SubscriptionSortPropertyMinusProduct          SubscriptionSortProperty = "-product"
	SubscriptionSortPropertyDiscount              SubscriptionSortProperty = "discount"
	SubscriptionSortPropertyMinusDiscount         SubscriptionSortProperty = "-discount"
)

func (SubscriptionSortProperty) ToPointer ¶

func (*SubscriptionSortProperty) UnmarshalJSON ¶

func (e *SubscriptionSortProperty) UnmarshalJSON(data []byte) error

type SubscriptionStatus ¶

type SubscriptionStatus string
const (
	SubscriptionStatusIncomplete        SubscriptionStatus = "incomplete"
	SubscriptionStatusIncompleteExpired SubscriptionStatus = "incomplete_expired"
	SubscriptionStatusTrialing          SubscriptionStatus = "trialing"
	SubscriptionStatusActive            SubscriptionStatus = "active"
	SubscriptionStatusPastDue           SubscriptionStatus = "past_due"
	SubscriptionStatusCanceled          SubscriptionStatus = "canceled"
	SubscriptionStatusUnpaid            SubscriptionStatus = "unpaid"
)

func (SubscriptionStatus) ToPointer ¶

func (e SubscriptionStatus) ToPointer() *SubscriptionStatus

func (*SubscriptionStatus) UnmarshalJSON ¶

func (e *SubscriptionStatus) UnmarshalJSON(data []byte) error

type SubscriptionUncanceledEvent ¶ added in v0.13.0

type SubscriptionUncanceledEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata SubscriptionUncanceledMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

SubscriptionUncanceledEvent - An event created by Polar when a subscription cancellation is reversed.

func (*SubscriptionUncanceledEvent) GetChildCount ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetChildCount() *int64

func (*SubscriptionUncanceledEvent) GetCustomer ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetCustomer() *Customer

func (*SubscriptionUncanceledEvent) GetCustomerID ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetCustomerID() *string

func (*SubscriptionUncanceledEvent) GetCustomerIndividual ¶ added in v0.16.0

func (s *SubscriptionUncanceledEvent) GetCustomerIndividual() *CustomerIndividual

func (*SubscriptionUncanceledEvent) GetCustomerTeam ¶ added in v0.16.0

func (s *SubscriptionUncanceledEvent) GetCustomerTeam() *CustomerTeam

func (*SubscriptionUncanceledEvent) GetExternalCustomerID ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetExternalCustomerID() *string

func (*SubscriptionUncanceledEvent) GetExternalMemberID ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetExternalMemberID() *string

func (*SubscriptionUncanceledEvent) GetID ¶ added in v0.13.0

func (*SubscriptionUncanceledEvent) GetLabel ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetLabel() string

func (*SubscriptionUncanceledEvent) GetMemberID ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetMemberID() *string

func (*SubscriptionUncanceledEvent) GetMetadata ¶ added in v0.13.0

func (*SubscriptionUncanceledEvent) GetName ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetName() string

func (*SubscriptionUncanceledEvent) GetOrganizationID ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetOrganizationID() string

func (*SubscriptionUncanceledEvent) GetParentID ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetParentID() *string

func (*SubscriptionUncanceledEvent) GetSource ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetSource() string

func (*SubscriptionUncanceledEvent) GetTimestamp ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) GetTimestamp() time.Time

func (SubscriptionUncanceledEvent) MarshalJSON ¶ added in v0.13.0

func (s SubscriptionUncanceledEvent) MarshalJSON() ([]byte, error)

func (*SubscriptionUncanceledEvent) UnmarshalJSON ¶ added in v0.13.0

func (s *SubscriptionUncanceledEvent) UnmarshalJSON(data []byte) error

type SubscriptionUncanceledMetadata ¶ added in v0.13.0

type SubscriptionUncanceledMetadata struct {
	SubscriptionID         string `json:"subscription_id"`
	ProductID              string `json:"product_id"`
	Amount                 int64  `json:"amount"`
	Currency               string `json:"currency"`
	RecurringInterval      string `json:"recurring_interval"`
	RecurringIntervalCount int64  `json:"recurring_interval_count"`
}

func (*SubscriptionUncanceledMetadata) GetAmount ¶ added in v0.13.0

func (s *SubscriptionUncanceledMetadata) GetAmount() int64

func (*SubscriptionUncanceledMetadata) GetCurrency ¶ added in v0.13.0

func (s *SubscriptionUncanceledMetadata) GetCurrency() string

func (*SubscriptionUncanceledMetadata) GetProductID ¶ added in v0.13.0

func (s *SubscriptionUncanceledMetadata) GetProductID() string

func (*SubscriptionUncanceledMetadata) GetRecurringInterval ¶ added in v0.13.0

func (s *SubscriptionUncanceledMetadata) GetRecurringInterval() string

func (*SubscriptionUncanceledMetadata) GetRecurringIntervalCount ¶ added in v0.13.0

func (s *SubscriptionUncanceledMetadata) GetRecurringIntervalCount() int64

func (*SubscriptionUncanceledMetadata) GetSubscriptionID ¶ added in v0.13.0

func (s *SubscriptionUncanceledMetadata) GetSubscriptionID() string

func (SubscriptionUncanceledMetadata) MarshalJSON ¶ added in v0.13.0

func (s SubscriptionUncanceledMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionUncanceledMetadata) UnmarshalJSON ¶ added in v0.13.0

func (s *SubscriptionUncanceledMetadata) UnmarshalJSON(data []byte) error

type SubscriptionUpdate ¶ added in v0.1.1

type SubscriptionUpdate struct {
	SubscriptionUpdateProduct       *SubscriptionUpdateProduct       `queryParam:"inline" union:"member"`
	SubscriptionUpdateDiscount      *SubscriptionUpdateDiscount      `queryParam:"inline" union:"member"`
	SubscriptionUpdateTrial         *SubscriptionUpdateTrial         `queryParam:"inline" union:"member"`
	SubscriptionUpdateSeats         *SubscriptionUpdateSeats         `queryParam:"inline" union:"member"`
	SubscriptionUpdateBillingPeriod *SubscriptionUpdateBillingPeriod `queryParam:"inline" union:"member"`
	SubscriptionCancel              *SubscriptionCancel              `queryParam:"inline" union:"member"`
	SubscriptionRevoke              *SubscriptionRevoke              `queryParam:"inline" union:"member"`

	Type SubscriptionUpdateType
}

func CreateSubscriptionUpdateSubscriptionCancel ¶ added in v0.1.1

func CreateSubscriptionUpdateSubscriptionCancel(subscriptionCancel SubscriptionCancel) SubscriptionUpdate

func CreateSubscriptionUpdateSubscriptionRevoke ¶ added in v0.4.14

func CreateSubscriptionUpdateSubscriptionRevoke(subscriptionRevoke SubscriptionRevoke) SubscriptionUpdate

func CreateSubscriptionUpdateSubscriptionUpdateBillingPeriod ¶ added in v0.13.0

func CreateSubscriptionUpdateSubscriptionUpdateBillingPeriod(subscriptionUpdateBillingPeriod SubscriptionUpdateBillingPeriod) SubscriptionUpdate

func CreateSubscriptionUpdateSubscriptionUpdateDiscount ¶ added in v0.6.0

func CreateSubscriptionUpdateSubscriptionUpdateDiscount(subscriptionUpdateDiscount SubscriptionUpdateDiscount) SubscriptionUpdate

func CreateSubscriptionUpdateSubscriptionUpdateProduct ¶ added in v0.3.0

func CreateSubscriptionUpdateSubscriptionUpdateProduct(subscriptionUpdateProduct SubscriptionUpdateProduct) SubscriptionUpdate

func CreateSubscriptionUpdateSubscriptionUpdateSeats ¶ added in v0.12.0

func CreateSubscriptionUpdateSubscriptionUpdateSeats(subscriptionUpdateSeats SubscriptionUpdateSeats) SubscriptionUpdate

func CreateSubscriptionUpdateSubscriptionUpdateTrial ¶ added in v0.9.1

func CreateSubscriptionUpdateSubscriptionUpdateTrial(subscriptionUpdateTrial SubscriptionUpdateTrial) SubscriptionUpdate

func (SubscriptionUpdate) MarshalJSON ¶ added in v0.1.1

func (u SubscriptionUpdate) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdate) UnmarshalJSON ¶ added in v0.1.1

func (u *SubscriptionUpdate) UnmarshalJSON(data []byte) error

type SubscriptionUpdateBillingPeriod ¶ added in v0.13.0

type SubscriptionUpdateBillingPeriod struct {
	// Set a new date for the end of the current billing period. The subscription will renew on this date. Needs to be later than the current value.
	//
	// It is not possible to update the current billing period on a canceled subscription.
	CurrentBillingPeriodEnd time.Time `json:"current_billing_period_end"`
}

func (*SubscriptionUpdateBillingPeriod) GetCurrentBillingPeriodEnd ¶ added in v0.13.0

func (s *SubscriptionUpdateBillingPeriod) GetCurrentBillingPeriodEnd() time.Time

func (SubscriptionUpdateBillingPeriod) MarshalJSON ¶ added in v0.13.0

func (s SubscriptionUpdateBillingPeriod) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdateBillingPeriod) UnmarshalJSON ¶ added in v0.13.0

func (s *SubscriptionUpdateBillingPeriod) UnmarshalJSON(data []byte) error

type SubscriptionUpdateDiscount ¶ added in v0.6.0

type SubscriptionUpdateDiscount struct {
	// Update the subscription to apply a new discount. If set to `null`, the discount will be removed. The change will be applied on the next billing cycle.
	DiscountID *string `json:"discount_id"`
}

func (*SubscriptionUpdateDiscount) GetDiscountID ¶ added in v0.6.0

func (s *SubscriptionUpdateDiscount) GetDiscountID() *string

func (SubscriptionUpdateDiscount) MarshalJSON ¶ added in v0.8.4

func (s SubscriptionUpdateDiscount) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdateDiscount) UnmarshalJSON ¶ added in v0.8.4

func (s *SubscriptionUpdateDiscount) UnmarshalJSON(data []byte) error

type SubscriptionUpdateProduct ¶ added in v0.3.0

type SubscriptionUpdateProduct struct {
	// Update subscription to another product.
	ProductID string `json:"product_id"`
	// Determine how to handle the proration billing. If not provided, will use the default organization setting.
	ProrationBehavior *SubscriptionProrationBehavior `json:"proration_behavior,omitempty"`
}

func (*SubscriptionUpdateProduct) GetProductID ¶ added in v0.3.0

func (s *SubscriptionUpdateProduct) GetProductID() string

func (*SubscriptionUpdateProduct) GetProrationBehavior ¶ added in v0.3.0

func (s *SubscriptionUpdateProduct) GetProrationBehavior() *SubscriptionProrationBehavior

func (SubscriptionUpdateProduct) MarshalJSON ¶ added in v0.8.4

func (s SubscriptionUpdateProduct) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdateProduct) UnmarshalJSON ¶ added in v0.8.4

func (s *SubscriptionUpdateProduct) UnmarshalJSON(data []byte) error

type SubscriptionUpdateSeats ¶ added in v0.12.0

type SubscriptionUpdateSeats struct {
	// Update the number of seats for this subscription.
	Seats int64 `json:"seats"`
	// Determine how to handle the proration billing. If not provided, will use the default organization setting.
	ProrationBehavior *SubscriptionProrationBehavior `json:"proration_behavior,omitempty"`
}

func (*SubscriptionUpdateSeats) GetProrationBehavior ¶ added in v0.12.0

func (s *SubscriptionUpdateSeats) GetProrationBehavior() *SubscriptionProrationBehavior

func (*SubscriptionUpdateSeats) GetSeats ¶ added in v0.12.0

func (s *SubscriptionUpdateSeats) GetSeats() int64

func (SubscriptionUpdateSeats) MarshalJSON ¶ added in v0.12.0

func (s SubscriptionUpdateSeats) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdateSeats) UnmarshalJSON ¶ added in v0.12.0

func (s *SubscriptionUpdateSeats) UnmarshalJSON(data []byte) error

type SubscriptionUpdateTrial ¶ added in v0.9.1

type SubscriptionUpdateTrial struct {
	// Set or extend the trial period of the subscription. If set to `now`, the trial will end immediately.
	TrialEnd time.Time `json:"trial_end"`
}

func (*SubscriptionUpdateTrial) GetTrialEnd ¶ added in v0.9.1

func (s *SubscriptionUpdateTrial) GetTrialEnd() time.Time

func (SubscriptionUpdateTrial) MarshalJSON ¶ added in v0.9.1

func (s SubscriptionUpdateTrial) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdateTrial) UnmarshalJSON ¶ added in v0.9.1

func (s *SubscriptionUpdateTrial) UnmarshalJSON(data []byte) error

type SubscriptionUpdateType ¶ added in v0.1.1

type SubscriptionUpdateType string
const (
	SubscriptionUpdateTypeSubscriptionUpdateProduct       SubscriptionUpdateType = "SubscriptionUpdateProduct"
	SubscriptionUpdateTypeSubscriptionUpdateDiscount      SubscriptionUpdateType = "SubscriptionUpdateDiscount"
	SubscriptionUpdateTypeSubscriptionUpdateTrial         SubscriptionUpdateType = "SubscriptionUpdateTrial"
	SubscriptionUpdateTypeSubscriptionUpdateSeats         SubscriptionUpdateType = "SubscriptionUpdateSeats"
	SubscriptionUpdateTypeSubscriptionUpdateBillingPeriod SubscriptionUpdateType = "SubscriptionUpdateBillingPeriod"
	SubscriptionUpdateTypeSubscriptionCancel              SubscriptionUpdateType = "SubscriptionCancel"
	SubscriptionUpdateTypeSubscriptionRevoke              SubscriptionUpdateType = "SubscriptionRevoke"
)

type SubscriptionUpdatedBillingPeriodMetadata ¶ added in v0.15.1

type SubscriptionUpdatedBillingPeriodMetadata struct {
	SubscriptionID   string `json:"subscription_id"`
	BillingPeriodEnd string `json:"billing_period_end"`
}

func (*SubscriptionUpdatedBillingPeriodMetadata) GetBillingPeriodEnd ¶ added in v0.15.1

func (s *SubscriptionUpdatedBillingPeriodMetadata) GetBillingPeriodEnd() string

func (*SubscriptionUpdatedBillingPeriodMetadata) GetSubscriptionID ¶ added in v0.15.1

func (s *SubscriptionUpdatedBillingPeriodMetadata) GetSubscriptionID() string

func (SubscriptionUpdatedBillingPeriodMetadata) MarshalJSON ¶ added in v0.15.1

func (*SubscriptionUpdatedBillingPeriodMetadata) UnmarshalJSON ¶ added in v0.15.1

func (s *SubscriptionUpdatedBillingPeriodMetadata) UnmarshalJSON(data []byte) error

type SubscriptionUpdatedDiscountMetadata ¶ added in v0.15.1

type SubscriptionUpdatedDiscountMetadata struct {
	SubscriptionID string  `json:"subscription_id"`
	DiscountID     *string `json:"discount_id"`
}

func (*SubscriptionUpdatedDiscountMetadata) GetDiscountID ¶ added in v0.15.1

func (s *SubscriptionUpdatedDiscountMetadata) GetDiscountID() *string

func (*SubscriptionUpdatedDiscountMetadata) GetSubscriptionID ¶ added in v0.15.1

func (s *SubscriptionUpdatedDiscountMetadata) GetSubscriptionID() string

func (SubscriptionUpdatedDiscountMetadata) MarshalJSON ¶ added in v0.15.1

func (s SubscriptionUpdatedDiscountMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdatedDiscountMetadata) UnmarshalJSON ¶ added in v0.15.1

func (s *SubscriptionUpdatedDiscountMetadata) UnmarshalJSON(data []byte) error

type SubscriptionUpdatedEvent ¶ added in v0.15.1

type SubscriptionUpdatedEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`

	Metadata SubscriptionUpdatedEventMetadata `json:"metadata"`
	// contains filtered or unexported fields
}

SubscriptionUpdatedEvent - An event created by Polar when a subscription is updated.

func (*SubscriptionUpdatedEvent) GetChildCount ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetChildCount() *int64

func (*SubscriptionUpdatedEvent) GetCustomer ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetCustomer() *Customer

func (*SubscriptionUpdatedEvent) GetCustomerID ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetCustomerID() *string

func (*SubscriptionUpdatedEvent) GetCustomerIndividual ¶ added in v0.16.0

func (s *SubscriptionUpdatedEvent) GetCustomerIndividual() *CustomerIndividual

func (*SubscriptionUpdatedEvent) GetCustomerTeam ¶ added in v0.16.0

func (s *SubscriptionUpdatedEvent) GetCustomerTeam() *CustomerTeam

func (*SubscriptionUpdatedEvent) GetExternalCustomerID ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetExternalCustomerID() *string

func (*SubscriptionUpdatedEvent) GetExternalMemberID ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetExternalMemberID() *string

func (*SubscriptionUpdatedEvent) GetID ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetID() string

func (*SubscriptionUpdatedEvent) GetLabel ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetLabel() string

func (*SubscriptionUpdatedEvent) GetMemberID ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetMemberID() *string

func (*SubscriptionUpdatedEvent) GetMetadata ¶ added in v0.15.1

func (*SubscriptionUpdatedEvent) GetName ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetName() string

func (*SubscriptionUpdatedEvent) GetOrganizationID ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetOrganizationID() string

func (*SubscriptionUpdatedEvent) GetParentID ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetParentID() *string

func (*SubscriptionUpdatedEvent) GetSource ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetSource() string

func (*SubscriptionUpdatedEvent) GetTimestamp ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) GetTimestamp() time.Time

func (SubscriptionUpdatedEvent) MarshalJSON ¶ added in v0.15.1

func (s SubscriptionUpdatedEvent) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdatedEvent) UnmarshalJSON ¶ added in v0.15.1

func (s *SubscriptionUpdatedEvent) UnmarshalJSON(data []byte) error

type SubscriptionUpdatedEventMetadata ¶ added in v0.15.1

type SubscriptionUpdatedEventMetadata struct {
	SubscriptionUpdatedProductMetadata       *SubscriptionUpdatedProductMetadata       `queryParam:"inline" union:"member"`
	SubscriptionUpdatedDiscountMetadata      *SubscriptionUpdatedDiscountMetadata      `queryParam:"inline" union:"member"`
	SubscriptionUpdatedTrialMetadata         *SubscriptionUpdatedTrialMetadata         `queryParam:"inline" union:"member"`
	SubscriptionUpdatedSeatsMetadata         *SubscriptionUpdatedSeatsMetadata         `queryParam:"inline" union:"member"`
	SubscriptionUpdatedBillingPeriodMetadata *SubscriptionUpdatedBillingPeriodMetadata `queryParam:"inline" union:"member"`

	Type SubscriptionUpdatedEventMetadataType
}

func CreateSubscriptionUpdatedEventMetadataSubscriptionUpdatedBillingPeriodMetadata ¶ added in v0.15.1

func CreateSubscriptionUpdatedEventMetadataSubscriptionUpdatedBillingPeriodMetadata(subscriptionUpdatedBillingPeriodMetadata SubscriptionUpdatedBillingPeriodMetadata) SubscriptionUpdatedEventMetadata

func CreateSubscriptionUpdatedEventMetadataSubscriptionUpdatedDiscountMetadata ¶ added in v0.15.1

func CreateSubscriptionUpdatedEventMetadataSubscriptionUpdatedDiscountMetadata(subscriptionUpdatedDiscountMetadata SubscriptionUpdatedDiscountMetadata) SubscriptionUpdatedEventMetadata

func CreateSubscriptionUpdatedEventMetadataSubscriptionUpdatedProductMetadata ¶ added in v0.15.1

func CreateSubscriptionUpdatedEventMetadataSubscriptionUpdatedProductMetadata(subscriptionUpdatedProductMetadata SubscriptionUpdatedProductMetadata) SubscriptionUpdatedEventMetadata

func CreateSubscriptionUpdatedEventMetadataSubscriptionUpdatedSeatsMetadata ¶ added in v0.15.1

func CreateSubscriptionUpdatedEventMetadataSubscriptionUpdatedSeatsMetadata(subscriptionUpdatedSeatsMetadata SubscriptionUpdatedSeatsMetadata) SubscriptionUpdatedEventMetadata

func CreateSubscriptionUpdatedEventMetadataSubscriptionUpdatedTrialMetadata ¶ added in v0.15.1

func CreateSubscriptionUpdatedEventMetadataSubscriptionUpdatedTrialMetadata(subscriptionUpdatedTrialMetadata SubscriptionUpdatedTrialMetadata) SubscriptionUpdatedEventMetadata

func (SubscriptionUpdatedEventMetadata) MarshalJSON ¶ added in v0.15.1

func (u SubscriptionUpdatedEventMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdatedEventMetadata) UnmarshalJSON ¶ added in v0.15.1

func (u *SubscriptionUpdatedEventMetadata) UnmarshalJSON(data []byte) error

type SubscriptionUpdatedEventMetadataType ¶ added in v0.15.1

type SubscriptionUpdatedEventMetadataType string
const (
	SubscriptionUpdatedEventMetadataTypeSubscriptionUpdatedProductMetadata       SubscriptionUpdatedEventMetadataType = "SubscriptionUpdatedProductMetadata"
	SubscriptionUpdatedEventMetadataTypeSubscriptionUpdatedDiscountMetadata      SubscriptionUpdatedEventMetadataType = "SubscriptionUpdatedDiscountMetadata"
	SubscriptionUpdatedEventMetadataTypeSubscriptionUpdatedTrialMetadata         SubscriptionUpdatedEventMetadataType = "SubscriptionUpdatedTrialMetadata"
	SubscriptionUpdatedEventMetadataTypeSubscriptionUpdatedSeatsMetadata         SubscriptionUpdatedEventMetadataType = "SubscriptionUpdatedSeatsMetadata"
	SubscriptionUpdatedEventMetadataTypeSubscriptionUpdatedBillingPeriodMetadata SubscriptionUpdatedEventMetadataType = "SubscriptionUpdatedBillingPeriodMetadata"
)

type SubscriptionUpdatedProductMetadata ¶ added in v0.15.1

type SubscriptionUpdatedProductMetadata struct {
	SubscriptionID    string                        `json:"subscription_id"`
	ProductID         string                        `json:"product_id"`
	ProrationBehavior SubscriptionProrationBehavior `json:"proration_behavior"`
}

func (*SubscriptionUpdatedProductMetadata) GetProductID ¶ added in v0.15.1

func (s *SubscriptionUpdatedProductMetadata) GetProductID() string

func (*SubscriptionUpdatedProductMetadata) GetProrationBehavior ¶ added in v0.15.1

func (*SubscriptionUpdatedProductMetadata) GetSubscriptionID ¶ added in v0.15.1

func (s *SubscriptionUpdatedProductMetadata) GetSubscriptionID() string

func (SubscriptionUpdatedProductMetadata) MarshalJSON ¶ added in v0.15.1

func (s SubscriptionUpdatedProductMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdatedProductMetadata) UnmarshalJSON ¶ added in v0.15.1

func (s *SubscriptionUpdatedProductMetadata) UnmarshalJSON(data []byte) error

type SubscriptionUpdatedSeatsMetadata ¶ added in v0.15.1

type SubscriptionUpdatedSeatsMetadata struct {
	SubscriptionID    string                        `json:"subscription_id"`
	Seats             int64                         `json:"seats"`
	ProrationBehavior SubscriptionProrationBehavior `json:"proration_behavior"`
}

func (*SubscriptionUpdatedSeatsMetadata) GetProrationBehavior ¶ added in v0.15.1

func (*SubscriptionUpdatedSeatsMetadata) GetSeats ¶ added in v0.15.1

func (*SubscriptionUpdatedSeatsMetadata) GetSubscriptionID ¶ added in v0.15.1

func (s *SubscriptionUpdatedSeatsMetadata) GetSubscriptionID() string

func (SubscriptionUpdatedSeatsMetadata) MarshalJSON ¶ added in v0.15.1

func (s SubscriptionUpdatedSeatsMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdatedSeatsMetadata) UnmarshalJSON ¶ added in v0.15.1

func (s *SubscriptionUpdatedSeatsMetadata) UnmarshalJSON(data []byte) error

type SubscriptionUpdatedTrialMetadata ¶ added in v0.15.1

type SubscriptionUpdatedTrialMetadata struct {
	SubscriptionID string `json:"subscription_id"`
	TrialEnd       string `json:"trial_end"`
}

func (*SubscriptionUpdatedTrialMetadata) GetSubscriptionID ¶ added in v0.15.1

func (s *SubscriptionUpdatedTrialMetadata) GetSubscriptionID() string

func (*SubscriptionUpdatedTrialMetadata) GetTrialEnd ¶ added in v0.15.1

func (s *SubscriptionUpdatedTrialMetadata) GetTrialEnd() string

func (SubscriptionUpdatedTrialMetadata) MarshalJSON ¶ added in v0.15.1

func (s SubscriptionUpdatedTrialMetadata) MarshalJSON() ([]byte, error)

func (*SubscriptionUpdatedTrialMetadata) UnmarshalJSON ¶ added in v0.15.1

func (s *SubscriptionUpdatedTrialMetadata) UnmarshalJSON(data []byte) error

type SucceededCheckouts ¶ added in v0.4.17

type SucceededCheckouts struct {
	Integer *int64   `queryParam:"inline" union:"member"`
	Number  *float64 `queryParam:"inline" union:"member"`

	Type SucceededCheckoutsType
}

func CreateSucceededCheckoutsInteger ¶ added in v0.4.17

func CreateSucceededCheckoutsInteger(integer int64) SucceededCheckouts

func CreateSucceededCheckoutsNumber ¶ added in v0.4.17

func CreateSucceededCheckoutsNumber(number float64) SucceededCheckouts

func (SucceededCheckouts) MarshalJSON ¶ added in v0.4.17

func (u SucceededCheckouts) MarshalJSON() ([]byte, error)

func (*SucceededCheckouts) UnmarshalJSON ¶ added in v0.4.17

func (u *SucceededCheckouts) UnmarshalJSON(data []byte) error

type SucceededCheckoutsType ¶ added in v0.4.17

type SucceededCheckoutsType string
const (
	SucceededCheckoutsTypeInteger SucceededCheckoutsType = "integer"
	SucceededCheckoutsTypeNumber  SucceededCheckoutsType = "number"
)

type SwitchingFrom ¶ added in v0.4.6

type SwitchingFrom string
const (
	SwitchingFromPaddle       SwitchingFrom = "paddle"
	SwitchingFromLemonSqueezy SwitchingFrom = "lemon_squeezy"
	SwitchingFromGumroad      SwitchingFrom = "gumroad"
	SwitchingFromStripe       SwitchingFrom = "stripe"
	SwitchingFromOther        SwitchingFrom = "other"
)

func (SwitchingFrom) ToPointer ¶ added in v0.4.6

func (e SwitchingFrom) ToPointer() *SwitchingFrom

func (*SwitchingFrom) UnmarshalJSON ¶ added in v0.4.6

func (e *SwitchingFrom) UnmarshalJSON(data []byte) error

type SystemEvent ¶ added in v0.4.20

type SystemEvent struct {
	MeterCreditEvent                      *MeterCreditEvent                      `queryParam:"inline" union:"member"`
	MeterResetEvent                       *MeterResetEvent                       `queryParam:"inline" union:"member"`
	BenefitGrantedEvent                   *BenefitGrantedEvent                   `queryParam:"inline" union:"member"`
	BenefitCycledEvent                    *BenefitCycledEvent                    `queryParam:"inline" union:"member"`
	BenefitUpdatedEvent                   *BenefitUpdatedEvent                   `queryParam:"inline" union:"member"`
	BenefitRevokedEvent                   *BenefitRevokedEvent                   `queryParam:"inline" union:"member"`
	SubscriptionCreatedEvent              *SubscriptionCreatedEvent              `queryParam:"inline" union:"member"`
	SubscriptionUpdatedEvent              *SubscriptionUpdatedEvent              `queryParam:"inline" union:"member"`
	SubscriptionCycledEvent               *SubscriptionCycledEvent               `queryParam:"inline" union:"member"`
	SubscriptionCanceledEvent             *SubscriptionCanceledEvent             `queryParam:"inline" union:"member"`
	SubscriptionRevokedEvent              *SubscriptionRevokedEvent              `queryParam:"inline" union:"member"`
	SubscriptionUncanceledEvent           *SubscriptionUncanceledEvent           `queryParam:"inline" union:"member"`
	SubscriptionProductUpdatedEvent       *SubscriptionProductUpdatedEvent       `queryParam:"inline" union:"member"`
	SubscriptionSeatsUpdatedEvent         *SubscriptionSeatsUpdatedEvent         `queryParam:"inline" union:"member"`
	SubscriptionBillingPeriodUpdatedEvent *SubscriptionBillingPeriodUpdatedEvent `queryParam:"inline" union:"member"`
	OrderPaidEvent                        *OrderPaidEvent                        `queryParam:"inline" union:"member"`
	OrderRefundedEvent                    *OrderRefundedEvent                    `queryParam:"inline" union:"member"`
	OrderVoidedEvent                      *OrderVoidedEvent                      `queryParam:"inline" union:"member"`
	CheckoutCreatedEvent                  *CheckoutCreatedEvent                  `queryParam:"inline" union:"member"`
	CustomerCreatedEvent                  *CustomerCreatedEvent                  `queryParam:"inline" union:"member"`
	CustomerUpdatedEvent                  *CustomerUpdatedEvent                  `queryParam:"inline" union:"member"`
	CustomerDeletedEvent                  *CustomerDeletedEvent                  `queryParam:"inline" union:"member"`
	BalanceOrderEvent                     *BalanceOrderEvent                     `queryParam:"inline" union:"member"`
	BalanceCreditOrderEvent               *BalanceCreditOrderEvent               `queryParam:"inline" union:"member"`
	BalanceRefundEvent                    *BalanceRefundEvent                    `queryParam:"inline" union:"member"`
	BalanceRefundReversalEvent            *BalanceRefundReversalEvent            `queryParam:"inline" union:"member"`
	BalanceDisputeEvent                   *BalanceDisputeEvent                   `queryParam:"inline" union:"member"`
	BalanceDisputeReversalEvent           *BalanceDisputeReversalEvent           `queryParam:"inline" union:"member"`

	Type SystemEventType
}

func CreateSystemEventBalanceCreditOrder ¶ added in v0.13.0

func CreateSystemEventBalanceCreditOrder(balanceCreditOrder BalanceCreditOrderEvent) SystemEvent

func CreateSystemEventBalanceDispute ¶ added in v0.13.0

func CreateSystemEventBalanceDispute(balanceDispute BalanceDisputeEvent) SystemEvent

func CreateSystemEventBalanceDisputeReversal ¶ added in v0.13.0

func CreateSystemEventBalanceDisputeReversal(balanceDisputeReversal BalanceDisputeReversalEvent) SystemEvent

func CreateSystemEventBalanceOrder ¶ added in v0.13.0

func CreateSystemEventBalanceOrder(balanceOrder BalanceOrderEvent) SystemEvent

func CreateSystemEventBalanceRefund ¶ added in v0.13.0

func CreateSystemEventBalanceRefund(balanceRefund BalanceRefundEvent) SystemEvent

func CreateSystemEventBalanceRefundReversal ¶ added in v0.13.0

func CreateSystemEventBalanceRefundReversal(balanceRefundReversal BalanceRefundReversalEvent) SystemEvent

func CreateSystemEventBenefitCycled ¶ added in v0.4.20

func CreateSystemEventBenefitCycled(benefitCycled BenefitCycledEvent) SystemEvent

func CreateSystemEventBenefitGranted ¶ added in v0.4.20

func CreateSystemEventBenefitGranted(benefitGranted BenefitGrantedEvent) SystemEvent

func CreateSystemEventBenefitRevoked ¶ added in v0.4.20

func CreateSystemEventBenefitRevoked(benefitRevoked BenefitRevokedEvent) SystemEvent

func CreateSystemEventBenefitUpdated ¶ added in v0.4.20

func CreateSystemEventBenefitUpdated(benefitUpdated BenefitUpdatedEvent) SystemEvent

func CreateSystemEventCheckoutCreated ¶ added in v0.13.0

func CreateSystemEventCheckoutCreated(checkoutCreated CheckoutCreatedEvent) SystemEvent

func CreateSystemEventCustomerCreated ¶ added in v0.12.0

func CreateSystemEventCustomerCreated(customerCreated CustomerCreatedEvent) SystemEvent

func CreateSystemEventCustomerDeleted ¶ added in v0.12.0

func CreateSystemEventCustomerDeleted(customerDeleted CustomerDeletedEvent) SystemEvent

func CreateSystemEventCustomerUpdated ¶ added in v0.12.0

func CreateSystemEventCustomerUpdated(customerUpdated CustomerUpdatedEvent) SystemEvent

func CreateSystemEventMeterCredited ¶ added in v0.4.20

func CreateSystemEventMeterCredited(meterCredited MeterCreditEvent) SystemEvent

func CreateSystemEventMeterReset ¶ added in v0.4.20

func CreateSystemEventMeterReset(meterReset MeterResetEvent) SystemEvent

func CreateSystemEventOrderPaid ¶ added in v0.12.0

func CreateSystemEventOrderPaid(orderPaid OrderPaidEvent) SystemEvent

func CreateSystemEventOrderRefunded ¶ added in v0.12.0

func CreateSystemEventOrderRefunded(orderRefunded OrderRefundedEvent) SystemEvent

func CreateSystemEventOrderVoided ¶ added in v0.16.0

func CreateSystemEventOrderVoided(orderVoided OrderVoidedEvent) SystemEvent

func CreateSystemEventSubscriptionBillingPeriodUpdated ¶ added in v0.13.0

func CreateSystemEventSubscriptionBillingPeriodUpdated(subscriptionBillingPeriodUpdated SubscriptionBillingPeriodUpdatedEvent) SystemEvent

func CreateSystemEventSubscriptionCanceled ¶ added in v0.13.0

func CreateSystemEventSubscriptionCanceled(subscriptionCanceled SubscriptionCanceledEvent) SystemEvent

func CreateSystemEventSubscriptionCreated ¶ added in v0.13.0

func CreateSystemEventSubscriptionCreated(subscriptionCreated SubscriptionCreatedEvent) SystemEvent

func CreateSystemEventSubscriptionCycled ¶ added in v0.8.4

func CreateSystemEventSubscriptionCycled(subscriptionCycled SubscriptionCycledEvent) SystemEvent

func CreateSystemEventSubscriptionProductUpdated ¶ added in v0.8.4

func CreateSystemEventSubscriptionProductUpdated(subscriptionProductUpdated SubscriptionProductUpdatedEvent) SystemEvent

func CreateSystemEventSubscriptionRevoked ¶ added in v0.8.4

func CreateSystemEventSubscriptionRevoked(subscriptionRevoked SubscriptionRevokedEvent) SystemEvent

func CreateSystemEventSubscriptionSeatsUpdated ¶ added in v0.13.0

func CreateSystemEventSubscriptionSeatsUpdated(subscriptionSeatsUpdated SubscriptionSeatsUpdatedEvent) SystemEvent

func CreateSystemEventSubscriptionUncanceled ¶ added in v0.13.0

func CreateSystemEventSubscriptionUncanceled(subscriptionUncanceled SubscriptionUncanceledEvent) SystemEvent

func CreateSystemEventSubscriptionUpdated ¶ added in v0.15.1

func CreateSystemEventSubscriptionUpdated(subscriptionUpdated SubscriptionUpdatedEvent) SystemEvent

func (SystemEvent) MarshalJSON ¶ added in v0.4.20

func (u SystemEvent) MarshalJSON() ([]byte, error)

func (*SystemEvent) UnmarshalJSON ¶ added in v0.4.20

func (u *SystemEvent) UnmarshalJSON(data []byte) error

type SystemEventType ¶ added in v0.4.20

type SystemEventType string
const (
	SystemEventTypeBalanceCreditOrder               SystemEventType = "balance.credit_order"
	SystemEventTypeBalanceDispute                   SystemEventType = "balance.dispute"
	SystemEventTypeBalanceDisputeReversal           SystemEventType = "balance.dispute_reversal"
	SystemEventTypeBalanceOrder                     SystemEventType = "balance.order"
	SystemEventTypeBalanceRefund                    SystemEventType = "balance.refund"
	SystemEventTypeBalanceRefundReversal            SystemEventType = "balance.refund_reversal"
	SystemEventTypeBenefitCycled                    SystemEventType = "benefit.cycled"
	SystemEventTypeBenefitGranted                   SystemEventType = "benefit.granted"
	SystemEventTypeBenefitRevoked                   SystemEventType = "benefit.revoked"
	SystemEventTypeBenefitUpdated                   SystemEventType = "benefit.updated"
	SystemEventTypeCheckoutCreated                  SystemEventType = "checkout.created"
	SystemEventTypeCustomerCreated                  SystemEventType = "customer.created"
	SystemEventTypeCustomerDeleted                  SystemEventType = "customer.deleted"
	SystemEventTypeCustomerUpdated                  SystemEventType = "customer.updated"
	SystemEventTypeMeterCredited                    SystemEventType = "meter.credited"
	SystemEventTypeMeterReset                       SystemEventType = "meter.reset"
	SystemEventTypeOrderPaid                        SystemEventType = "order.paid"
	SystemEventTypeOrderRefunded                    SystemEventType = "order.refunded"
	SystemEventTypeOrderVoided                      SystemEventType = "order.voided"
	SystemEventTypeSubscriptionBillingPeriodUpdated SystemEventType = "subscription.billing_period_updated"
	SystemEventTypeSubscriptionCanceled             SystemEventType = "subscription.canceled"
	SystemEventTypeSubscriptionCreated              SystemEventType = "subscription.created"
	SystemEventTypeSubscriptionCycled               SystemEventType = "subscription.cycled"
	SystemEventTypeSubscriptionProductUpdated       SystemEventType = "subscription.product_updated"
	SystemEventTypeSubscriptionRevoked              SystemEventType = "subscription.revoked"
	SystemEventTypeSubscriptionSeatsUpdated         SystemEventType = "subscription.seats_updated"
	SystemEventTypeSubscriptionUncanceled           SystemEventType = "subscription.uncanceled"
	SystemEventTypeSubscriptionUpdated              SystemEventType = "subscription.updated"
)

type TaxBehaviorOption ¶ added in v0.15.1

type TaxBehaviorOption string
const (
	TaxBehaviorOptionLocation  TaxBehaviorOption = "location"
	TaxBehaviorOptionInclusive TaxBehaviorOption = "inclusive"
	TaxBehaviorOptionExclusive TaxBehaviorOption = "exclusive"
)

func (TaxBehaviorOption) ToPointer ¶ added in v0.15.1

func (e TaxBehaviorOption) ToPointer() *TaxBehaviorOption

func (*TaxBehaviorOption) UnmarshalJSON ¶ added in v0.15.1

func (e *TaxBehaviorOption) UnmarshalJSON(data []byte) error

type TaxID ¶

type TaxID struct {
	Str         *string      `queryParam:"inline" union:"member"`
	TaxIDFormat *TaxIDFormat `queryParam:"inline" union:"member"`

	Type TaxIDType
}

func CreateTaxIDStr ¶

func CreateTaxIDStr(str string) TaxID

func CreateTaxIDTaxIDFormat ¶

func CreateTaxIDTaxIDFormat(taxIDFormat TaxIDFormat) TaxID

func (TaxID) MarshalJSON ¶

func (u TaxID) MarshalJSON() ([]byte, error)

func (*TaxID) UnmarshalJSON ¶

func (u *TaxID) UnmarshalJSON(data []byte) error

type TaxIDFormat ¶

type TaxIDFormat string

TaxIDFormat - List of supported tax ID formats.

Ref: https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id

const (
	TaxIDFormatAdNrt    TaxIDFormat = "ad_nrt"
	TaxIDFormatAeTrn    TaxIDFormat = "ae_trn"
	TaxIDFormatArCuit   TaxIDFormat = "ar_cuit"
	TaxIDFormatAuAbn    TaxIDFormat = "au_abn"
	TaxIDFormatAuArn    TaxIDFormat = "au_arn"
	TaxIDFormatBgUic    TaxIDFormat = "bg_uic"
	TaxIDFormatBhVat    TaxIDFormat = "bh_vat"
	TaxIDFormatBoTin    TaxIDFormat = "bo_tin"
	TaxIDFormatBrCnpj   TaxIDFormat = "br_cnpj"
	TaxIDFormatBrCpf    TaxIDFormat = "br_cpf"
	TaxIDFormatCaBn     TaxIDFormat = "ca_bn"
	TaxIDFormatCaGstHst TaxIDFormat = "ca_gst_hst"
	TaxIDFormatCaPstBc  TaxIDFormat = "ca_pst_bc"
	TaxIDFormatCaPstMb  TaxIDFormat = "ca_pst_mb"
	TaxIDFormatCaPstSk  TaxIDFormat = "ca_pst_sk"
	TaxIDFormatCaQst    TaxIDFormat = "ca_qst"
	TaxIDFormatChUID    TaxIDFormat = "ch_uid"
	TaxIDFormatChVat    TaxIDFormat = "ch_vat"
	TaxIDFormatClTin    TaxIDFormat = "cl_tin"
	TaxIDFormatCnTin    TaxIDFormat = "cn_tin"
	TaxIDFormatCoNit    TaxIDFormat = "co_nit"
	TaxIDFormatCrTin    TaxIDFormat = "cr_tin"
	TaxIDFormatDeStn    TaxIDFormat = "de_stn"
	TaxIDFormatDoRcn    TaxIDFormat = "do_rcn"
	TaxIDFormatEcRuc    TaxIDFormat = "ec_ruc"
	TaxIDFormatEgTin    TaxIDFormat = "eg_tin"
	TaxIDFormatEsCif    TaxIDFormat = "es_cif"
	TaxIDFormatEuOssVat TaxIDFormat = "eu_oss_vat"
	TaxIDFormatEuVat    TaxIDFormat = "eu_vat"
	TaxIDFormatGbVat    TaxIDFormat = "gb_vat"
	TaxIDFormatGeVat    TaxIDFormat = "ge_vat"
	TaxIDFormatHkBr     TaxIDFormat = "hk_br"
	TaxIDFormatHrOib    TaxIDFormat = "hr_oib"
	TaxIDFormatHuTin    TaxIDFormat = "hu_tin"
	TaxIDFormatIDNpwp   TaxIDFormat = "id_npwp"
	TaxIDFormatIlVat    TaxIDFormat = "il_vat"
	TaxIDFormatInGst    TaxIDFormat = "in_gst"
	TaxIDFormatIsVat    TaxIDFormat = "is_vat"
	TaxIDFormatJpCn     TaxIDFormat = "jp_cn"
	TaxIDFormatJpRn     TaxIDFormat = "jp_rn"
	TaxIDFormatJpTrn    TaxIDFormat = "jp_trn"
	TaxIDFormatKePin    TaxIDFormat = "ke_pin"
	TaxIDFormatKrBrn    TaxIDFormat = "kr_brn"
	TaxIDFormatKzBin    TaxIDFormat = "kz_bin"
	TaxIDFormatLiUID    TaxIDFormat = "li_uid"
	TaxIDFormatMkVat    TaxIDFormat = "mk_vat"
	TaxIDFormatMxRfc    TaxIDFormat = "mx_rfc"
	TaxIDFormatMyFrp    TaxIDFormat = "my_frp"
	TaxIDFormatMyItn    TaxIDFormat = "my_itn"
	TaxIDFormatMySst    TaxIDFormat = "my_sst"
	TaxIDFormatNgTin    TaxIDFormat = "ng_tin"
	TaxIDFormatNoVat    TaxIDFormat = "no_vat"
	TaxIDFormatNoVoec   TaxIDFormat = "no_voec"
	TaxIDFormatNzGst    TaxIDFormat = "nz_gst"
	TaxIDFormatOmVat    TaxIDFormat = "om_vat"
	TaxIDFormatPeRuc    TaxIDFormat = "pe_ruc"
	TaxIDFormatPhTin    TaxIDFormat = "ph_tin"
	TaxIDFormatRoTin    TaxIDFormat = "ro_tin"
	TaxIDFormatRsPib    TaxIDFormat = "rs_pib"
	TaxIDFormatRuInn    TaxIDFormat = "ru_inn"
	TaxIDFormatRuKpp    TaxIDFormat = "ru_kpp"
	TaxIDFormatSaVat    TaxIDFormat = "sa_vat"
	TaxIDFormatSgGst    TaxIDFormat = "sg_gst"
	TaxIDFormatSgUen    TaxIDFormat = "sg_uen"
	TaxIDFormatSiTin    TaxIDFormat = "si_tin"
	TaxIDFormatSvNit    TaxIDFormat = "sv_nit"
	TaxIDFormatThVat    TaxIDFormat = "th_vat"
	TaxIDFormatTrTin    TaxIDFormat = "tr_tin"
	TaxIDFormatTwVat    TaxIDFormat = "tw_vat"
	TaxIDFormatUaVat    TaxIDFormat = "ua_vat"
	TaxIDFormatUsEin    TaxIDFormat = "us_ein"
	TaxIDFormatUyRuc    TaxIDFormat = "uy_ruc"
	TaxIDFormatVeRif    TaxIDFormat = "ve_rif"
	TaxIDFormatVnTin    TaxIDFormat = "vn_tin"
	TaxIDFormatZaVat    TaxIDFormat = "za_vat"
)

func (TaxIDFormat) ToPointer ¶

func (e TaxIDFormat) ToPointer() *TaxIDFormat

func (*TaxIDFormat) UnmarshalJSON ¶

func (e *TaxIDFormat) UnmarshalJSON(data []byte) error

type TaxIDType ¶

type TaxIDType string
const (
	TaxIDTypeStr         TaxIDType = "str"
	TaxIDTypeTaxIDFormat TaxIDType = "TaxIDFormat"
)

type TimeInterval ¶ added in v0.1.8

type TimeInterval string
const (
	TimeIntervalYear  TimeInterval = "year"
	TimeIntervalMonth TimeInterval = "month"
	TimeIntervalWeek  TimeInterval = "week"
	TimeIntervalDay   TimeInterval = "day"
	TimeIntervalHour  TimeInterval = "hour"
)

func (TimeInterval) ToPointer ¶ added in v0.1.8

func (e TimeInterval) ToPointer() *TimeInterval

func (*TimeInterval) UnmarshalJSON ¶ added in v0.1.8

func (e *TimeInterval) UnmarshalJSON(data []byte) error

type Timeframe ¶

type Timeframe string
const (
	TimeframeYear  Timeframe = "year"
	TimeframeMonth Timeframe = "month"
	TimeframeDay   Timeframe = "day"
)

func (Timeframe) ToPointer ¶

func (e Timeframe) ToPointer() *Timeframe

func (*Timeframe) UnmarshalJSON ¶

func (e *Timeframe) UnmarshalJSON(data []byte) error

type TokenEndpointAuthMethod ¶

type TokenEndpointAuthMethod string
const (
	TokenEndpointAuthMethodClientSecretBasic TokenEndpointAuthMethod = "client_secret_basic"
	TokenEndpointAuthMethodClientSecretPost  TokenEndpointAuthMethod = "client_secret_post"
	TokenEndpointAuthMethodNone              TokenEndpointAuthMethod = "none"
)

func (TokenEndpointAuthMethod) ToPointer ¶

func (*TokenEndpointAuthMethod) UnmarshalJSON ¶

func (e *TokenEndpointAuthMethod) UnmarshalJSON(data []byte) error

type TokenResponse ¶

type TokenResponse struct {
	AccessToken string `json:"access_token"`

	ExpiresIn    int64   `json:"expires_in"`
	RefreshToken *string `json:"refresh_token,omitempty"`
	Scope        string  `json:"scope"`
	IDToken      *string `json:"id_token,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenResponse) GetAccessToken ¶

func (t *TokenResponse) GetAccessToken() string

func (*TokenResponse) GetExpiresIn ¶

func (t *TokenResponse) GetExpiresIn() int64

func (*TokenResponse) GetIDToken ¶

func (t *TokenResponse) GetIDToken() *string

func (*TokenResponse) GetRefreshToken ¶

func (t *TokenResponse) GetRefreshToken() *string

func (*TokenResponse) GetScope ¶

func (t *TokenResponse) GetScope() string

func (*TokenResponse) GetTokenType ¶

func (t *TokenResponse) GetTokenType() string

func (TokenResponse) MarshalJSON ¶

func (t TokenResponse) MarshalJSON() ([]byte, error)

func (*TokenResponse) UnmarshalJSON ¶

func (t *TokenResponse) UnmarshalJSON(data []byte) error

type TokenType ¶

type TokenType string
const (
	TokenTypeAccessToken  TokenType = "access_token"
	TokenTypeRefreshToken TokenType = "refresh_token"
)

func (TokenType) ToPointer ¶

func (e TokenType) ToPointer() *TokenType

func (*TokenType) UnmarshalJSON ¶

func (e *TokenType) UnmarshalJSON(data []byte) error

type TokenTypeHint ¶ added in v0.3.0

type TokenTypeHint string
const (
	TokenTypeHintAccessToken  TokenTypeHint = "access_token"
	TokenTypeHintRefreshToken TokenTypeHint = "refresh_token"
)

func (TokenTypeHint) ToPointer ¶ added in v0.3.0

func (e TokenTypeHint) ToPointer() *TokenTypeHint

func (*TokenTypeHint) UnmarshalJSON ¶ added in v0.3.0

func (e *TokenTypeHint) UnmarshalJSON(data []byte) error

type TrialAlreadyRedeemed ¶ added in v0.13.0

type TrialAlreadyRedeemed struct {
	Detail string `json:"detail"`
	// contains filtered or unexported fields
}

func (*TrialAlreadyRedeemed) GetDetail ¶ added in v0.13.0

func (t *TrialAlreadyRedeemed) GetDetail() string

func (*TrialAlreadyRedeemed) GetError ¶ added in v0.13.0

func (t *TrialAlreadyRedeemed) GetError() string

func (TrialAlreadyRedeemed) MarshalJSON ¶ added in v0.13.0

func (t TrialAlreadyRedeemed) MarshalJSON() ([]byte, error)

func (*TrialAlreadyRedeemed) UnmarshalJSON ¶ added in v0.13.0

func (t *TrialAlreadyRedeemed) UnmarshalJSON(data []byte) error

type TrialInterval ¶ added in v0.9.1

type TrialInterval string
const (
	TrialIntervalDay   TrialInterval = "day"
	TrialIntervalWeek  TrialInterval = "week"
	TrialIntervalMonth TrialInterval = "month"
	TrialIntervalYear  TrialInterval = "year"
)

func (TrialInterval) ToPointer ¶ added in v0.9.1

func (e TrialInterval) ToPointer() *TrialInterval

func (*TrialInterval) UnmarshalJSON ¶ added in v0.9.1

func (e *TrialInterval) UnmarshalJSON(data []byte) error

type Two ¶ added in v0.10.1

type Two struct {
	ProductPriceFixedCreate       *ProductPriceFixedCreate       `queryParam:"inline" union:"member"`
	ProductPriceCustomCreate      *ProductPriceCustomCreate      `queryParam:"inline" union:"member"`
	ProductPriceFreeCreate        *ProductPriceFreeCreate        `queryParam:"inline" union:"member"`
	ProductPriceSeatBasedCreate   *ProductPriceSeatBasedCreate   `queryParam:"inline" union:"member"`
	ProductPriceMeteredUnitCreate *ProductPriceMeteredUnitCreate `queryParam:"inline" union:"member"`

	Type TwoType
}

func CreateTwoCustom ¶ added in v0.10.1

func CreateTwoCustom(custom ProductPriceCustomCreate) Two

func CreateTwoFixed ¶ added in v0.10.1

func CreateTwoFixed(fixed ProductPriceFixedCreate) Two

func CreateTwoFree ¶ added in v0.10.1

func CreateTwoFree(free ProductPriceFreeCreate) Two

func CreateTwoMeteredUnit ¶ added in v0.10.1

func CreateTwoMeteredUnit(meteredUnit ProductPriceMeteredUnitCreate) Two

func CreateTwoSeatBased ¶ added in v0.10.1

func CreateTwoSeatBased(seatBased ProductPriceSeatBasedCreate) Two

func (Two) MarshalJSON ¶ added in v0.10.1

func (u Two) MarshalJSON() ([]byte, error)

func (*Two) UnmarshalJSON ¶ added in v0.10.1

func (u *Two) UnmarshalJSON(data []byte) error

type TwoType ¶ added in v0.10.1

type TwoType string
const (
	TwoTypeCustom      TwoType = "custom"
	TwoTypeFixed       TwoType = "fixed"
	TwoTypeFree        TwoType = "free"
	TwoTypeMeteredUnit TwoType = "metered_unit"
	TwoTypeSeatBased   TwoType = "seat_based"
)

type UniqueAggregation ¶ added in v0.8.3

type UniqueAggregation struct {
	Property string `json:"property"`
	// contains filtered or unexported fields
}

func (*UniqueAggregation) GetFunc ¶ added in v0.8.3

func (u *UniqueAggregation) GetFunc() *string

func (*UniqueAggregation) GetProperty ¶ added in v0.8.3

func (u *UniqueAggregation) GetProperty() string

func (UniqueAggregation) MarshalJSON ¶ added in v0.8.3

func (u UniqueAggregation) MarshalJSON() ([]byte, error)

func (*UniqueAggregation) UnmarshalJSON ¶ added in v0.8.3

func (u *UniqueAggregation) UnmarshalJSON(data []byte) error

type UnitAmount ¶ added in v0.4.10

type UnitAmount struct {
	Number *float64 `queryParam:"inline" union:"member"`
	Str    *string  `queryParam:"inline" union:"member"`

	Type UnitAmountType
}

UnitAmount - The price per unit in cents. Supports up to 12 decimal places.

func CreateUnitAmountNumber ¶ added in v0.4.10

func CreateUnitAmountNumber(number float64) UnitAmount

func CreateUnitAmountStr ¶ added in v0.4.10

func CreateUnitAmountStr(str string) UnitAmount

func (UnitAmount) MarshalJSON ¶ added in v0.4.10

func (u UnitAmount) MarshalJSON() ([]byte, error)

func (*UnitAmount) UnmarshalJSON ¶ added in v0.4.10

func (u *UnitAmount) UnmarshalJSON(data []byte) error

type UnitAmountType ¶ added in v0.4.10

type UnitAmountType string
const (
	UnitAmountTypeNumber UnitAmountType = "number"
	UnitAmountTypeStr    UnitAmountType = "str"
)

type UserEvent ¶ added in v0.4.20

type UserEvent struct {
	// The ID of the object.
	ID string `json:"id"`
	// The timestamp of the event.
	Timestamp time.Time `json:"timestamp"`
	// The ID of the organization owning the event.
	OrganizationID string `json:"organization_id"`
	// ID of the customer in your Polar organization associated with the event.
	CustomerID *string `json:"customer_id"`
	// The customer associated with the event.
	Customer *Customer `json:"customer"`
	// ID of the customer in your system associated with the event.
	ExternalCustomerID *string `json:"external_customer_id"`
	// ID of the member within the customer's organization who performed the action inside B2B.
	MemberID *string `json:"member_id,omitempty"`
	// ID of the member in your system within the customer's organization who performed the action inside B2B.
	ExternalMemberID *string `json:"external_member_id,omitempty"`
	// Number of direct child events linked to this event.
	ChildCount *int64 `default:"0" json:"child_count"`
	// The ID of the parent event.
	ParentID *string `json:"parent_id,omitempty"`
	// Human readable label of the event type.
	Label string `json:"label"`
	// The name of the event.
	Name string `json:"name"`

	Metadata map[string]EventMetadataOutput `json:"metadata"`
	// contains filtered or unexported fields
}

UserEvent - An event you created through the ingestion API.

func (*UserEvent) GetChildCount ¶ added in v0.12.0

func (u *UserEvent) GetChildCount() *int64

func (*UserEvent) GetCustomer ¶ added in v0.4.20

func (u *UserEvent) GetCustomer() *Customer

func (*UserEvent) GetCustomerID ¶ added in v0.4.20

func (u *UserEvent) GetCustomerID() *string

func (*UserEvent) GetCustomerIndividual ¶ added in v0.16.0

func (u *UserEvent) GetCustomerIndividual() *CustomerIndividual

func (*UserEvent) GetCustomerTeam ¶ added in v0.16.0

func (u *UserEvent) GetCustomerTeam() *CustomerTeam

func (*UserEvent) GetExternalCustomerID ¶ added in v0.4.20

func (u *UserEvent) GetExternalCustomerID() *string

func (*UserEvent) GetExternalMemberID ¶ added in v0.13.0

func (u *UserEvent) GetExternalMemberID() *string

func (*UserEvent) GetID ¶ added in v0.4.20

func (u *UserEvent) GetID() string

func (*UserEvent) GetLabel ¶ added in v0.13.0

func (u *UserEvent) GetLabel() string

func (*UserEvent) GetMemberID ¶ added in v0.13.0

func (u *UserEvent) GetMemberID() *string

func (*UserEvent) GetMetadata ¶ added in v0.4.20

func (u *UserEvent) GetMetadata() map[string]EventMetadataOutput

func (*UserEvent) GetName ¶ added in v0.4.20

func (u *UserEvent) GetName() string

func (*UserEvent) GetOrganizationID ¶ added in v0.4.20

func (u *UserEvent) GetOrganizationID() string

func (*UserEvent) GetParentID ¶ added in v0.13.0

func (u *UserEvent) GetParentID() *string

func (*UserEvent) GetSource ¶ added in v0.4.20

func (u *UserEvent) GetSource() string

func (*UserEvent) GetTimestamp ¶ added in v0.4.20

func (u *UserEvent) GetTimestamp() time.Time

func (UserEvent) MarshalJSON ¶ added in v0.4.20

func (u UserEvent) MarshalJSON() ([]byte, error)

func (*UserEvent) UnmarshalJSON ¶ added in v0.4.20

func (u *UserEvent) UnmarshalJSON(data []byte) error

type UserInfoOrganization ¶

type UserInfoOrganization struct {
	Sub  string  `json:"sub"`
	Name *string `json:"name,omitempty"`
}

func (*UserInfoOrganization) GetName ¶

func (u *UserInfoOrganization) GetName() *string

func (*UserInfoOrganization) GetSub ¶

func (u *UserInfoOrganization) GetSub() string

func (UserInfoOrganization) MarshalJSON ¶ added in v0.8.4

func (u UserInfoOrganization) MarshalJSON() ([]byte, error)

func (*UserInfoOrganization) UnmarshalJSON ¶ added in v0.8.4

func (u *UserInfoOrganization) UnmarshalJSON(data []byte) error

type UserInfoUser ¶

type UserInfoUser struct {
	Sub           string  `json:"sub"`
	Name          *string `json:"name,omitempty"`
	Email         *string `json:"email,omitempty"`
	EmailVerified *bool   `json:"email_verified,omitempty"`
}

func (*UserInfoUser) GetEmail ¶

func (u *UserInfoUser) GetEmail() *string

func (*UserInfoUser) GetEmailVerified ¶

func (u *UserInfoUser) GetEmailVerified() *bool

func (*UserInfoUser) GetName ¶

func (u *UserInfoUser) GetName() *string

func (*UserInfoUser) GetSub ¶

func (u *UserInfoUser) GetSub() string

func (UserInfoUser) MarshalJSON ¶ added in v0.8.4

func (u UserInfoUser) MarshalJSON() ([]byte, error)

func (*UserInfoUser) UnmarshalJSON ¶ added in v0.8.4

func (u *UserInfoUser) UnmarshalJSON(data []byte) error

type ValidatedLicenseKey ¶

type ValidatedLicenseKey struct {
	// The ID of the object.
	ID string `json:"id"`
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt     *time.Time         `json:"modified_at"`
	OrganizationID string             `json:"organization_id"`
	CustomerID     string             `json:"customer_id"`
	Customer       LicenseKeyCustomer `json:"customer"`
	// The benefit ID.
	BenefitID        string                    `json:"benefit_id"`
	Key              string                    `json:"key"`
	DisplayKey       string                    `json:"display_key"`
	Status           LicenseKeyStatus          `json:"status"`
	LimitActivations *int64                    `json:"limit_activations"`
	Usage            int64                     `json:"usage"`
	LimitUsage       *int64                    `json:"limit_usage"`
	Validations      int64                     `json:"validations"`
	LastValidatedAt  *time.Time                `json:"last_validated_at"`
	ExpiresAt        *time.Time                `json:"expires_at"`
	Activation       *LicenseKeyActivationBase `json:"activation,omitempty"`
}

func (*ValidatedLicenseKey) GetActivation ¶

func (v *ValidatedLicenseKey) GetActivation() *LicenseKeyActivationBase

func (*ValidatedLicenseKey) GetBenefitID ¶

func (v *ValidatedLicenseKey) GetBenefitID() string

func (*ValidatedLicenseKey) GetCreatedAt ¶ added in v0.4.16

func (v *ValidatedLicenseKey) GetCreatedAt() time.Time

func (*ValidatedLicenseKey) GetCustomer ¶

func (v *ValidatedLicenseKey) GetCustomer() LicenseKeyCustomer

func (*ValidatedLicenseKey) GetCustomerID ¶

func (v *ValidatedLicenseKey) GetCustomerID() string

func (*ValidatedLicenseKey) GetDisplayKey ¶

func (v *ValidatedLicenseKey) GetDisplayKey() string

func (*ValidatedLicenseKey) GetExpiresAt ¶

func (v *ValidatedLicenseKey) GetExpiresAt() *time.Time

func (*ValidatedLicenseKey) GetID ¶

func (v *ValidatedLicenseKey) GetID() string

func (*ValidatedLicenseKey) GetKey ¶

func (v *ValidatedLicenseKey) GetKey() string

func (*ValidatedLicenseKey) GetLastValidatedAt ¶

func (v *ValidatedLicenseKey) GetLastValidatedAt() *time.Time

func (*ValidatedLicenseKey) GetLimitActivations ¶

func (v *ValidatedLicenseKey) GetLimitActivations() *int64

func (*ValidatedLicenseKey) GetLimitUsage ¶

func (v *ValidatedLicenseKey) GetLimitUsage() *int64

func (*ValidatedLicenseKey) GetModifiedAt ¶ added in v0.4.16

func (v *ValidatedLicenseKey) GetModifiedAt() *time.Time

func (*ValidatedLicenseKey) GetOrganizationID ¶

func (v *ValidatedLicenseKey) GetOrganizationID() string

func (*ValidatedLicenseKey) GetStatus ¶

func (v *ValidatedLicenseKey) GetStatus() LicenseKeyStatus

func (*ValidatedLicenseKey) GetUsage ¶

func (v *ValidatedLicenseKey) GetUsage() int64

func (*ValidatedLicenseKey) GetValidations ¶

func (v *ValidatedLicenseKey) GetValidations() int64

func (ValidatedLicenseKey) MarshalJSON ¶

func (v ValidatedLicenseKey) MarshalJSON() ([]byte, error)

func (*ValidatedLicenseKey) UnmarshalJSON ¶

func (v *ValidatedLicenseKey) UnmarshalJSON(data []byte) error

type ValidationError ¶

type ValidationError struct {
	Loc   []Loc    `json:"loc"`
	Msg   string   `json:"msg"`
	Type  string   `json:"type"`
	Input any      `json:"input,omitempty"`
	Ctx   *Context `json:"ctx,omitempty"`
}

func (*ValidationError) GetCtx ¶ added in v0.13.0

func (v *ValidationError) GetCtx() *Context

func (*ValidationError) GetInput ¶ added in v0.13.0

func (v *ValidationError) GetInput() any

func (*ValidationError) GetLoc ¶

func (v *ValidationError) GetLoc() []Loc

func (*ValidationError) GetMsg ¶

func (v *ValidationError) GetMsg() string

func (*ValidationError) GetType ¶

func (v *ValidationError) GetType() string

type Value ¶ added in v0.1.8

type Value struct {
	Str     *string `queryParam:"inline" union:"member"`
	Integer *int64  `queryParam:"inline" union:"member"`
	Boolean *bool   `queryParam:"inline" union:"member"`

	Type ValueType
}

func CreateValueBoolean ¶ added in v0.1.8

func CreateValueBoolean(boolean bool) Value

func CreateValueInteger ¶ added in v0.1.8

func CreateValueInteger(integer int64) Value

func CreateValueStr ¶ added in v0.1.8

func CreateValueStr(str string) Value

func (Value) MarshalJSON ¶ added in v0.1.8

func (u Value) MarshalJSON() ([]byte, error)

func (*Value) UnmarshalJSON ¶ added in v0.1.8

func (u *Value) UnmarshalJSON(data []byte) error

type ValueType ¶ added in v0.1.8

type ValueType string
const (
	ValueTypeStr     ValueType = "str"
	ValueTypeInteger ValueType = "integer"
	ValueTypeBoolean ValueType = "boolean"
)

type WebTokenRequest ¶ added in v0.10.1

type WebTokenRequest struct {
	ClientID     string                  `form:"name=client_id"`
	ClientSecret string                  `form:"name=client_secret"`
	SessionToken string                  `form:"name=session_token"`
	SubType      *WebTokenRequestSubType `default:"user" form:"name=sub_type"`
	Sub          *string                 `form:"name=sub"`
	Scope        *string                 `form:"name=scope"`
	// contains filtered or unexported fields
}

func (*WebTokenRequest) GetClientID ¶ added in v0.10.1

func (w *WebTokenRequest) GetClientID() string

func (*WebTokenRequest) GetClientSecret ¶ added in v0.10.1

func (w *WebTokenRequest) GetClientSecret() string

func (*WebTokenRequest) GetGrantType ¶ added in v0.10.1

func (w *WebTokenRequest) GetGrantType() string

func (*WebTokenRequest) GetScope ¶ added in v0.10.1

func (w *WebTokenRequest) GetScope() *string

func (*WebTokenRequest) GetSessionToken ¶ added in v0.10.1

func (w *WebTokenRequest) GetSessionToken() string

func (*WebTokenRequest) GetSub ¶ added in v0.10.1

func (w *WebTokenRequest) GetSub() *string

func (*WebTokenRequest) GetSubType ¶ added in v0.10.1

func (w *WebTokenRequest) GetSubType() *WebTokenRequestSubType

func (WebTokenRequest) MarshalJSON ¶ added in v0.10.1

func (w WebTokenRequest) MarshalJSON() ([]byte, error)

func (*WebTokenRequest) UnmarshalJSON ¶ added in v0.10.1

func (w *WebTokenRequest) UnmarshalJSON(data []byte) error

type WebTokenRequestSubType ¶ added in v0.10.1

type WebTokenRequestSubType string
const (
	WebTokenRequestSubTypeUser         WebTokenRequestSubType = "user"
	WebTokenRequestSubTypeOrganization WebTokenRequestSubType = "organization"
)

func (WebTokenRequestSubType) ToPointer ¶ added in v0.10.1

func (*WebTokenRequestSubType) UnmarshalJSON ¶ added in v0.10.1

func (e *WebTokenRequestSubType) UnmarshalJSON(data []byte) error

type WebhookBenefitCreatedPayload ¶

type WebhookBenefitCreatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	Data      Benefit   `json:"data"`
	// contains filtered or unexported fields
}

WebhookBenefitCreatedPayload - Sent when a new benefit is created.

**Discord & Slack support:** Basic

func (*WebhookBenefitCreatedPayload) GetData ¶

func (*WebhookBenefitCreatedPayload) GetDataCustom ¶ added in v0.13.0

func (w *WebhookBenefitCreatedPayload) GetDataCustom() *BenefitCustom

func (*WebhookBenefitCreatedPayload) GetDataDiscord ¶ added in v0.13.0

func (w *WebhookBenefitCreatedPayload) GetDataDiscord() *BenefitDiscord

func (*WebhookBenefitCreatedPayload) GetDataDownloadables ¶ added in v0.13.0

func (w *WebhookBenefitCreatedPayload) GetDataDownloadables() *BenefitDownloadables

func (*WebhookBenefitCreatedPayload) GetDataFeatureFlag ¶ added in v0.15.0

func (w *WebhookBenefitCreatedPayload) GetDataFeatureFlag() *BenefitFeatureFlag

func (*WebhookBenefitCreatedPayload) GetDataGithubRepository ¶ added in v0.13.0

func (w *WebhookBenefitCreatedPayload) GetDataGithubRepository() *BenefitGitHubRepository

func (*WebhookBenefitCreatedPayload) GetDataLicenseKeys ¶ added in v0.13.0

func (w *WebhookBenefitCreatedPayload) GetDataLicenseKeys() *BenefitLicenseKeys

func (*WebhookBenefitCreatedPayload) GetDataMeterCredit ¶ added in v0.13.0

func (w *WebhookBenefitCreatedPayload) GetDataMeterCredit() *BenefitMeterCredit

func (*WebhookBenefitCreatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookBenefitCreatedPayload) GetTimestamp() time.Time

func (*WebhookBenefitCreatedPayload) GetType ¶

func (w *WebhookBenefitCreatedPayload) GetType() string

func (WebhookBenefitCreatedPayload) MarshalJSON ¶

func (w WebhookBenefitCreatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookBenefitCreatedPayload) UnmarshalJSON ¶

func (w *WebhookBenefitCreatedPayload) UnmarshalJSON(data []byte) error

type WebhookBenefitGrantCreatedPayload ¶

type WebhookBenefitGrantCreatedPayload struct {
	Timestamp time.Time           `json:"timestamp"`
	Data      BenefitGrantWebhook `json:"data"`
	// contains filtered or unexported fields
}

WebhookBenefitGrantCreatedPayload - Sent when a new benefit grant is created.

**Discord & Slack support:** Basic

func (*WebhookBenefitGrantCreatedPayload) GetData ¶

func (*WebhookBenefitGrantCreatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookBenefitGrantCreatedPayload) GetTimestamp() time.Time

func (*WebhookBenefitGrantCreatedPayload) GetType ¶

func (WebhookBenefitGrantCreatedPayload) MarshalJSON ¶

func (w WebhookBenefitGrantCreatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookBenefitGrantCreatedPayload) UnmarshalJSON ¶

func (w *WebhookBenefitGrantCreatedPayload) UnmarshalJSON(data []byte) error

type WebhookBenefitGrantCycledPayload ¶ added in v0.4.9

type WebhookBenefitGrantCycledPayload struct {
	Timestamp time.Time           `json:"timestamp"`
	Data      BenefitGrantWebhook `json:"data"`
	// contains filtered or unexported fields
}

WebhookBenefitGrantCycledPayload - Sent when a benefit grant is cycled, meaning the related subscription has been renewed for another period.

**Discord & Slack support:** Basic

func (*WebhookBenefitGrantCycledPayload) GetData ¶ added in v0.4.9

func (*WebhookBenefitGrantCycledPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookBenefitGrantCycledPayload) GetTimestamp() time.Time

func (*WebhookBenefitGrantCycledPayload) GetType ¶ added in v0.4.9

func (WebhookBenefitGrantCycledPayload) MarshalJSON ¶ added in v0.4.9

func (w WebhookBenefitGrantCycledPayload) MarshalJSON() ([]byte, error)

func (*WebhookBenefitGrantCycledPayload) UnmarshalJSON ¶ added in v0.4.9

func (w *WebhookBenefitGrantCycledPayload) UnmarshalJSON(data []byte) error

type WebhookBenefitGrantRevokedPayload ¶

type WebhookBenefitGrantRevokedPayload struct {
	Timestamp time.Time           `json:"timestamp"`
	Data      BenefitGrantWebhook `json:"data"`
	// contains filtered or unexported fields
}

WebhookBenefitGrantRevokedPayload - Sent when a benefit grant is revoked.

**Discord & Slack support:** Basic

func (*WebhookBenefitGrantRevokedPayload) GetData ¶

func (*WebhookBenefitGrantRevokedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookBenefitGrantRevokedPayload) GetTimestamp() time.Time

func (*WebhookBenefitGrantRevokedPayload) GetType ¶

func (WebhookBenefitGrantRevokedPayload) MarshalJSON ¶

func (w WebhookBenefitGrantRevokedPayload) MarshalJSON() ([]byte, error)

func (*WebhookBenefitGrantRevokedPayload) UnmarshalJSON ¶

func (w *WebhookBenefitGrantRevokedPayload) UnmarshalJSON(data []byte) error

type WebhookBenefitGrantUpdatedPayload ¶

type WebhookBenefitGrantUpdatedPayload struct {
	Timestamp time.Time           `json:"timestamp"`
	Data      BenefitGrantWebhook `json:"data"`
	// contains filtered or unexported fields
}

WebhookBenefitGrantUpdatedPayload - Sent when a benefit grant is updated.

**Discord & Slack support:** Basic

func (*WebhookBenefitGrantUpdatedPayload) GetData ¶

func (*WebhookBenefitGrantUpdatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookBenefitGrantUpdatedPayload) GetTimestamp() time.Time

func (*WebhookBenefitGrantUpdatedPayload) GetType ¶

func (WebhookBenefitGrantUpdatedPayload) MarshalJSON ¶

func (w WebhookBenefitGrantUpdatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookBenefitGrantUpdatedPayload) UnmarshalJSON ¶

func (w *WebhookBenefitGrantUpdatedPayload) UnmarshalJSON(data []byte) error

type WebhookBenefitUpdatedPayload ¶

type WebhookBenefitUpdatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	Data      Benefit   `json:"data"`
	// contains filtered or unexported fields
}

WebhookBenefitUpdatedPayload - Sent when a benefit is updated.

**Discord & Slack support:** Basic

func (*WebhookBenefitUpdatedPayload) GetData ¶

func (*WebhookBenefitUpdatedPayload) GetDataCustom ¶ added in v0.13.0

func (w *WebhookBenefitUpdatedPayload) GetDataCustom() *BenefitCustom

func (*WebhookBenefitUpdatedPayload) GetDataDiscord ¶ added in v0.13.0

func (w *WebhookBenefitUpdatedPayload) GetDataDiscord() *BenefitDiscord

func (*WebhookBenefitUpdatedPayload) GetDataDownloadables ¶ added in v0.13.0

func (w *WebhookBenefitUpdatedPayload) GetDataDownloadables() *BenefitDownloadables

func (*WebhookBenefitUpdatedPayload) GetDataFeatureFlag ¶ added in v0.15.0

func (w *WebhookBenefitUpdatedPayload) GetDataFeatureFlag() *BenefitFeatureFlag

func (*WebhookBenefitUpdatedPayload) GetDataGithubRepository ¶ added in v0.13.0

func (w *WebhookBenefitUpdatedPayload) GetDataGithubRepository() *BenefitGitHubRepository

func (*WebhookBenefitUpdatedPayload) GetDataLicenseKeys ¶ added in v0.13.0

func (w *WebhookBenefitUpdatedPayload) GetDataLicenseKeys() *BenefitLicenseKeys

func (*WebhookBenefitUpdatedPayload) GetDataMeterCredit ¶ added in v0.13.0

func (w *WebhookBenefitUpdatedPayload) GetDataMeterCredit() *BenefitMeterCredit

func (*WebhookBenefitUpdatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookBenefitUpdatedPayload) GetTimestamp() time.Time

func (*WebhookBenefitUpdatedPayload) GetType ¶

func (w *WebhookBenefitUpdatedPayload) GetType() string

func (WebhookBenefitUpdatedPayload) MarshalJSON ¶

func (w WebhookBenefitUpdatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookBenefitUpdatedPayload) UnmarshalJSON ¶

func (w *WebhookBenefitUpdatedPayload) UnmarshalJSON(data []byte) error

type WebhookCheckoutCreatedPayload ¶

type WebhookCheckoutCreatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	// Checkout session data retrieved using an access token.
	Data Checkout `json:"data"`
	// contains filtered or unexported fields
}

WebhookCheckoutCreatedPayload - Sent when a new checkout is created.

**Discord & Slack support:** Basic

func (*WebhookCheckoutCreatedPayload) GetData ¶

func (*WebhookCheckoutCreatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookCheckoutCreatedPayload) GetTimestamp() time.Time

func (*WebhookCheckoutCreatedPayload) GetType ¶

func (WebhookCheckoutCreatedPayload) MarshalJSON ¶

func (w WebhookCheckoutCreatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookCheckoutCreatedPayload) UnmarshalJSON ¶

func (w *WebhookCheckoutCreatedPayload) UnmarshalJSON(data []byte) error

type WebhookCheckoutExpiredPayload ¶ added in v0.13.0

type WebhookCheckoutExpiredPayload struct {
	Timestamp time.Time `json:"timestamp"`
	// Checkout session data retrieved using an access token.
	Data Checkout `json:"data"`
	// contains filtered or unexported fields
}

WebhookCheckoutExpiredPayload - Sent when a checkout expires.

This event fires when a checkout reaches its expiration time without being completed. Developers can use this to send reminder emails or track checkout abandonment.

**Discord & Slack support:** Basic

func (*WebhookCheckoutExpiredPayload) GetData ¶ added in v0.13.0

func (*WebhookCheckoutExpiredPayload) GetTimestamp ¶ added in v0.13.0

func (w *WebhookCheckoutExpiredPayload) GetTimestamp() time.Time

func (*WebhookCheckoutExpiredPayload) GetType ¶ added in v0.13.0

func (WebhookCheckoutExpiredPayload) MarshalJSON ¶ added in v0.13.0

func (w WebhookCheckoutExpiredPayload) MarshalJSON() ([]byte, error)

func (*WebhookCheckoutExpiredPayload) UnmarshalJSON ¶ added in v0.13.0

func (w *WebhookCheckoutExpiredPayload) UnmarshalJSON(data []byte) error

type WebhookCheckoutUpdatedPayload ¶

type WebhookCheckoutUpdatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	// Checkout session data retrieved using an access token.
	Data Checkout `json:"data"`
	// contains filtered or unexported fields
}

WebhookCheckoutUpdatedPayload - Sent when a checkout is updated.

**Discord & Slack support:** Basic

func (*WebhookCheckoutUpdatedPayload) GetData ¶

func (*WebhookCheckoutUpdatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookCheckoutUpdatedPayload) GetTimestamp() time.Time

func (*WebhookCheckoutUpdatedPayload) GetType ¶

func (WebhookCheckoutUpdatedPayload) MarshalJSON ¶

func (w WebhookCheckoutUpdatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookCheckoutUpdatedPayload) UnmarshalJSON ¶

func (w *WebhookCheckoutUpdatedPayload) UnmarshalJSON(data []byte) error

type WebhookCustomerCreatedPayload ¶ added in v0.4.3

type WebhookCustomerCreatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	Data      Customer  `json:"data"`
	// contains filtered or unexported fields
}

WebhookCustomerCreatedPayload - Sent when a new customer is created.

A customer can be created:

* After a successful checkout. * Programmatically via the API.

**Discord & Slack support:** Basic

func (*WebhookCustomerCreatedPayload) GetData ¶ added in v0.4.3

func (*WebhookCustomerCreatedPayload) GetDataIndividual ¶ added in v0.16.0

func (w *WebhookCustomerCreatedPayload) GetDataIndividual() *CustomerIndividual

func (*WebhookCustomerCreatedPayload) GetDataTeam ¶ added in v0.16.0

func (w *WebhookCustomerCreatedPayload) GetDataTeam() *CustomerTeam

func (*WebhookCustomerCreatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookCustomerCreatedPayload) GetTimestamp() time.Time

func (*WebhookCustomerCreatedPayload) GetType ¶ added in v0.4.3

func (WebhookCustomerCreatedPayload) MarshalJSON ¶ added in v0.4.3

func (w WebhookCustomerCreatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookCustomerCreatedPayload) UnmarshalJSON ¶ added in v0.4.3

func (w *WebhookCustomerCreatedPayload) UnmarshalJSON(data []byte) error

type WebhookCustomerDeletedPayload ¶ added in v0.4.3

type WebhookCustomerDeletedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	Data      Customer  `json:"data"`
	// contains filtered or unexported fields
}

WebhookCustomerDeletedPayload - Sent when a customer is deleted.

**Discord & Slack support:** Basic

func (*WebhookCustomerDeletedPayload) GetData ¶ added in v0.4.3

func (*WebhookCustomerDeletedPayload) GetDataIndividual ¶ added in v0.16.0

func (w *WebhookCustomerDeletedPayload) GetDataIndividual() *CustomerIndividual

func (*WebhookCustomerDeletedPayload) GetDataTeam ¶ added in v0.16.0

func (w *WebhookCustomerDeletedPayload) GetDataTeam() *CustomerTeam

func (*WebhookCustomerDeletedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookCustomerDeletedPayload) GetTimestamp() time.Time

func (*WebhookCustomerDeletedPayload) GetType ¶ added in v0.4.3

func (WebhookCustomerDeletedPayload) MarshalJSON ¶ added in v0.4.3

func (w WebhookCustomerDeletedPayload) MarshalJSON() ([]byte, error)

func (*WebhookCustomerDeletedPayload) UnmarshalJSON ¶ added in v0.4.3

func (w *WebhookCustomerDeletedPayload) UnmarshalJSON(data []byte) error

type WebhookCustomerSeatAssignedPayload ¶ added in v0.12.0

type WebhookCustomerSeatAssignedPayload struct {
	Timestamp time.Time    `json:"timestamp"`
	Data      CustomerSeat `json:"data"`
	// contains filtered or unexported fields
}

WebhookCustomerSeatAssignedPayload - Sent when a new customer seat is assigned.

This event is triggered when a seat is assigned to a customer by the organization. The customer will receive an invitation email to claim the seat.

func (*WebhookCustomerSeatAssignedPayload) GetData ¶ added in v0.12.0

func (*WebhookCustomerSeatAssignedPayload) GetTimestamp ¶ added in v0.12.0

func (w *WebhookCustomerSeatAssignedPayload) GetTimestamp() time.Time

func (*WebhookCustomerSeatAssignedPayload) GetType ¶ added in v0.12.0

func (WebhookCustomerSeatAssignedPayload) MarshalJSON ¶ added in v0.12.0

func (w WebhookCustomerSeatAssignedPayload) MarshalJSON() ([]byte, error)

func (*WebhookCustomerSeatAssignedPayload) UnmarshalJSON ¶ added in v0.12.0

func (w *WebhookCustomerSeatAssignedPayload) UnmarshalJSON(data []byte) error

type WebhookCustomerSeatClaimedPayload ¶ added in v0.12.0

type WebhookCustomerSeatClaimedPayload struct {
	Timestamp time.Time    `json:"timestamp"`
	Data      CustomerSeat `json:"data"`
	// contains filtered or unexported fields
}

WebhookCustomerSeatClaimedPayload - Sent when a customer seat is claimed.

This event is triggered when a customer accepts the seat invitation and claims their access.

func (*WebhookCustomerSeatClaimedPayload) GetData ¶ added in v0.12.0

func (*WebhookCustomerSeatClaimedPayload) GetTimestamp ¶ added in v0.12.0

func (w *WebhookCustomerSeatClaimedPayload) GetTimestamp() time.Time

func (*WebhookCustomerSeatClaimedPayload) GetType ¶ added in v0.12.0

func (WebhookCustomerSeatClaimedPayload) MarshalJSON ¶ added in v0.12.0

func (w WebhookCustomerSeatClaimedPayload) MarshalJSON() ([]byte, error)

func (*WebhookCustomerSeatClaimedPayload) UnmarshalJSON ¶ added in v0.12.0

func (w *WebhookCustomerSeatClaimedPayload) UnmarshalJSON(data []byte) error

type WebhookCustomerSeatRevokedPayload ¶ added in v0.12.0

type WebhookCustomerSeatRevokedPayload struct {
	Timestamp time.Time    `json:"timestamp"`
	Data      CustomerSeat `json:"data"`
	// contains filtered or unexported fields
}

WebhookCustomerSeatRevokedPayload - Sent when a customer seat is revoked.

This event is triggered when access to a seat is revoked, either manually by the organization or automatically when a subscription is canceled.

func (*WebhookCustomerSeatRevokedPayload) GetData ¶ added in v0.12.0

func (*WebhookCustomerSeatRevokedPayload) GetTimestamp ¶ added in v0.12.0

func (w *WebhookCustomerSeatRevokedPayload) GetTimestamp() time.Time

func (*WebhookCustomerSeatRevokedPayload) GetType ¶ added in v0.12.0

func (WebhookCustomerSeatRevokedPayload) MarshalJSON ¶ added in v0.12.0

func (w WebhookCustomerSeatRevokedPayload) MarshalJSON() ([]byte, error)

func (*WebhookCustomerSeatRevokedPayload) UnmarshalJSON ¶ added in v0.12.0

func (w *WebhookCustomerSeatRevokedPayload) UnmarshalJSON(data []byte) error

type WebhookCustomerStateChangedPayload ¶ added in v0.4.3

type WebhookCustomerStateChangedPayload struct {
	Timestamp time.Time     `json:"timestamp"`
	Data      CustomerState `json:"data"`
	// contains filtered or unexported fields
}

WebhookCustomerStateChangedPayload - Sent when a customer state has changed.

It's triggered when:

* Customer is created, updated or deleted. * A subscription is created or updated. * A benefit is granted or revoked.

**Discord & Slack support:** Basic

func (*WebhookCustomerStateChangedPayload) GetData ¶ added in v0.4.3

func (*WebhookCustomerStateChangedPayload) GetDataIndividual ¶ added in v0.16.0

func (*WebhookCustomerStateChangedPayload) GetDataTeam ¶ added in v0.16.0

func (*WebhookCustomerStateChangedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookCustomerStateChangedPayload) GetTimestamp() time.Time

func (*WebhookCustomerStateChangedPayload) GetType ¶ added in v0.4.3

func (WebhookCustomerStateChangedPayload) MarshalJSON ¶ added in v0.4.3

func (w WebhookCustomerStateChangedPayload) MarshalJSON() ([]byte, error)

func (*WebhookCustomerStateChangedPayload) UnmarshalJSON ¶ added in v0.4.3

func (w *WebhookCustomerStateChangedPayload) UnmarshalJSON(data []byte) error

type WebhookCustomerUpdatedPayload ¶ added in v0.4.3

type WebhookCustomerUpdatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	Data      Customer  `json:"data"`
	// contains filtered or unexported fields
}

WebhookCustomerUpdatedPayload - Sent when a customer is updated.

This event is fired when the customer details are updated.

If you want to be notified when a customer subscription or benefit state changes, you should listen to the `customer_state_changed` event.

**Discord & Slack support:** Basic

func (*WebhookCustomerUpdatedPayload) GetData ¶ added in v0.4.3

func (*WebhookCustomerUpdatedPayload) GetDataIndividual ¶ added in v0.16.0

func (w *WebhookCustomerUpdatedPayload) GetDataIndividual() *CustomerIndividual

func (*WebhookCustomerUpdatedPayload) GetDataTeam ¶ added in v0.16.0

func (w *WebhookCustomerUpdatedPayload) GetDataTeam() *CustomerTeam

func (*WebhookCustomerUpdatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookCustomerUpdatedPayload) GetTimestamp() time.Time

func (*WebhookCustomerUpdatedPayload) GetType ¶ added in v0.4.3

func (WebhookCustomerUpdatedPayload) MarshalJSON ¶ added in v0.4.3

func (w WebhookCustomerUpdatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookCustomerUpdatedPayload) UnmarshalJSON ¶ added in v0.4.3

func (w *WebhookCustomerUpdatedPayload) UnmarshalJSON(data []byte) error

type WebhookDelivery ¶ added in v0.6.1

type WebhookDelivery struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// Whether the delivery was successful.
	Succeeded bool `json:"succeeded"`
	// The HTTP code returned by the URL. `null` if the endpoint was unreachable.
	HTTPCode *int64 `json:"http_code"`
	// The response body returned by the URL, or the error message if the endpoint was unreachable.
	Response *string `json:"response"`
	// A webhook event.
	//
	// An event represent something that happened in the system
	// that should be sent to the webhook endpoint.
	//
	// It can be delivered multiple times until it's marked as succeeded,
	// each one creating a new delivery.
	WebhookEvent WebhookEvent `json:"webhook_event"`
}

WebhookDelivery - A webhook delivery for a webhook event.

func (*WebhookDelivery) GetCreatedAt ¶ added in v0.6.1

func (w *WebhookDelivery) GetCreatedAt() time.Time

func (*WebhookDelivery) GetHTTPCode ¶ added in v0.6.1

func (w *WebhookDelivery) GetHTTPCode() *int64

func (*WebhookDelivery) GetID ¶ added in v0.6.1

func (w *WebhookDelivery) GetID() string

func (*WebhookDelivery) GetModifiedAt ¶ added in v0.6.1

func (w *WebhookDelivery) GetModifiedAt() *time.Time

func (*WebhookDelivery) GetResponse ¶ added in v0.8.5

func (w *WebhookDelivery) GetResponse() *string

func (*WebhookDelivery) GetSucceeded ¶ added in v0.6.1

func (w *WebhookDelivery) GetSucceeded() bool

func (*WebhookDelivery) GetWebhookEvent ¶ added in v0.6.1

func (w *WebhookDelivery) GetWebhookEvent() WebhookEvent

func (WebhookDelivery) MarshalJSON ¶ added in v0.6.1

func (w WebhookDelivery) MarshalJSON() ([]byte, error)

func (*WebhookDelivery) UnmarshalJSON ¶ added in v0.6.1

func (w *WebhookDelivery) UnmarshalJSON(data []byte) error

type WebhookEndpoint ¶ added in v0.6.1

type WebhookEndpoint struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// The URL where the webhook events will be sent.
	URL string `json:"url"`
	// An optional name for the webhook endpoint to help organize and identify it.
	Name   *string       `json:"name,omitempty"`
	Format WebhookFormat `json:"format"`
	// The secret used to sign the webhook events.
	Secret string `json:"secret"`
	// The organization ID associated with the webhook endpoint.
	OrganizationID string `json:"organization_id"`
	// The events that will trigger the webhook.
	Events []WebhookEventType `json:"events"`
	// Whether the webhook endpoint is enabled and will receive events.
	Enabled bool `json:"enabled"`
}

WebhookEndpoint - A webhook endpoint.

func (*WebhookEndpoint) GetCreatedAt ¶ added in v0.6.1

func (w *WebhookEndpoint) GetCreatedAt() time.Time

func (*WebhookEndpoint) GetEnabled ¶ added in v0.12.0

func (w *WebhookEndpoint) GetEnabled() bool

func (*WebhookEndpoint) GetEvents ¶ added in v0.6.1

func (w *WebhookEndpoint) GetEvents() []WebhookEventType

func (*WebhookEndpoint) GetFormat ¶ added in v0.6.1

func (w *WebhookEndpoint) GetFormat() WebhookFormat

func (*WebhookEndpoint) GetID ¶ added in v0.6.1

func (w *WebhookEndpoint) GetID() string

func (*WebhookEndpoint) GetModifiedAt ¶ added in v0.6.1

func (w *WebhookEndpoint) GetModifiedAt() *time.Time

func (*WebhookEndpoint) GetName ¶ added in v0.15.0

func (w *WebhookEndpoint) GetName() *string

func (*WebhookEndpoint) GetOrganizationID ¶ added in v0.6.1

func (w *WebhookEndpoint) GetOrganizationID() string

func (*WebhookEndpoint) GetSecret ¶ added in v0.7.3

func (w *WebhookEndpoint) GetSecret() string

func (*WebhookEndpoint) GetURL ¶ added in v0.6.1

func (w *WebhookEndpoint) GetURL() string

func (WebhookEndpoint) MarshalJSON ¶ added in v0.6.1

func (w WebhookEndpoint) MarshalJSON() ([]byte, error)

func (*WebhookEndpoint) UnmarshalJSON ¶ added in v0.6.1

func (w *WebhookEndpoint) UnmarshalJSON(data []byte) error

type WebhookEndpointCreate ¶ added in v0.6.1

type WebhookEndpointCreate struct {
	// The URL where the webhook events will be sent.
	URL string `json:"url"`
	// An optional name for the webhook endpoint to help organize and identify it.
	Name   *string       `json:"name,omitempty"`
	Format WebhookFormat `json:"format"`
	// The events that will trigger the webhook.
	Events []WebhookEventType `json:"events"`
	// The organization ID associated with the webhook endpoint. **Required unless you use an organization token.**
	OrganizationID *string `json:"organization_id,omitempty"`
}

WebhookEndpointCreate - Schema to create a webhook endpoint.

func (*WebhookEndpointCreate) GetEvents ¶ added in v0.6.1

func (w *WebhookEndpointCreate) GetEvents() []WebhookEventType

func (*WebhookEndpointCreate) GetFormat ¶ added in v0.6.1

func (w *WebhookEndpointCreate) GetFormat() WebhookFormat

func (*WebhookEndpointCreate) GetName ¶ added in v0.15.0

func (w *WebhookEndpointCreate) GetName() *string

func (*WebhookEndpointCreate) GetOrganizationID ¶ added in v0.6.1

func (w *WebhookEndpointCreate) GetOrganizationID() *string

func (*WebhookEndpointCreate) GetURL ¶ added in v0.6.1

func (w *WebhookEndpointCreate) GetURL() string

type WebhookEndpointUpdate ¶ added in v0.6.1

type WebhookEndpointUpdate struct {
	URL *string `json:"url,omitempty"`
	// An optional name for the webhook endpoint to help organize and identify it.
	Name   *string            `json:"name,omitempty"`
	Format *WebhookFormat     `json:"format,omitempty"`
	Events []WebhookEventType `json:"events,omitempty"`
	// Whether the webhook endpoint is enabled.
	Enabled *bool `json:"enabled,omitempty"`
}

WebhookEndpointUpdate - Schema to update a webhook endpoint.

func (*WebhookEndpointUpdate) GetEnabled ¶ added in v0.12.0

func (w *WebhookEndpointUpdate) GetEnabled() *bool

func (*WebhookEndpointUpdate) GetEvents ¶ added in v0.6.1

func (w *WebhookEndpointUpdate) GetEvents() []WebhookEventType

func (*WebhookEndpointUpdate) GetFormat ¶ added in v0.6.1

func (w *WebhookEndpointUpdate) GetFormat() *WebhookFormat

func (*WebhookEndpointUpdate) GetName ¶ added in v0.15.0

func (w *WebhookEndpointUpdate) GetName() *string

func (*WebhookEndpointUpdate) GetURL ¶ added in v0.6.1

func (w *WebhookEndpointUpdate) GetURL() *string

type WebhookEvent ¶ added in v0.6.1

type WebhookEvent struct {
	// Creation timestamp of the object.
	CreatedAt time.Time `json:"created_at"`
	// Last modification timestamp of the object.
	ModifiedAt *time.Time `json:"modified_at"`
	// The ID of the object.
	ID string `json:"id"`
	// Last HTTP code returned by the URL. `null` if no delviery has been attempted or if the endpoint was unreachable.
	LastHTTPCode *int64 `json:"last_http_code,omitempty"`
	// Whether this event was successfully delivered. `null` if no delivery has been attempted.
	Succeeded *bool `json:"succeeded,omitempty"`
	// Whether this event was skipped because the webhook endpoint was disabled.
	Skipped bool `json:"skipped"`
	// The payload of the webhook event.
	Payload *string          `json:"payload"`
	Type    WebhookEventType `json:"type"`
	// Whether this event is archived. Archived events can't be redelivered, and the payload is not accessible anymore.
	IsArchived bool `json:"is_archived"`
}

WebhookEvent - A webhook event.

An event represent something that happened in the system that should be sent to the webhook endpoint.

It can be delivered multiple times until it's marked as succeeded, each one creating a new delivery.

func (*WebhookEvent) GetCreatedAt ¶ added in v0.6.1

func (w *WebhookEvent) GetCreatedAt() time.Time

func (*WebhookEvent) GetID ¶ added in v0.6.1

func (w *WebhookEvent) GetID() string

func (*WebhookEvent) GetIsArchived ¶ added in v0.8.5

func (w *WebhookEvent) GetIsArchived() bool

func (*WebhookEvent) GetLastHTTPCode ¶ added in v0.6.1

func (w *WebhookEvent) GetLastHTTPCode() *int64

func (*WebhookEvent) GetModifiedAt ¶ added in v0.6.1

func (w *WebhookEvent) GetModifiedAt() *time.Time

func (*WebhookEvent) GetPayload ¶ added in v0.6.1

func (w *WebhookEvent) GetPayload() *string

func (*WebhookEvent) GetSkipped ¶ added in v0.13.0

func (w *WebhookEvent) GetSkipped() bool

func (*WebhookEvent) GetSucceeded ¶ added in v0.6.1

func (w *WebhookEvent) GetSucceeded() *bool

func (*WebhookEvent) GetType ¶ added in v0.8.5

func (w *WebhookEvent) GetType() WebhookEventType

func (WebhookEvent) MarshalJSON ¶ added in v0.6.1

func (w WebhookEvent) MarshalJSON() ([]byte, error)

func (*WebhookEvent) UnmarshalJSON ¶ added in v0.6.1

func (w *WebhookEvent) UnmarshalJSON(data []byte) error

type WebhookEventType ¶ added in v0.6.1

type WebhookEventType string
const (
	WebhookEventTypeCheckoutCreated        WebhookEventType = "checkout.created"
	WebhookEventTypeCheckoutUpdated        WebhookEventType = "checkout.updated"
	WebhookEventTypeCheckoutExpired        WebhookEventType = "checkout.expired"
	WebhookEventTypeCustomerCreated        WebhookEventType = "customer.created"
	WebhookEventTypeCustomerUpdated        WebhookEventType = "customer.updated"
	WebhookEventTypeCustomerDeleted        WebhookEventType = "customer.deleted"
	WebhookEventTypeCustomerStateChanged   WebhookEventType = "customer.state_changed"
	WebhookEventTypeCustomerSeatAssigned   WebhookEventType = "customer_seat.assigned"
	WebhookEventTypeCustomerSeatClaimed    WebhookEventType = "customer_seat.claimed"
	WebhookEventTypeCustomerSeatRevoked    WebhookEventType = "customer_seat.revoked"
	WebhookEventTypeMemberCreated          WebhookEventType = "member.created"
	WebhookEventTypeMemberUpdated          WebhookEventType = "member.updated"
	WebhookEventTypeMemberDeleted          WebhookEventType = "member.deleted"
	WebhookEventTypeOrderCreated           WebhookEventType = "order.created"
	WebhookEventTypeOrderUpdated           WebhookEventType = "order.updated"
	WebhookEventTypeOrderPaid              WebhookEventType = "order.paid"
	WebhookEventTypeOrderRefunded          WebhookEventType = "order.refunded"
	WebhookEventTypeSubscriptionCreated    WebhookEventType = "subscription.created"
	WebhookEventTypeSubscriptionUpdated    WebhookEventType = "subscription.updated"
	WebhookEventTypeSubscriptionActive     WebhookEventType = "subscription.active"
	WebhookEventTypeSubscriptionCanceled   WebhookEventType = "subscription.canceled"
	WebhookEventTypeSubscriptionUncanceled WebhookEventType = "subscription.uncanceled"
	WebhookEventTypeSubscriptionRevoked    WebhookEventType = "subscription.revoked"
	WebhookEventTypeSubscriptionPastDue    WebhookEventType = "subscription.past_due"
	WebhookEventTypeRefundCreated          WebhookEventType = "refund.created"
	WebhookEventTypeRefundUpdated          WebhookEventType = "refund.updated"
	WebhookEventTypeProductCreated         WebhookEventType = "product.created"
	WebhookEventTypeProductUpdated         WebhookEventType = "product.updated"
	WebhookEventTypeBenefitCreated         WebhookEventType = "benefit.created"
	WebhookEventTypeBenefitUpdated         WebhookEventType = "benefit.updated"
	WebhookEventTypeBenefitGrantCreated    WebhookEventType = "benefit_grant.created"
	WebhookEventTypeBenefitGrantCycled     WebhookEventType = "benefit_grant.cycled"
	WebhookEventTypeBenefitGrantUpdated    WebhookEventType = "benefit_grant.updated"
	WebhookEventTypeBenefitGrantRevoked    WebhookEventType = "benefit_grant.revoked"
	WebhookEventTypeOrganizationUpdated    WebhookEventType = "organization.updated"
)

func (WebhookEventType) ToPointer ¶ added in v0.6.1

func (e WebhookEventType) ToPointer() *WebhookEventType

func (*WebhookEventType) UnmarshalJSON ¶ added in v0.6.1

func (e *WebhookEventType) UnmarshalJSON(data []byte) error

type WebhookFormat ¶ added in v0.6.1

type WebhookFormat string
const (
	WebhookFormatRaw     WebhookFormat = "raw"
	WebhookFormatDiscord WebhookFormat = "discord"
	WebhookFormatSlack   WebhookFormat = "slack"
)

func (WebhookFormat) ToPointer ¶ added in v0.6.1

func (e WebhookFormat) ToPointer() *WebhookFormat

func (*WebhookFormat) UnmarshalJSON ¶ added in v0.6.1

func (e *WebhookFormat) UnmarshalJSON(data []byte) error

type WebhookMemberCreatedPayload ¶ added in v0.13.0

type WebhookMemberCreatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	// A member of a customer.
	Data Member `json:"data"`
	// contains filtered or unexported fields
}

WebhookMemberCreatedPayload - Sent when a new member is created.

A member represents an individual within a customer (team). This event is triggered when a member is added to a customer, either programmatically via the API or when an owner is automatically created for a new customer.

**Discord & Slack support:** Basic

func (*WebhookMemberCreatedPayload) GetData ¶ added in v0.13.0

func (w *WebhookMemberCreatedPayload) GetData() Member

func (*WebhookMemberCreatedPayload) GetTimestamp ¶ added in v0.13.0

func (w *WebhookMemberCreatedPayload) GetTimestamp() time.Time

func (*WebhookMemberCreatedPayload) GetType ¶ added in v0.13.0

func (w *WebhookMemberCreatedPayload) GetType() string

func (WebhookMemberCreatedPayload) MarshalJSON ¶ added in v0.13.0

func (w WebhookMemberCreatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookMemberCreatedPayload) UnmarshalJSON ¶ added in v0.13.0

func (w *WebhookMemberCreatedPayload) UnmarshalJSON(data []byte) error

type WebhookMemberDeletedPayload ¶ added in v0.13.0

type WebhookMemberDeletedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	// A member of a customer.
	Data Member `json:"data"`
	// contains filtered or unexported fields
}

WebhookMemberDeletedPayload - Sent when a member is deleted.

This event is triggered when a member is removed from a customer. Any active seats assigned to the member will be automatically revoked.

**Discord & Slack support:** Basic

func (*WebhookMemberDeletedPayload) GetData ¶ added in v0.13.0

func (w *WebhookMemberDeletedPayload) GetData() Member

func (*WebhookMemberDeletedPayload) GetTimestamp ¶ added in v0.13.0

func (w *WebhookMemberDeletedPayload) GetTimestamp() time.Time

func (*WebhookMemberDeletedPayload) GetType ¶ added in v0.13.0

func (w *WebhookMemberDeletedPayload) GetType() string

func (WebhookMemberDeletedPayload) MarshalJSON ¶ added in v0.13.0

func (w WebhookMemberDeletedPayload) MarshalJSON() ([]byte, error)

func (*WebhookMemberDeletedPayload) UnmarshalJSON ¶ added in v0.13.0

func (w *WebhookMemberDeletedPayload) UnmarshalJSON(data []byte) error

type WebhookMemberUpdatedPayload ¶ added in v0.13.0

type WebhookMemberUpdatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	// A member of a customer.
	Data Member `json:"data"`
	// contains filtered or unexported fields
}

WebhookMemberUpdatedPayload - Sent when a member is updated.

This event is triggered when member details are updated, such as their name or role within the customer.

**Discord & Slack support:** Basic

func (*WebhookMemberUpdatedPayload) GetData ¶ added in v0.13.0

func (w *WebhookMemberUpdatedPayload) GetData() Member

func (*WebhookMemberUpdatedPayload) GetTimestamp ¶ added in v0.13.0

func (w *WebhookMemberUpdatedPayload) GetTimestamp() time.Time

func (*WebhookMemberUpdatedPayload) GetType ¶ added in v0.13.0

func (w *WebhookMemberUpdatedPayload) GetType() string

func (WebhookMemberUpdatedPayload) MarshalJSON ¶ added in v0.13.0

func (w WebhookMemberUpdatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookMemberUpdatedPayload) UnmarshalJSON ¶ added in v0.13.0

func (w *WebhookMemberUpdatedPayload) UnmarshalJSON(data []byte) error

type WebhookOrderCreatedPayload ¶

type WebhookOrderCreatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	Data      Order     `json:"data"`
	// contains filtered or unexported fields
}

WebhookOrderCreatedPayload - Sent when a new order is created.

A new order is created when:

* A customer purchases a one-time product. In this case, `billing_reason` is set to `purchase`. * A customer starts a subscription. In this case, `billing_reason` is set to `subscription_create`. * A subscription is renewed. In this case, `billing_reason` is set to `subscription_cycle`. * A subscription is upgraded or downgraded with an immediate proration invoice. In this case, `billing_reason` is set to `subscription_update`.

> [!WARNING] > The order might not be paid yet, so the `status` field might be `pending`.

**Discord & Slack support:** Full

func (*WebhookOrderCreatedPayload) GetData ¶

func (w *WebhookOrderCreatedPayload) GetData() Order

func (*WebhookOrderCreatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookOrderCreatedPayload) GetTimestamp() time.Time

func (*WebhookOrderCreatedPayload) GetType ¶

func (w *WebhookOrderCreatedPayload) GetType() string

func (WebhookOrderCreatedPayload) MarshalJSON ¶

func (w WebhookOrderCreatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookOrderCreatedPayload) UnmarshalJSON ¶

func (w *WebhookOrderCreatedPayload) UnmarshalJSON(data []byte) error

type WebhookOrderPaidPayload ¶ added in v0.4.7

type WebhookOrderPaidPayload struct {
	Timestamp time.Time `json:"timestamp"`
	Data      Order     `json:"data"`
	// contains filtered or unexported fields
}

WebhookOrderPaidPayload - Sent when an order is paid.

When you receive this event, the order is fully processed and payment has been received.

**Discord & Slack support:** Full

func (*WebhookOrderPaidPayload) GetData ¶ added in v0.4.7

func (w *WebhookOrderPaidPayload) GetData() Order

func (*WebhookOrderPaidPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookOrderPaidPayload) GetTimestamp() time.Time

func (*WebhookOrderPaidPayload) GetType ¶ added in v0.4.7

func (w *WebhookOrderPaidPayload) GetType() string

func (WebhookOrderPaidPayload) MarshalJSON ¶ added in v0.4.7

func (w WebhookOrderPaidPayload) MarshalJSON() ([]byte, error)

func (*WebhookOrderPaidPayload) UnmarshalJSON ¶ added in v0.4.7

func (w *WebhookOrderPaidPayload) UnmarshalJSON(data []byte) error

type WebhookOrderRefundedPayload ¶ added in v0.1.5

type WebhookOrderRefundedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	Data      Order     `json:"data"`
	// contains filtered or unexported fields
}

WebhookOrderRefundedPayload - Sent when an order is fully or partially refunded.

**Discord & Slack support:** Full

func (*WebhookOrderRefundedPayload) GetData ¶ added in v0.1.5

func (w *WebhookOrderRefundedPayload) GetData() Order

func (*WebhookOrderRefundedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookOrderRefundedPayload) GetTimestamp() time.Time

func (*WebhookOrderRefundedPayload) GetType ¶ added in v0.1.5

func (w *WebhookOrderRefundedPayload) GetType() string

func (WebhookOrderRefundedPayload) MarshalJSON ¶ added in v0.1.5

func (w WebhookOrderRefundedPayload) MarshalJSON() ([]byte, error)

func (*WebhookOrderRefundedPayload) UnmarshalJSON ¶ added in v0.1.5

func (w *WebhookOrderRefundedPayload) UnmarshalJSON(data []byte) error

type WebhookOrderUpdatedPayload ¶ added in v0.4.7

type WebhookOrderUpdatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	Data      Order     `json:"data"`
	// contains filtered or unexported fields
}

WebhookOrderUpdatedPayload - Sent when an order is updated.

An order is updated when:

* Its status changes, e.g. from `pending` to `paid`. * It's refunded, partially or fully.

**Discord & Slack support:** Full

func (*WebhookOrderUpdatedPayload) GetData ¶ added in v0.4.7

func (w *WebhookOrderUpdatedPayload) GetData() Order

func (*WebhookOrderUpdatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookOrderUpdatedPayload) GetTimestamp() time.Time

func (*WebhookOrderUpdatedPayload) GetType ¶ added in v0.4.7

func (w *WebhookOrderUpdatedPayload) GetType() string

func (WebhookOrderUpdatedPayload) MarshalJSON ¶ added in v0.4.7

func (w WebhookOrderUpdatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookOrderUpdatedPayload) UnmarshalJSON ¶ added in v0.4.7

func (w *WebhookOrderUpdatedPayload) UnmarshalJSON(data []byte) error

type WebhookOrganizationUpdatedPayload ¶

type WebhookOrganizationUpdatedPayload struct {
	Timestamp time.Time    `json:"timestamp"`
	Data      Organization `json:"data"`
	// contains filtered or unexported fields
}

WebhookOrganizationUpdatedPayload - Sent when a organization is updated.

**Discord & Slack support:** Basic

func (*WebhookOrganizationUpdatedPayload) GetData ¶

func (*WebhookOrganizationUpdatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookOrganizationUpdatedPayload) GetTimestamp() time.Time

func (*WebhookOrganizationUpdatedPayload) GetType ¶

func (WebhookOrganizationUpdatedPayload) MarshalJSON ¶

func (w WebhookOrganizationUpdatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookOrganizationUpdatedPayload) UnmarshalJSON ¶

func (w *WebhookOrganizationUpdatedPayload) UnmarshalJSON(data []byte) error

type WebhookProductCreatedPayload ¶

type WebhookProductCreatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	// A product.
	Data Product `json:"data"`
	// contains filtered or unexported fields
}

WebhookProductCreatedPayload - Sent when a new product is created.

**Discord & Slack support:** Basic

func (*WebhookProductCreatedPayload) GetData ¶

func (*WebhookProductCreatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookProductCreatedPayload) GetTimestamp() time.Time

func (*WebhookProductCreatedPayload) GetType ¶

func (w *WebhookProductCreatedPayload) GetType() string

func (WebhookProductCreatedPayload) MarshalJSON ¶

func (w WebhookProductCreatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookProductCreatedPayload) UnmarshalJSON ¶

func (w *WebhookProductCreatedPayload) UnmarshalJSON(data []byte) error

type WebhookProductUpdatedPayload ¶

type WebhookProductUpdatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	// A product.
	Data Product `json:"data"`
	// contains filtered or unexported fields
}

WebhookProductUpdatedPayload - Sent when a product is updated.

**Discord & Slack support:** Basic

func (*WebhookProductUpdatedPayload) GetData ¶

func (*WebhookProductUpdatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookProductUpdatedPayload) GetTimestamp() time.Time

func (*WebhookProductUpdatedPayload) GetType ¶

func (w *WebhookProductUpdatedPayload) GetType() string

func (WebhookProductUpdatedPayload) MarshalJSON ¶

func (w WebhookProductUpdatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookProductUpdatedPayload) UnmarshalJSON ¶

func (w *WebhookProductUpdatedPayload) UnmarshalJSON(data []byte) error

type WebhookRefundCreatedPayload ¶ added in v0.1.5

type WebhookRefundCreatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	Data      Refund    `json:"data"`
	// contains filtered or unexported fields
}

WebhookRefundCreatedPayload - Sent when a refund is created regardless of status.

**Discord & Slack support:** Full

func (*WebhookRefundCreatedPayload) GetData ¶ added in v0.1.5

func (w *WebhookRefundCreatedPayload) GetData() Refund

func (*WebhookRefundCreatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookRefundCreatedPayload) GetTimestamp() time.Time

func (*WebhookRefundCreatedPayload) GetType ¶ added in v0.1.5

func (w *WebhookRefundCreatedPayload) GetType() string

func (WebhookRefundCreatedPayload) MarshalJSON ¶ added in v0.1.5

func (w WebhookRefundCreatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookRefundCreatedPayload) UnmarshalJSON ¶ added in v0.1.5

func (w *WebhookRefundCreatedPayload) UnmarshalJSON(data []byte) error

type WebhookRefundUpdatedPayload ¶ added in v0.1.5

type WebhookRefundUpdatedPayload struct {
	Timestamp time.Time `json:"timestamp"`
	Data      Refund    `json:"data"`
	// contains filtered or unexported fields
}

WebhookRefundUpdatedPayload - Sent when a refund is updated.

**Discord & Slack support:** Full

func (*WebhookRefundUpdatedPayload) GetData ¶ added in v0.1.5

func (w *WebhookRefundUpdatedPayload) GetData() Refund

func (*WebhookRefundUpdatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookRefundUpdatedPayload) GetTimestamp() time.Time

func (*WebhookRefundUpdatedPayload) GetType ¶ added in v0.1.5

func (w *WebhookRefundUpdatedPayload) GetType() string

func (WebhookRefundUpdatedPayload) MarshalJSON ¶ added in v0.1.5

func (w WebhookRefundUpdatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookRefundUpdatedPayload) UnmarshalJSON ¶ added in v0.1.5

func (w *WebhookRefundUpdatedPayload) UnmarshalJSON(data []byte) error

type WebhookSubscriptionActivePayload ¶

type WebhookSubscriptionActivePayload struct {
	Timestamp time.Time    `json:"timestamp"`
	Data      Subscription `json:"data"`
	// contains filtered or unexported fields
}

WebhookSubscriptionActivePayload - Sent when a subscription becomes active, whether because it's a new paid subscription or because payment was recovered.

**Discord & Slack support:** Full

func (*WebhookSubscriptionActivePayload) GetData ¶

func (*WebhookSubscriptionActivePayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookSubscriptionActivePayload) GetTimestamp() time.Time

func (*WebhookSubscriptionActivePayload) GetType ¶

func (WebhookSubscriptionActivePayload) MarshalJSON ¶

func (w WebhookSubscriptionActivePayload) MarshalJSON() ([]byte, error)

func (*WebhookSubscriptionActivePayload) UnmarshalJSON ¶

func (w *WebhookSubscriptionActivePayload) UnmarshalJSON(data []byte) error

type WebhookSubscriptionCanceledPayload ¶

type WebhookSubscriptionCanceledPayload struct {
	Timestamp time.Time    `json:"timestamp"`
	Data      Subscription `json:"data"`
	// contains filtered or unexported fields
}

WebhookSubscriptionCanceledPayload - Sent when a subscription is canceled. Customers might still have access until the end of the current period.

**Discord & Slack support:** Full

func (*WebhookSubscriptionCanceledPayload) GetData ¶

func (*WebhookSubscriptionCanceledPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookSubscriptionCanceledPayload) GetTimestamp() time.Time

func (*WebhookSubscriptionCanceledPayload) GetType ¶

func (WebhookSubscriptionCanceledPayload) MarshalJSON ¶

func (w WebhookSubscriptionCanceledPayload) MarshalJSON() ([]byte, error)

func (*WebhookSubscriptionCanceledPayload) UnmarshalJSON ¶

func (w *WebhookSubscriptionCanceledPayload) UnmarshalJSON(data []byte) error

type WebhookSubscriptionCreatedPayload ¶

type WebhookSubscriptionCreatedPayload struct {
	Timestamp time.Time    `json:"timestamp"`
	Data      Subscription `json:"data"`
	// contains filtered or unexported fields
}

WebhookSubscriptionCreatedPayload - Sent when a new subscription is created.

When this event occurs, the subscription `status` might not be `active` yet, as we can still have to wait for the first payment to be processed.

**Discord & Slack support:** Full

func (*WebhookSubscriptionCreatedPayload) GetData ¶

func (*WebhookSubscriptionCreatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookSubscriptionCreatedPayload) GetTimestamp() time.Time

func (*WebhookSubscriptionCreatedPayload) GetType ¶

func (WebhookSubscriptionCreatedPayload) MarshalJSON ¶

func (w WebhookSubscriptionCreatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookSubscriptionCreatedPayload) UnmarshalJSON ¶

func (w *WebhookSubscriptionCreatedPayload) UnmarshalJSON(data []byte) error

type WebhookSubscriptionPastDuePayload ¶ added in v0.13.0

type WebhookSubscriptionPastDuePayload struct {
	Timestamp time.Time    `json:"timestamp"`
	Data      Subscription `json:"data"`
	// contains filtered or unexported fields
}

WebhookSubscriptionPastDuePayload - Sent when a subscription payment fails and the subscription enters `past_due` status.

This is a recoverable state - the customer can update their payment method to restore the subscription. Benefits may be revoked depending on the organization's grace period settings.

If payment retries are exhausted, a `subscription.revoked` event will be sent.

**Discord & Slack support:** Full

func (*WebhookSubscriptionPastDuePayload) GetData ¶ added in v0.13.0

func (*WebhookSubscriptionPastDuePayload) GetTimestamp ¶ added in v0.13.0

func (w *WebhookSubscriptionPastDuePayload) GetTimestamp() time.Time

func (*WebhookSubscriptionPastDuePayload) GetType ¶ added in v0.13.0

func (WebhookSubscriptionPastDuePayload) MarshalJSON ¶ added in v0.13.0

func (w WebhookSubscriptionPastDuePayload) MarshalJSON() ([]byte, error)

func (*WebhookSubscriptionPastDuePayload) UnmarshalJSON ¶ added in v0.13.0

func (w *WebhookSubscriptionPastDuePayload) UnmarshalJSON(data []byte) error

type WebhookSubscriptionRevokedPayload ¶

type WebhookSubscriptionRevokedPayload struct {
	Timestamp time.Time    `json:"timestamp"`
	Data      Subscription `json:"data"`
	// contains filtered or unexported fields
}

WebhookSubscriptionRevokedPayload - Sent when a subscription is revoked and the user loses access immediately. Happens when the subscription is canceled or payment retries are exhausted (status becomes `unpaid`).

For payment failures that can still be recovered, see `subscription.past_due`.

**Discord & Slack support:** Full

func (*WebhookSubscriptionRevokedPayload) GetData ¶

func (*WebhookSubscriptionRevokedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookSubscriptionRevokedPayload) GetTimestamp() time.Time

func (*WebhookSubscriptionRevokedPayload) GetType ¶

func (WebhookSubscriptionRevokedPayload) MarshalJSON ¶

func (w WebhookSubscriptionRevokedPayload) MarshalJSON() ([]byte, error)

func (*WebhookSubscriptionRevokedPayload) UnmarshalJSON ¶

func (w *WebhookSubscriptionRevokedPayload) UnmarshalJSON(data []byte) error

type WebhookSubscriptionUncanceledPayload ¶ added in v0.1.1

type WebhookSubscriptionUncanceledPayload struct {
	Timestamp time.Time    `json:"timestamp"`
	Data      Subscription `json:"data"`
	// contains filtered or unexported fields
}

WebhookSubscriptionUncanceledPayload - Sent when a customer revokes a pending cancellation.

When a customer cancels with "at period end", they retain access until the subscription would renew. During this time, they can change their mind and undo the cancellation. This event is triggered when they do so.

**Discord & Slack support:** Full

func (*WebhookSubscriptionUncanceledPayload) GetData ¶ added in v0.1.1

func (*WebhookSubscriptionUncanceledPayload) GetTimestamp ¶ added in v0.8.5

func (*WebhookSubscriptionUncanceledPayload) GetType ¶ added in v0.1.1

func (WebhookSubscriptionUncanceledPayload) MarshalJSON ¶ added in v0.1.1

func (w WebhookSubscriptionUncanceledPayload) MarshalJSON() ([]byte, error)

func (*WebhookSubscriptionUncanceledPayload) UnmarshalJSON ¶ added in v0.1.1

func (w *WebhookSubscriptionUncanceledPayload) UnmarshalJSON(data []byte) error

type WebhookSubscriptionUpdatedPayload ¶

type WebhookSubscriptionUpdatedPayload struct {
	Timestamp time.Time    `json:"timestamp"`
	Data      Subscription `json:"data"`
	// contains filtered or unexported fields
}

WebhookSubscriptionUpdatedPayload - Sent when a subscription is updated. This event fires for all changes to the subscription, including renewals.

If you want more specific events, you can listen to `subscription.active`, `subscription.canceled`, `subscription.past_due`, and `subscription.revoked`.

To listen specifically for renewals, you can listen to `order.created` events and check the `billing_reason` field.

**Discord & Slack support:** On cancellation, past due, and revocation. Renewals are skipped.

func (*WebhookSubscriptionUpdatedPayload) GetData ¶

func (*WebhookSubscriptionUpdatedPayload) GetTimestamp ¶ added in v0.8.5

func (w *WebhookSubscriptionUpdatedPayload) GetTimestamp() time.Time

func (*WebhookSubscriptionUpdatedPayload) GetType ¶

func (WebhookSubscriptionUpdatedPayload) MarshalJSON ¶

func (w WebhookSubscriptionUpdatedPayload) MarshalJSON() ([]byte, error)

func (*WebhookSubscriptionUpdatedPayload) UnmarshalJSON ¶

func (w *WebhookSubscriptionUpdatedPayload) UnmarshalJSON(data []byte) error

Source Files ¶

Jump to

Keyboard shortcuts

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