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

Update generated code #2088

Merged
merged 16 commits into from
May 16, 2024
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 @@
v1020
v1039
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

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 @@ -1164,6 +1164,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 @@ -1531,7 +1531,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 @@ -1825,7 +1825,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 @@ -580,6 +580,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
11 changes: 10 additions & 1 deletion types/Disputes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ declare module 'stripe' {
interface PaymentMethodDetails {
card?: PaymentMethodDetails.Card;

klarna?: PaymentMethodDetails.Klarna;

paypal?: PaymentMethodDetails.Paypal;

/**
Expand All @@ -271,6 +273,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 @@ -283,7 +292,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 @@ -63,7 +63,7 @@ declare module 'stripe' {
/**
* List of countries from which to collect accounts.
*/
countries: Array<string>;
countries?: Array<string>;
}

type Permission =
Expand Down
2 changes: 1 addition & 1 deletion types/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,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
40 changes: 40 additions & 0 deletions types/Issuing/DisputesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ declare module 'stripe' {
Evidence.MerchandiseNotAsDescribed
>;

/**
* Evidence provided when `reason` is 'no_valid_authorization'.
*/
no_valid_authorization?: Stripe.Emptyable<
Evidence.NoValidAuthorization
>;

/**
* Evidence provided when `reason` is 'not_received'.
*/
Expand Down Expand Up @@ -254,6 +261,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?: Stripe.Emptyable<string>;

/**
* Explanation of why the cardholder is disputing this transaction.
*/
explanation?: Stripe.Emptyable<string>;
}

interface Other {
/**
* (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
Expand Down Expand Up @@ -285,6 +304,7 @@ declare module 'stripe' {
| 'duplicate'
| 'fraudulent'
| 'merchandise_not_as_described'
| 'no_valid_authorization'
| 'not_received'
| 'other'
| 'service_not_as_described';
Expand Down Expand Up @@ -378,6 +398,13 @@ declare module 'stripe' {
Evidence.MerchandiseNotAsDescribed
>;

/**
* Evidence provided when `reason` is 'no_valid_authorization'.
*/
no_valid_authorization?: Stripe.Emptyable<
Evidence.NoValidAuthorization
>;

/**
* Evidence provided when `reason` is 'not_received'.
*/
Expand Down Expand Up @@ -573,6 +600,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?: Stripe.Emptyable<string>;

/**
* Explanation of why the cardholder is disputing this transaction.
*/
explanation?: Stripe.Emptyable<string>;
}

interface Other {
/**
* (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
Expand Down Expand Up @@ -604,6 +643,7 @@ declare module 'stripe' {
| 'duplicate'
| 'fraudulent'
| 'merchandise_not_as_described'
| 'no_valid_authorization'
| 'not_received'
| 'other'
| 'service_not_as_described';
Expand Down
15 changes: 15 additions & 0 deletions types/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1757,6 +1757,21 @@ declare module 'stripe' {
* Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
*/
request_incremental_authorization_support: boolean | null;

routing?: CardPresent.Routing;
}

namespace CardPresent {
interface Routing {
/**
* Requested routing priority
*/
requested_priority: Routing.RequestedPriority | null;
}

namespace Routing {
type RequestedPriority = 'domestic' | 'international';
}
}

interface Cashapp {
Expand Down
Loading
Loading