Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BankAccountDetails ¶ added in v1.34.0
type BankAccountDetails struct {
BankName string `json:"bankName,omitempty"`
Last4 string `json:"last4"`
RoutingNumber string `json:"routingNumber,omitempty"`
AccountType string `json:"accountType,omitempty"`
}
BankAccountDetails holds US bank account information for a payment method.
type CardDetails ¶ added in v1.34.0
type CardDetails struct {
Brand string `json:"brand"`
Last4 string `json:"last4"`
ExpMonth int `json:"expMonth"`
ExpYear int `json:"expYear"`
Funding string `json:"funding,omitempty"`
Country string `json:"country,omitempty"`
}
CardDetails holds card-specific information for a payment method.
type PaymentMethod ¶
type PaymentMethod struct {
mixin.Model[PaymentMethod]
UserId string `json:"userId,omitempty"`
CustomerId string `json:"customerId,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type"`
ProviderRef string `json:"providerRef"`
ProviderType string `json:"providerType"`
Card *CardDetails `json:"card,omitempty"`
BankAccount *BankAccountDetails `json:"bankAccount,omitempty"`
BillingAddress *types.Address `json:"billingAddress,omitempty"`
IsDefault bool `json:"isDefault,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Created time.Time `json:"created,omitempty"`
}
func New ¶
func New(db *datastore.Datastore) *PaymentMethod
func (*PaymentMethod) Defaults ¶
func (p *PaymentMethod) Defaults()
Click to show internal directories.
Click to hide internal directories.