Skip to content

Commit

Permalink
Merge pull request #2254 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Feb 7, 2025
2 parents 13a8b02 + ceb7349 commit d24b9e8
Show file tree
Hide file tree
Showing 34 changed files with 241 additions and 75 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
!/LICENSE
!/README.md
!/VERSION
!/OPENAPI_VERSION
!/package.json
!/cjs/**/*
!/esm/**/*
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## 17.6.0 - 2025-01-27
* [#2250](https://github.com/stripe/stripe-node/pull/2250) Update generated code
* Add support for `close` method on resource `Treasury.FinancialAccount`
* Add support for `pay_by_bank_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
* Add support for `directorship_declaration` and `ownership_exemption_reason` on `Account.company`, `AccountCreateParams.company`, `AccountUpdateParams.company`, and `TokenCreateParams.account.company`
* Add support for `proof_of_ultimate_beneficial_ownership` on `AccountCreateParams.documents` and `AccountUpdateParams.documents`
* Add support for `financial_account` on `AccountSession.components`, `AccountSessionCreateParams.components`, and `Treasury.OutboundTransfer.destination_payment_method_details`
* Add support for `financial_account_transactions`, `issuing_card`, and `issuing_cards_list` on `AccountSession.components` and `AccountSessionCreateParams.components`
* Add support for `advice_code` on `Charge.outcome`, `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
* Change `Billing.CreditBalanceTransaction.credit.credits_application_invoice_voided`, `Card.regulated_status`, `Charge.payment_method_details.card.network_transaction_id`, `Charge.payment_method_details.card.regulated_status`, `ConfirmationToken.payment_method_preview.card.regulated_status`, `CreditNote.pretax_credit_amounts`, `Invoice.total_pretax_credit_amounts`, `Issuing.Authorization.merchant_data.tax_id`, `Issuing.Transaction.merchant_data.tax_id`, and `PaymentMethod.card.regulated_status` to be required
* Add support for `pay_by_bank` on `Charge.payment_method_details`, `Checkout.SessionCreateParams.payment_method_options`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.testHelpers.payment_method_data`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethodUpdateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data`
* Add support for `country` on `Charge.payment_method_details.paypal`, `ConfirmationToken.payment_method_preview.paypal`, and `PaymentMethod.paypal`
* Add support for new value `pay_by_bank` on enums `Checkout.SessionCreateParams.payment_method_types[]`, `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type`
* Add support for new value `SD` on enums `Checkout.Session.shipping_address_collection.allowed_countries[]`, `Checkout.SessionCreateParams.shipping_address_collection.allowed_countries[]`, `PaymentLink.shipping_address_collection.allowed_countries[]`, `PaymentLinkCreateParams.shipping_address_collection.allowed_countries[]`, and `PaymentLinkUpdateParams.shipping_address_collection.allowed_countries[]`
* Add support for `discounts` on `Checkout.Session`
* Add support for new value `pay_by_bank` on enums `ConfirmationTokenCreateParams.testHelpers.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type`
* Add support for new value `pay_by_bank` on enums `ConfirmationToken.payment_method_preview.type` and `PaymentMethod.type`
* Add support for new value `pay_by_bank` on enums `PaymentLink.payment_method_types[]`, `PaymentLinkCreateParams.payment_method_types[]`, and `PaymentLinkUpdateParams.payment_method_types[]`
* Add support for `phone_number_collection` on `PaymentLinkUpdateParams`
* Add support for `jpy` on `Terminal.Configuration.tipping`, `Terminal.ConfigurationCreateParams.tipping`, and `Terminal.ConfigurationUpdateParams.tipping`
* Add support for `nickname` on `Treasury.FinancialAccountCreateParams`, `Treasury.FinancialAccountUpdateParams`, and `Treasury.FinancialAccount`
* Add support for `forwarding_settings` on `Treasury.FinancialAccountUpdateParams`
* Add support for `is_default` on `Treasury.FinancialAccount`
* Add support for `destination_payment_method_data` on `Treasury.OutboundTransferCreateParams`
* Change type of `Treasury.OutboundTransfer.destination_payment_method_details.type` from `literal('us_bank_account')` to `enum('financial_account'|'us_bank_account')`
* Add support for new value `outbound_transfer` on enums `Treasury.ReceivedCredit.linked_flows.source_flow_details.type` and `Treasury.ReceivedCreditListParams.linked_flows.source_flow_type`
* Add support for `outbound_transfer` on `Treasury.ReceivedCredit.linked_flows.source_flow_details`
* Add support for new value `2025-01-27.acacia` on enum `WebhookEndpointCreateParams.api_version`
* [#2249](https://github.com/stripe/stripe-node/pull/2249) add justfile, remove coveralls, tweak ESLint
* [#2252](https://github.com/stripe/stripe-node/pull/2252) Added CONTRIBUTING.md file
* [#2242](https://github.com/stripe/stripe-node/pull/2242) Added pull request template

## 17.6.0-beta.3 - 2025-01-23
* [#2253](https://github.com/stripe/stripe-node/pull/2253) Update generated code for beta
* Change `Refund.destination_details.blik.network_decline_code` and `Refund.destination_details.swish.network_decline_code` to be required
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1460
v1472
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions types/AccountSessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ declare module 'stripe' {
*/
payouts_list?: Components.PayoutsList;

/**
* Configuration for the product tax code selector embedded component.
*/
product_tax_code_selector?: Components.ProductTaxCodeSelector;

/**
* Configuration for the recipients component.
*/
Expand Down Expand Up @@ -668,6 +673,22 @@ declare module 'stripe' {
interface Features {}
}

interface ProductTaxCodeSelector {
/**
* Whether the embedded component is enabled.
*/
enabled: boolean;

/**
* The list of features enabled in the embedded component.
*/
features?: ProductTaxCodeSelector.Features;
}

namespace ProductTaxCodeSelector {
interface Features {}
}

interface Recipients {
/**
* Whether the embedded component is enabled.
Expand Down
15 changes: 15 additions & 0 deletions types/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,11 @@ declare module 'stripe' {
charges: RiskControls.Charges;

payouts: RiskControls.Payouts;

/**
* Represents the rejected reason of the account. Empty if account is not rejected, or rejected by Stripe. Please see [this page for more details](https://stripe.com/docs/connect/)
*/
rejected_reason?: RiskControls.RejectedReason;
}

namespace RiskControls {
Expand All @@ -1448,6 +1453,16 @@ declare module 'stripe' {
*/
pause_requested: boolean;
}

type RejectedReason =
| 'credit'
| 'fraud'
| 'fraud_no_intent_to_fulfill'
| 'fraud_other'
| 'fraud_payment_method_casher'
| 'fraud_payment_method_tester'
| 'other'
| 'terms_of_service';
}

interface Settings {
Expand Down
8 changes: 6 additions & 2 deletions types/AccountsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4157,7 +4157,7 @@ declare module 'stripe' {
/**
* Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
*/
political_exposure?: string;
political_exposure?: AccountCreatePersonParams.PoliticalExposure;

/**
* The person's registered address.
Expand Down Expand Up @@ -4264,6 +4264,8 @@ declare module 'stripe' {
}
}

type PoliticalExposure = 'existing' | 'none';

interface Relationship {
/**
* Whether the person is the authorizer of the account's representative.
Expand Down Expand Up @@ -4697,7 +4699,7 @@ declare module 'stripe' {
/**
* Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
*/
political_exposure?: string;
political_exposure?: AccountUpdatePersonParams.PoliticalExposure;

/**
* The person's registered address.
Expand Down Expand Up @@ -4804,6 +4806,8 @@ declare module 'stripe' {
}
}

type PoliticalExposure = 'existing' | 'none';

interface Relationship {
/**
* Whether the person is the authorizer of the account's representative.
Expand Down
36 changes: 18 additions & 18 deletions types/Balance.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ declare module 'stripe' {
namespace Available {
interface SourceTypes {
/**
* Amount for bank account.
* Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
*/
bank_account?: number;

/**
* Amount for card.
* Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
*/
card?: number;

/**
* Amount for FPX.
* Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
*/
fpx?: number;
}
Expand All @@ -100,17 +100,17 @@ declare module 'stripe' {
namespace ConnectReserved {
interface SourceTypes {
/**
* Amount for bank account.
* Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
*/
bank_account?: number;

/**
* Amount for card.
* Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
*/
card?: number;

/**
* Amount for FPX.
* Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
*/
fpx?: number;
}
Expand Down Expand Up @@ -153,35 +153,35 @@ declare module 'stripe' {
namespace NetAvailable {
interface SourceTypes {
/**
* Amount for bank account.
* Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
*/
bank_account?: number;

/**
* Amount for card.
* Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
*/
card?: number;

/**
* Amount for FPX.
* Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
*/
fpx?: number;
}
}

interface SourceTypes {
/**
* Amount for bank account.
* Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
*/
bank_account?: number;

/**
* Amount for card.
* Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
*/
card?: number;

/**
* Amount for FPX.
* Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
*/
fpx?: number;
}
Expand Down Expand Up @@ -212,17 +212,17 @@ declare module 'stripe' {
namespace Available {
interface SourceTypes {
/**
* Amount for bank account.
* Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
*/
bank_account?: number;

/**
* Amount for card.
* Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
*/
card?: number;

/**
* Amount for FPX.
* Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
*/
fpx?: number;
}
Expand All @@ -246,17 +246,17 @@ declare module 'stripe' {
namespace Pending {
interface SourceTypes {
/**
* Amount for bank account.
* Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
*/
bank_account?: number;

/**
* Amount for card.
* Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
*/
card?: number;

/**
* Amount for FPX.
* Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
*/
fpx?: number;
}
Expand Down
14 changes: 14 additions & 0 deletions types/Billing/CreditBalanceSummaryResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ declare module 'stripe' {
* The price type that credit grants can apply to. We currently only support the `metered` price type.
*/
price_type: 'metered';

/**
* A list of prices that the credit grant can apply to. We currently only support the `metered` prices.
*/
prices?: Array<ApplicabilityScope.Price>;
}

namespace ApplicabilityScope {
interface Price {
/**
* The price ID this credit grant should apply to.
*/
id: string;
}
}

type Type = 'applicability_scope' | 'credit_grant';
Expand Down
16 changes: 15 additions & 1 deletion types/Billing/CreditGrants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,21 @@ declare module 'stripe' {
/**
* The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
*/
price_type: 'metered';
price_type?: 'metered';

/**
* The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
*/
prices?: Array<Scope.Price>;
}

namespace Scope {
interface Price {
/**
* Unique identifier for the object.
*/
id: string | null;
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions types/Billing/CreditGrantsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ declare module 'stripe' {
* The price type that credit grants can apply to. We currently only support the `metered` price type.
*/
price_type: 'metered';

/**
* A list of prices that the credit grant can apply to. We currently only support the `metered` prices.
*/
prices?: Array<Scope.Price>;
}

namespace Scope {
interface Price {
/**
* The price ID this credit grant should apply to.
*/
id: string;
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions types/Billing/MeterEventSummaries.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ declare module 'stripe' {
/**
* A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much
* usage was accrued by a customer for that period.
*
* Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage.
*/
interface MeterEventSummary {
/**
Expand Down
10 changes: 10 additions & 0 deletions types/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,11 @@ declare module 'stripe' {
*/
brand: string | null;

/**
* The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
*/
brand_product?: string | null;

/**
* Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
*/
Expand Down Expand Up @@ -2218,6 +2223,11 @@ declare module 'stripe' {
*/
brand: string | null;

/**
* The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
*/
brand_product?: string | null;

/**
* Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
*/
Expand Down
Loading

0 comments on commit d24b9e8

Please sign in to comment.