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 #1473

Merged
merged 1 commit into from
Jun 9, 2022
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 @@
v152
v154
30 changes: 30 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,22 @@ type AccountSettingsPayoutsParams struct {
StatementDescriptor *string `form:"statement_descriptor"`
}

// Details on the account's acceptance of the Stripe Treasury Services Agreement.
type AccountSettingsTreasuryTOSAcceptanceParams struct {
// The Unix timestamp marking when the account representative accepted the service agreement.
Date *int64 `form:"date"`
// The IP address from which the account representative accepted the service agreement.
IP *string `form:"ip"`
// The user agent of the browser from which the account representative accepted the service agreement.
UserAgent *string `form:"user_agent"`
}

// Settings specific to the account's Treasury FinancialAccounts.
type AccountSettingsTreasuryParams struct {
// Details on the account's acceptance of the Stripe Treasury Services Agreement.
TOSAcceptance *AccountSettingsTreasuryTOSAcceptanceParams `form:"tos_acceptance"`
}

// Options for customizing how the account functions within Stripe.
type AccountSettingsParams struct {
BACSDebitPayments *AccountSettingsBACSDebitPaymentsParams `form:"bacs_debit_payments"`
Expand All @@ -812,6 +828,8 @@ type AccountSettingsParams struct {
Payments *AccountSettingsPaymentsParams `form:"payments"`
// Settings specific to the account's payouts.
Payouts *AccountSettingsPayoutsParams `form:"payouts"`
// Settings specific to the account's Treasury FinancialAccounts.
Treasury *AccountSettingsTreasuryParams `form:"treasury"`
}

// Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.
Expand Down Expand Up @@ -1168,6 +1186,17 @@ type AccountSettingsSEPADebitPayments struct {
// SEPA creditor identifier that identifies the company making the payment.
CreditorID string `json:"creditor_id"`
}
type AccountSettingsTreasuryTOSAcceptance struct {
// The Unix timestamp marking when the account representative accepted the service agreement.
Date int64 `json:"date"`
// The IP address from which the account representative accepted the service agreement.
IP string `json:"ip"`
// The user agent of the browser from which the account representative accepted the service agreement.
UserAgent string `json:"user_agent"`
}
type AccountSettingsTreasury struct {
TOSAcceptance *AccountSettingsTreasuryTOSAcceptance `json:"tos_acceptance"`
}

// Options for customizing how the account functions within Stripe.
type AccountSettings struct {
Expand All @@ -1179,6 +1208,7 @@ type AccountSettings struct {
Payments *AccountSettingsPayments `json:"payments"`
Payouts *AccountSettingsPayouts `json:"payouts"`
SEPADebitPayments *AccountSettingsSEPADebitPayments `json:"sepa_debit_payments"`
Treasury *AccountSettingsTreasury `json:"treasury"`
}

// This is an object representing a Stripe account. You can retrieve it to see
Expand Down
20 changes: 18 additions & 2 deletions customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ type CustomerInvoiceCustomFieldParams struct {
Value *string `form:"value"`
}

// Default options for invoice PDF rendering for this customer.
type CustomerInvoiceSettingsRenderingOptionsParams struct {
// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
AmountTaxDisplay *string `form:"amount_tax_display"`
}

// Default invoice settings for this customer.
type CustomerInvoiceSettingsParams struct {
// Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
Expand All @@ -98,6 +104,8 @@ type CustomerInvoiceSettingsParams struct {
DefaultPaymentMethod *string `form:"default_payment_method"`
// Default footer to be displayed on invoices for this customer.
Footer *string `form:"footer"`
// Default options for invoice PDF rendering for this customer.
RenderingOptions *CustomerInvoiceSettingsRenderingOptionsParams `form:"rendering_options"`
}

// The customer's shipping information. Appears on invoices emailed to this customer.
Expand Down Expand Up @@ -189,17 +197,25 @@ type CustomerListPaymentMethodsParams struct {
Type *string `form:"type"`
}

// Retrieves a PaymentMethod object.
// Retrieves a PaymentMethod object for a given Customer.
type CustomerRetrievePaymentMethodParams struct {
Params `form:"*"`
Customer *string `form:"-"` // Included in URL
}

// Configuration for eu_bank_transfer funding type.
type CustomerCreateFundingInstructionsBankTransferEUBankTransferParams struct {
// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
Country *string `form:"country"`
}

// Additional parameters for `bank_transfer` funding types
type CustomerCreateFundingInstructionsBankTransferParams struct {
// Configuration for eu_bank_transfer funding type.
EUBankTransfer *CustomerCreateFundingInstructionsBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
// List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
//
// Permitted values include: `zengin`.
// Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
RequestedAddressTypes []*string `form:"requested_address_types"`
// The type of the `bank_transfer`
Type *string `form:"type"`
Expand Down
47 changes: 45 additions & 2 deletions fundinginstructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ type FundingInstructionsBankTransferFinancialAddressSupportedNetwork string

// List of values that FundingInstructionsBankTransferFinancialAddressSupportedNetwork can take
const (
FundingInstructionsBankTransferFinancialAddressSupportedNetworkBACS FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "bacs"
FundingInstructionsBankTransferFinancialAddressSupportedNetworkFPS FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "fps"
FundingInstructionsBankTransferFinancialAddressSupportedNetworkSepa FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "sepa"
FundingInstructionsBankTransferFinancialAddressSupportedNetworkSpei FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "spei"
FundingInstructionsBankTransferFinancialAddressSupportedNetworkZengin FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "zengin"
)

Expand All @@ -20,8 +23,10 @@ type FundingInstructionsBankTransferFinancialAddressType string

// List of values that FundingInstructionsBankTransferFinancialAddressType can take
const (
FundingInstructionsBankTransferFinancialAddressTypeIban FundingInstructionsBankTransferFinancialAddressType = "iban"
FundingInstructionsBankTransferFinancialAddressTypeZengin FundingInstructionsBankTransferFinancialAddressType = "zengin"
FundingInstructionsBankTransferFinancialAddressTypeIban FundingInstructionsBankTransferFinancialAddressType = "iban"
FundingInstructionsBankTransferFinancialAddressTypeSortCode FundingInstructionsBankTransferFinancialAddressType = "sort_code"
FundingInstructionsBankTransferFinancialAddressTypeSpei FundingInstructionsBankTransferFinancialAddressType = "spei"
FundingInstructionsBankTransferFinancialAddressTypeZengin FundingInstructionsBankTransferFinancialAddressType = "zengin"
)

// The bank_transfer type
Expand All @@ -41,6 +46,38 @@ const (
FundingInstructionsFundingTypeBankTransfer FundingInstructionsFundingType = "bank_transfer"
)

// Iban Records contain E.U. bank account details per the SEPA format.
type FundingInstructionsBankTransferFinancialAddressIban struct {
// The name of the person or business that owns the bank account
AccountHolderName string `json:"account_holder_name"`
// The BIC/SWIFT code of the account.
Bic string `json:"bic"`
// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
Country string `json:"country"`
// The IBAN of the account.
Iban string `json:"iban"`
}

// Sort Code Records contain U.K. bank account details per the sort code format.
type FundingInstructionsBankTransferFinancialAddressSortCode struct {
// The name of the person or business that owns the bank account
AccountHolderName string `json:"account_holder_name"`
// The account number
AccountNumber string `json:"account_number"`
// The six-digit sort code
SortCode string `json:"sort_code"`
}

// SPEI Records contain Mexico bank account details per the SPEI format.
type FundingInstructionsBankTransferFinancialAddressSpei struct {
// The three-digit bank code
BankCode string `json:"bank_code"`
// The short banking institution name
BankName string `json:"bank_name"`
// The CLABE number
Clabe string `json:"clabe"`
}

// Zengin Records contain Japan bank account details per the Zengin format.
type FundingInstructionsBankTransferFinancialAddressZengin struct {
// The account holder name
Expand All @@ -61,6 +98,12 @@ type FundingInstructionsBankTransferFinancialAddressZengin struct {

// A list of financial addresses that can be used to fund a particular balance
type FundingInstructionsBankTransferFinancialAddress struct {
// Iban Records contain E.U. bank account details per the SEPA format.
Iban *FundingInstructionsBankTransferFinancialAddressIban `json:"iban"`
// Sort Code Records contain U.K. bank account details per the sort code format.
SortCode *FundingInstructionsBankTransferFinancialAddressSortCode `json:"sort_code"`
// SPEI Records contain Mexico bank account details per the SPEI format.
Spei *FundingInstructionsBankTransferFinancialAddressSpei `json:"spei"`
// The payment networks supported by this FinancialAddress
SupportedNetworks []FundingInstructionsBankTransferFinancialAddressSupportedNetwork `json:"supported_networks"`
// The type of financial address
Expand Down
17 changes: 15 additions & 2 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,17 @@ type InvoicePaymentSettingsPaymentMethodOptionsCardParams struct {
RequestThreeDSecure *string `form:"request_three_d_secure"`
}

// Configuration for eu_bank_transfer funding type.
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams struct {
// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
Country *string `form:"country"`
}

// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams struct {
// The bank transfer type that can be used for funding. Permitted values include: `jp_bank_transfer`.
// Configuration for eu_bank_transfer funding type.
EUBankTransfer *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
// The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
Type *string `form:"type"`
}

Expand Down Expand Up @@ -555,8 +563,13 @@ type InvoicePaymentSettingsPaymentMethodOptionsCard struct {
// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
RequestThreeDSecure InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`
}
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer struct {
// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
Country string `json:"country"`
}
type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer struct {
// The bank transfer type that can be used for funding. Permitted values include: `jp_bank_transfer`.
EUBankTransfer *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer `json:"eu_bank_transfer"`
// The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
Type string `json:"type"`
}

Expand Down
Loading