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

API Updates #1609

Merged
merged 3 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v226
v232
2 changes: 1 addition & 1 deletion charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ type ChargePaymentMethodDetailsGrabpay struct {
TransactionID string `json:"transaction_id"`
}
type ChargePaymentMethodDetailsIDEAL struct {
// The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`.
// The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
Bank string `json:"bank"`
// The Bank Identifier Code of the customer's bank.
BIC string `json:"bic"`
Expand Down
7 changes: 7 additions & 0 deletions example/generated_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,13 @@ func TestInvoiceRetrieve(t *testing.T) {
assert.NotNil(t, result)
}

func TestInvoiceRetrieve2(t *testing.T) {
params := &stripe.InvoiceParams{}
params.AddExpand("customer")
result, _ := invoice.Get("in_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
}

func TestInvoiceUpdate(t *testing.T) {
params := &stripe.InvoiceParams{}
params.AddMetadata("order_id", "6735")
Expand Down
8 changes: 4 additions & 4 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ type InvoiceUpcomingCustomerDetailsParams struct {

// The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
type InvoiceUpcomingInvoiceItemPeriodParams struct {
// The end of the period, which must be greater than or equal to the start.
// The end of the period, which must be greater than or equal to the start. This value is inclusive.
End *int64 `form:"end"`
// The start of the period.
// The start of the period. This value is inclusive.
Start *int64 `form:"start"`
}

Expand Down Expand Up @@ -707,9 +707,9 @@ type InvoiceUpcomingLinesInvoiceItemDiscountParams struct {

// The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
type InvoiceUpcomingLinesInvoiceItemPeriodParams struct {
// The end of the period, which must be greater than or equal to the start.
// The end of the period, which must be greater than or equal to the start. This value is inclusive.
End *int64 `form:"end"`
// The start of the period.
// The start of the period. This value is inclusive.
Start *int64 `form:"start"`
}

Expand Down
4 changes: 2 additions & 2 deletions invoiceitem.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ type InvoiceItemDiscountParams struct {

// The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
type InvoiceItemPeriodParams struct {
// The end of the period, which must be greater than or equal to the start.
// The end of the period, which must be greater than or equal to the start. This value is inclusive.
End *int64 `form:"end"`
// The start of the period.
// The start of the period. This value is inclusive.
Start *int64 `form:"start"`
}

Expand Down
6 changes: 3 additions & 3 deletions issuing_card.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const (
IssuingCardSpendingControlsSpendingLimitIntervalYearly IssuingCardSpendingControlsSpendingLimitInterval = "yearly"
)

// Whether authorizations can be approved on this card.
// Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
type IssuingCardStatus string

// List of values that IssuingCardStatus can take
Expand Down Expand Up @@ -207,7 +207,7 @@ type IssuingCardParams struct {
Shipping *IssuingCardShippingParams `form:"shipping"`
// Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
SpendingControls *IssuingCardSpendingControlsParams `form:"spending_controls"`
// Dictates whether authorizations can be approved on this card. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.
// Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.
Status *string `form:"status"`
// The type of card to issue. Possible values are `physical` or `virtual`.
Type *string `form:"type"`
Expand Down Expand Up @@ -339,7 +339,7 @@ type IssuingCard struct {
// Where and how the card will be shipped.
Shipping *IssuingCardShipping `json:"shipping"`
SpendingControls *IssuingCardSpendingControls `json:"spending_controls"`
// Whether authorizations can be approved on this card.
// Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
Status IssuingCardStatus `json:"status"`
// The type of the card.
Type IssuingCardType `json:"type"`
Expand Down
17 changes: 10 additions & 7 deletions issuing_cardholder.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ type IssuingCardholderIndividualVerificationParams struct {
type IssuingCardholderIndividualParams struct {
// The date of birth of this cardholder.
DOB *IssuingCardholderIndividualDOBParams `form:"dob"`
// The first name of this cardholder. This field cannot contain any special characters or numbers.
// The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
FirstName *string `form:"first_name"`
// The last name of this cardholder. This field cannot contain any special characters or numbers.
// The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
LastName *string `form:"last_name"`
// Government-issued ID document for this cardholder.
Verification *IssuingCardholderIndividualVerificationParams `form:"verification"`
Expand Down Expand Up @@ -156,7 +156,7 @@ type IssuingCardholderParams struct {
SpendingControls *IssuingCardholderSpendingControlsParams `form:"spending_controls"`
// Specifies whether to permit authorizations on this cardholder's cards.
Status *string `form:"status"`
// One of `individual` or `company`.
// One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.
Type *string `form:"type"`
}
type IssuingCardholderBilling struct {
Expand All @@ -171,13 +171,15 @@ type IssuingCardholderCompany struct {

// Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards).
type IssuingCardholderIndividualCardIssuingUserTermsAcceptance struct {
// The Unix timestamp marking when the cardholder accepted the Authorized User Terms.
// The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
Date int64 `json:"date"`
// The IP address from which the cardholder accepted the Authorized User Terms.
// The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
IP string `json:"ip"`
// The user agent of the browser from which the cardholder accepted the Authorized User Terms.
UserAgent string `json:"user_agent"`
}

// Information related to the card_issuing program for this cardholder.
type IssuingCardholderIndividualCardIssuing struct {
// Information about cardholder acceptance of [Authorized User Terms](https://stripe.com/docs/issuing/cards).
UserTermsAcceptance *IssuingCardholderIndividualCardIssuingUserTermsAcceptance `json:"user_terms_acceptance"`
Expand Down Expand Up @@ -209,12 +211,13 @@ type IssuingCardholderIndividualVerification struct {

// Additional information about an `individual` cardholder.
type IssuingCardholderIndividual struct {
// Information related to the card_issuing program for this cardholder.
CardIssuing *IssuingCardholderIndividualCardIssuing `json:"card_issuing"`
// The date of birth of this cardholder.
DOB *IssuingCardholderIndividualDOB `json:"dob"`
// The first name of this cardholder. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
// The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
FirstName string `json:"first_name"`
// The last name of this cardholder. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
// The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
LastName string `json:"last_name"`
// Government-issued ID document for this cardholder.
Verification *IssuingCardholderIndividualVerification `json:"verification"`
Expand Down
2 changes: 1 addition & 1 deletion paymentmethod.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ type PaymentMethodFPX struct {
type PaymentMethodGiropay struct{}
type PaymentMethodGrabpay struct{}
type PaymentMethodIDEAL struct {
// The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`.
// The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
Bank string `json:"bank"`
// The Bank Identifier Code of the customer's bank, if the bank was provided.
BIC string `json:"bic"`
Expand Down
2 changes: 1 addition & 1 deletion setupattempt.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ type SetupAttemptPaymentMethodDetailsCardPresent struct {
GeneratedCard *PaymentMethod `json:"generated_card"`
}
type SetupAttemptPaymentMethodDetailsIDEAL struct {
// The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`.
// The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
Bank string `json:"bank"`
// The Bank Identifier Code of the customer's bank.
BIC string `json:"bic"`
Expand Down
1 change: 1 addition & 0 deletions taxrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type TaxRateTaxType string
const (
TaxRateTaxTypeGST TaxRateTaxType = "gst"
TaxRateTaxTypeHST TaxRateTaxType = "hst"
TaxRateTaxTypeIGST TaxRateTaxType = "igst"
TaxRateTaxTypeJCT TaxRateTaxType = "jct"
TaxRateTaxTypePST TaxRateTaxType = "pst"
TaxRateTaxTypeQST TaxRateTaxType = "qst"
Expand Down
12 changes: 6 additions & 6 deletions testhelpersterminal_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

package stripe

// Simulated data for the card_present payment method
// Simulated data for the card_present payment method.
type TestHelpersTerminalReaderPresentPaymentMethodCardPresentParams struct {
// Card Number
// The card number, as a string without any separators.
Number *string `form:"number"`
}

// Simulated data for the interac_present payment method
// Simulated data for the interac_present payment method.
type TestHelpersTerminalReaderPresentPaymentMethodInteracPresentParams struct {
// Card Number
Number *string `form:"number"`
Expand All @@ -21,10 +21,10 @@ type TestHelpersTerminalReaderPresentPaymentMethodInteracPresentParams struct {
// Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
type TestHelpersTerminalReaderPresentPaymentMethodParams struct {
Params `form:"*"`
// Simulated data for the card_present payment method
// Simulated data for the card_present payment method.
CardPresent *TestHelpersTerminalReaderPresentPaymentMethodCardPresentParams `form:"card_present"`
// Simulated data for the interac_present payment method
// Simulated data for the interac_present payment method.
InteracPresent *TestHelpersTerminalReaderPresentPaymentMethodInteracPresentParams `form:"interac_present"`
// Simulated payment type
// Simulated payment type.
Type *string `form:"type"`
}