Skip to content

Commit

Permalink
Merge pull request #2087 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] committed May 16, 2024
2 parents f76b2fd + c465cbd commit 19b72fa
Show file tree
Hide file tree
Showing 31 changed files with 338 additions and 18 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
* [#2079](https://github.com/stripe/stripe-node/pull/2079) Update generated code for beta
* No new beta features. Merging changes from the main branch.

## 15.6.0 - 2024-05-09
* [#2086](https://github.com/stripe/stripe-node/pull/2086) Update generated code
* Remove support for `pending_invoice_items_behavior` on `SubscriptionCreateParams`
* [#2080](https://github.com/stripe/stripe-node/pull/2080) Update generated code
* Add support for `update` test helper method on resources `Treasury.OutboundPayment` and `Treasury.OutboundTransfer`
* Add support for `allow_redisplay` on `ConfirmationToken.payment_method_preview` and `PaymentMethod`
* Add support for new values `treasury.outbound_payment.tracking_details_updated` and `treasury.outbound_transfer.tracking_details_updated` on enum `Event.type`
* Add support for `preview_mode` on `InvoiceCreatePreviewParams`, `InvoiceUpcomingLinesParams`, and `InvoiceUpcomingParams`
* Add support for `pending_invoice_items_behavior` on `SubscriptionCreateParams`
* Add support for `tracking_details` on `Treasury.OutboundPayment` and `Treasury.OutboundTransfer`
* Add support for new values `treasury.outbound_payment.tracking_details_updated` and `treasury.outbound_transfer.tracking_details_updated` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`
* [#2085](https://github.com/stripe/stripe-node/pull/2085) Remove unnecessary pointer to description in deprecation message

## 15.6.0-beta.1 - 2024-05-02
* [#2073](https://github.com/stripe/stripe-node/pull/2073) Update generated code for beta
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1020
v1039
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion types/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ declare module 'stripe' {
treasury?: Capabilities.Treasury;

/**
* The status of the Twint capability of the account, or whether the account can directly process Twint charges.
* The status of the TWINT capability of the account, or whether the account can directly process TWINT charges.
*/
twint_payments?: Capabilities.TwintPayments;

Expand Down Expand Up @@ -1197,10 +1197,16 @@ declare module 'stripe' {

namespace RiskControls {
interface Charges {
/**
* Whether a pause of the risk control has been requested.
*/
pause_requested: boolean;
}

interface Payouts {
/**
* Whether a pause of the risk control has been requested.
*/
pause_requested: boolean;
}
}
Expand Down
28 changes: 28 additions & 0 deletions types/ApplicationFees.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ declare module 'stripe' {
*/
currency: string;

/**
* Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.
*/
fee_source: ApplicationFee.FeeSource | null;

/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
Expand All @@ -76,5 +81,28 @@ declare module 'stripe' {
*/
refunds: ApiList<Stripe.FeeRefund>;
}

namespace ApplicationFee {
interface FeeSource {
/**
* Charge ID that created this application fee.
*/
charge?: string;

/**
* Payout ID that created this application fee.
*/
payout?: string;

/**
* Type of object that created the application fee, either `charge` or `payout`.
*/
type: FeeSource.Type;
}

namespace FeeSource {
type Type = 'charge' | 'payout';
}
}
}
}
38 changes: 38 additions & 0 deletions types/Balance.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,48 @@ declare module 'stripe' {
*/
currency: string;

/**
* Breakdown of balance by destination.
*/
net_available?: Array<InstantAvailable.NetAvailable>;

source_types?: InstantAvailable.SourceTypes;
}

namespace InstantAvailable {
interface NetAvailable {
/**
* Net balance amount, subtracting fees from platform-set pricing.
*/
amount: number;

/**
* ID of the external account for this net balance (not expandable).
*/
destination: string;

source_types?: NetAvailable.SourceTypes;
}

namespace NetAvailable {
interface SourceTypes {
/**
* Amount for bank account.
*/
bank_account?: number;

/**
* Amount for card.
*/
card?: number;

/**
* Amount for FPX.
*/
fpx?: number;
}
}

interface SourceTypes {
/**
* Amount for bank account.
Expand Down
5 changes: 5 additions & 0 deletions types/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,11 @@ declare module 'stripe' {
*/
overcapture_supported: boolean;

/**
* EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
*/
preferred_locales: Array<string> | null;

/**
* How card details were read in this transaction.
*/
Expand Down
2 changes: 1 addition & 1 deletion types/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ declare module 'stripe' {

interface SavedPaymentMethodOptions {
/**
* Controls which payment methods are eligible to be redisplayed to returning customers. Corresponds to `allow_redisplay` on the payment method.
* Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout.
*/
allow_redisplay_filters: Array<
SavedPaymentMethodOptions.AllowRedisplayFilter
Expand Down
2 changes: 1 addition & 1 deletion types/Checkout/SessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ declare module 'stripe' {

interface SavedPaymentMethodOptions {
/**
* Controls which payment methods are eligible to be redisplayed to returning customers. Corresponds to `allow_redisplay` on the payment method.
* Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout.
*/
allow_redisplay_filters?: Array<
SavedPaymentMethodOptions.AllowRedisplayFilter
Expand Down
5 changes: 5 additions & 0 deletions types/ConfirmationTokens.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,11 @@ declare module 'stripe' {
*/
networks: CardPresent.Networks | null;

/**
* EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
*/
preferred_locales: Array<string> | null;

/**
* How card details were read in this transaction.
*/
Expand Down
6 changes: 5 additions & 1 deletion types/CustomerSessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@ declare module 'stripe' {
namespace PaymentElement {
interface Features {
/**
* Controls whether the Payment Element displays the option to remove a saved payment method.
* Controls whether the Payment Element displays the option to remove a saved payment method."
*
* Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
*/
payment_method_remove: Features.PaymentMethodRemove;

/**
* Controls whether the Payment Element displays a checkbox offering to save a new payment method.
*
* If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
*/
payment_method_save: Features.PaymentMethodSave;

Expand Down
6 changes: 5 additions & 1 deletion types/CustomerSessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ declare module 'stripe' {
namespace PaymentElement {
interface Features {
/**
* Controls whether the Payment Element displays the option to remove a saved payment method.
* Controls whether the Payment Element displays the option to remove a saved payment method."
*
* Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
*/
payment_method_remove?: Features.PaymentMethodRemove;

/**
* Controls whether the Payment Element displays a checkbox offering to save a new payment method.
*
* If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
*/
payment_method_save?: Features.PaymentMethodSave;

Expand Down
11 changes: 10 additions & 1 deletion types/Disputes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@ declare module 'stripe' {
interface PaymentMethodDetails {
card?: PaymentMethodDetails.Card;

klarna?: PaymentMethodDetails.Klarna;

paypal?: PaymentMethodDetails.Paypal;

/**
Expand All @@ -438,6 +440,13 @@ declare module 'stripe' {
network_reason_code: string | null;
}

interface Klarna {
/**
* The reason for the dispute as defined by Klarna
*/
reason_code: string | null;
}

interface Paypal {
/**
* The ID of the dispute in PayPal.
Expand All @@ -450,7 +459,7 @@ declare module 'stripe' {
reason_code: string | null;
}

type Type = 'card' | 'paypal';
type Type = 'card' | 'klarna' | 'paypal';
}

type Status =
Expand Down
10 changes: 10 additions & 0 deletions types/Entitlements/FeaturesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,20 @@ declare module 'stripe' {
}

interface FeatureListParams extends PaginationParams {
/**
* If set, filter results to only include features with the given archive status.
*/
archived?: boolean;

/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;

/**
* If set, filter results to only include features with the given lookup_key.
*/
lookup_key?: string;
}

class FeaturesResource {
Expand Down
2 changes: 1 addition & 1 deletion types/FinancialConnections/SessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ declare module 'stripe' {
/**
* List of countries from which to collect accounts.
*/
countries: Array<string>;
countries?: Array<string>;
}

interface Limits {
Expand Down
2 changes: 1 addition & 1 deletion types/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ declare module 'stripe' {
application_fee_amount: number | null;

/**
* Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
* Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
*/
attempt_count: number;

Expand Down
42 changes: 42 additions & 0 deletions types/Issuing/Disputes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ declare module 'stripe' {
*/
livemode: boolean;

/**
* The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
*/
loss_reason?: Dispute.LossReason;

/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
Expand Down Expand Up @@ -77,6 +82,8 @@ declare module 'stripe' {

merchandise_not_as_described?: Evidence.MerchandiseNotAsDescribed;

no_valid_authorization?: Evidence.NoValidAuthorization;

not_received?: Evidence.NotReceived;

other?: Evidence.Other;
Expand Down Expand Up @@ -259,6 +266,18 @@ declare module 'stripe' {
type ProductType = 'merchandise' | 'service';
}

interface NoValidAuthorization {
/**
* (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
*/
additional_documentation: string | Stripe.File | null;

/**
* Explanation of why the cardholder is disputing this transaction.
*/
explanation: string | null;
}

interface Other {
/**
* (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
Expand Down Expand Up @@ -290,6 +309,7 @@ declare module 'stripe' {
| 'duplicate'
| 'fraudulent'
| 'merchandise_not_as_described'
| 'no_valid_authorization'
| 'not_received'
| 'other'
| 'service_not_as_described';
Expand Down Expand Up @@ -322,6 +342,28 @@ declare module 'stripe' {
}
}

type LossReason =
| 'cardholder_authentication_issuer_liability'
| 'eci5_token_transaction_with_tavv'
| 'excess_disputes_in_timeframe'
| 'has_not_met_the_minimum_dispute_amount_requirements'
| 'invalid_duplicate_dispute'
| 'invalid_incorrect_amount_dispute'
| 'invalid_no_authorization'
| 'invalid_use_of_disputes'
| 'merchandise_delivered_or_shipped'
| 'merchandise_or_service_as_described'
| 'not_cancelled'
| 'other'
| 'refund_issued'
| 'submitted_beyond_allowable_time_limit'
| 'transaction_3ds_required'
| 'transaction_approved_after_prior_fraud_dispute'
| 'transaction_authorized'
| 'transaction_electronically_read'
| 'transaction_qualifies_for_visa_easy_payment_service'
| 'transaction_unattended';

type Status = 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won';

interface Treasury {
Expand Down

0 comments on commit 19b72fa

Please sign in to comment.