Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make token.go codegen-able #1349

Merged
merged 2 commits into from
Oct 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions token.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
//
//
// File generated from our OpenAPI spec
//
//

package stripe

// TokenType is the list of allowed values for a token's type.
Expand Down Expand Up @@ -38,37 +44,33 @@ type TokenParams struct {
Card *CardParams `form:"card"`
Customer *string `form:"customer"`
CVCUpdate *TokenCVCUpdateParams `form:"cvc_update"`
Person *PersonParams `form:"person"`

// Email is an undocumented parameter used by Stripe Checkout
// It may be removed from the API without notice.
Email *string `form:"email"`
Email *string `form:"email"`
Person *PersonParams `form:"person"`
PII *PIIParams `form:"pii"`
}

PII *PIIParams `form:"pii"`
// PIIParams are parameters for personal identifiable information (PII).
type PIIParams struct {
Params `form:"*"`
IDNumber *string `form:"id_number"`
}

// Token is the resource representing a Stripe token.
// For more details see https://stripe.com/docs/api#tokens.
type Token struct {
APIResource

BankAccount *BankAccount `json:"bank_account"`
Card *Card `json:"card"`
ClientIP string `json:"client_ip"`
Created int64 `json:"created"`

// Email is an undocumented field but included for all tokens created
// with Stripe Checkout.
Email string `json:"email"`

Email string `json:"email"`
ID string `json:"id"`
Livemode bool `json:"livemode"`
Object string `json:"object"`
Type TokenType `json:"type"`
Used bool `json:"used"`
}

// PIIParams are parameters for personal identifiable information (PII).
type PIIParams struct {
Params `form:"*"`
IDNumber *string `form:"id_number"`
}