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 for beta #2079

Merged
merged 20 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6ceac11
Deprecate Node methods and params based on OpenAPI spec (#2077)
prathmesh-stripe May 2, 2024
ae8f2c0
Update generated code (#2072)
stripe-openapi[bot] May 2, 2024
4c6c96e
Bump version to 15.5.0
helenye-stripe May 2, 2024
30b7565
Merge upstream and update generated code for v1009
stripe-openapi[bot] May 3, 2024
c7b4638
Update generated code for v1010
stripe-openapi[bot] May 3, 2024
968d3b9
Update generated code for v1011
stripe-openapi[bot] May 6, 2024
1f3f9b0
Update generated code for v1012
stripe-openapi[bot] May 6, 2024
9145412
Empty commit
ramya-stripe May 6, 2024
c64d8d0
Merge upstream and update generated code for v1013
stripe-openapi[bot] May 7, 2024
dc9971f
add local pre-req script to bail early if tests will fail (#2083)
xavdid-stripe May 7, 2024
c5593fa
Merge upstream and update generated code for v1014
stripe-openapi[bot] May 7, 2024
14e485c
Revert "add local pre-req script to bail early if tests will fail" (#…
xavdid-stripe May 7, 2024
f34838a
Merge upstream and update generated code for v1014
stripe-openapi[bot] May 7, 2024
5d8d519
Update generated code for v1015
stripe-openapi[bot] May 8, 2024
28a34b2
Update generated code for v1017
stripe-openapi[bot] May 9, 2024
64b3788
Removed deprecation message description (#2085)
prathmesh-stripe May 9, 2024
b535ddf
Merge upstream and update generated code for v1017
stripe-openapi[bot] May 9, 2024
3fc3249
Update generated code for v1019
stripe-openapi[bot] May 9, 2024
2812903
Update generated code (#2080)
stripe-openapi[bot] May 9, 2024
2ca3581
Merge upstream and update generated code for v1020
stripe-openapi[bot] May 9, 2024
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
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@
* Change `GiftCards.Card.code` and `GiftCards.Card.transactions` to be optional
* Change `Tax.Calculation.ship_from_details` and `Tax.Transaction.ship_from_details` to be required

## 15.5.0 - 2024-05-02
* [#2072](https://github.com/stripe/stripe-node/pull/2072) Update generated code
* Add support for new value `shipping_address_invalid` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`
* Fix properties incorrectly marked as required in the OpenAPI spec.
* Change `Apps.Secret.payload`, `BillingPortal.Configuration.features.subscription_update.products`, `Charge.refunds`, `ConfirmationToken.payment_method_preview.klarna.dob`, `Identity.VerificationReport.document.dob`, `Identity.VerificationReport.document.expiration_date`, `Identity.VerificationReport.document.number`, `Identity.VerificationReport.id_number.dob`, `Identity.VerificationReport.id_number.id_number`, `Identity.VerificationSession.provided_details`, `Identity.VerificationSession.verified_outputs.dob`, `Identity.VerificationSession.verified_outputs.id_number`, `Identity.VerificationSession.verified_outputs`, `Issuing.Dispute.balance_transactions`, `Issuing.Transaction.purchase_details`, `PaymentMethod.klarna.dob`, `Tax.Calculation.line_items`, `Tax.CalculationLineItem.tax_breakdown`, `Tax.Transaction.line_items`, `Treasury.FinancialAccount.financial_addresses[].aba.account_number`, `Treasury.ReceivedCredit.linked_flows.source_flow_details`, `Treasury.Transaction.entries`, `Treasury.Transaction.flow_details`, and `Treasury.TransactionEntry.flow_details` to be optional
* Add support for `paypal` on `Dispute.payment_method_details`
* Change type of `Dispute.payment_method_details.type` from `literal('card')` to `enum('card'|'paypal')`
* Change type of `Entitlements.FeatureUpdateParams.metadata` from `map(string: string)` to `emptyable(map(string: string))`
* Add support for `payment_method_types` on `PaymentIntentConfirmParams`
* Add support for `ship_from_details` on `Tax.CalculationCreateParams`, `Tax.Calculation`, and `Tax.Transaction`
* Add support for `bh`, `eg`, `ge`, `ke`, `kz`, `ng`, and `om` on `Tax.Registration.country_options` and `Tax.RegistrationCreateParams.country_options`
* [#2077](https://github.com/stripe/stripe-node/pull/2077) Deprecate Node methods and params based on OpenAPI spec
- Mark as deprecated the `approve` and `decline` methods on `Issuing.Authorization`. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
- Mark as deprecated the `persistent_token` property on `ConfirmationToken.PaymentMethodPreview.Link`, `PaymentIntent.PaymentMethodOptions.Link`, `PaymentIntentResource.PaymentMethodOptions.Link`, `PaymentMethod.Link.persistent_token`. `SetupIntents.PaymentMethodOptions.Card.Link.persistent_token`, `SetupIntentsResource.persistent_token`. This is a legacy parameter that no longer has any function.
* [#2074](https://github.com/stripe/stripe-node/pull/2074) Add a more explicit comment on `limit` param in `autoPagingToArray`

## 15.5.0-beta.1 - 2024-04-25
* [#2070](https://github.com/stripe/stripe-node/pull/2070) Update generated code for beta
* Add support for `payment_method_settings` on `AccountSessionCreateParams.components`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1008
v1020
4 changes: 4 additions & 0 deletions src/resources/TestHelpers/Treasury/OutboundPayments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import {StripeResource} from '../../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const OutboundPayments = StripeResource.extend({
update: stripeMethod({
method: 'POST',
fullPath: '/v1/test_helpers/treasury/outbound_payments/{id}',
}),
fail: stripeMethod({
method: 'POST',
fullPath: '/v1/test_helpers/treasury/outbound_payments/{id}/fail',
Expand Down
5 changes: 5 additions & 0 deletions src/resources/TestHelpers/Treasury/OutboundTransfers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
import {StripeResource} from '../../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const OutboundTransfers = StripeResource.extend({
update: stripeMethod({
method: 'POST',
fullPath:
'/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}',
}),
fail: stripeMethod({
method: 'POST',
fullPath:
Expand Down
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion types/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ declare module 'stripe' {
deleted?: void;

/**
* Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true.
* Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](https://stripe.com/connect/onboarding) to finish submitting account details.
*/
details_submitted: boolean;

Expand Down
12 changes: 6 additions & 6 deletions types/AccountsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1121,12 +1121,12 @@ declare module 'stripe' {
address?: Stripe.AddressParam;

/**
* The Kana variation of the the individual's primary address (Japan only).
* The Kana variation of the individual's primary address (Japan only).
*/
address_kana?: Stripe.JapanAddressParam;

/**
* The Kanji variation of the the individual's primary address (Japan only).
* The Kanji variation of the individual's primary address (Japan only).
*/
address_kanji?: Stripe.JapanAddressParam;

Expand All @@ -1146,7 +1146,7 @@ declare module 'stripe' {
first_name?: string;

/**
* The Kana variation of the the individual's first name (Japan only).
* The Kana variation of the individual's first name (Japan only).
*/
first_name_kana?: string;

Expand Down Expand Up @@ -2674,12 +2674,12 @@ declare module 'stripe' {
address?: Stripe.AddressParam;

/**
* The Kana variation of the the individual's primary address (Japan only).
* The Kana variation of the individual's primary address (Japan only).
*/
address_kana?: Stripe.JapanAddressParam;

/**
* The Kanji variation of the the individual's primary address (Japan only).
* The Kanji variation of the individual's primary address (Japan only).
*/
address_kanji?: Stripe.JapanAddressParam;

Expand All @@ -2699,7 +2699,7 @@ declare module 'stripe' {
first_name?: string;

/**
* The Kana variation of the the individual's first name (Japan only).
* The Kana variation of the individual's first name (Japan only).
*/
first_name_kana?: string;

Expand Down
4 changes: 1 addition & 3 deletions types/Capabilities.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,11 @@ declare module 'stripe' {
currently_due: Array<string>;

/**
* If the capability is disabled, this string describes why. Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.fraud`, `rejected.other`, `platform_paused`, `action_required.requested_capabilities`, `rejected.inactivty`, or `rejected.unsupported_business`.
* If the capability is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.other`, `platform_paused`, `rejected.inactivty`, or `rejected.unsupported_business`.
*
* `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service, such as in [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses).
*
* `rejected.inactivity` means that the capability has been paused for inactivity. This disabled reason currently only applies to the Issuing capability. See [Issuing: Managing Inactive Connects](https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts) for more details.
*
* If you believe that a rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
*/
disabled_reason: string | null;

Expand Down
2 changes: 1 addition & 1 deletion types/Capital/FinancingSummary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ declare module 'stripe' {
advance_amount: number;

/**
* The time at which the funds were paid out the the Connected account's Stripe balance. Given in milliseconds since unix epoch.
* The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch.
*/
advance_paid_out_at: number | null;

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 @@ -1573,7 +1573,7 @@ declare module 'stripe' {
> | null;

/**
* Enable customers to choose if they wish to save their payment method for future use.
* Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
*/
payment_method_save: SavedPaymentMethodOptions.PaymentMethodSave | null;
}
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 @@ -1864,7 +1864,7 @@ declare module 'stripe' {
>;

/**
* Enable customers to choose if they wish to save their payment method for future use.
* Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
*/
payment_method_save?: SavedPaymentMethodOptions.PaymentMethodSave;
}
Expand Down
7 changes: 7 additions & 0 deletions types/ConfirmationTokens.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ declare module 'stripe' {

alipay?: PaymentMethodPreview.Alipay;

/**
* This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
*/
allow_redisplay?: PaymentMethodPreview.AllowRedisplay;

amazon_pay?: PaymentMethodPreview.AmazonPay;

au_becs_debit?: PaymentMethodPreview.AuBecsDebit;
Expand Down Expand Up @@ -262,6 +267,8 @@ declare module 'stripe' {

interface Alipay {}

type AllowRedisplay = 'always' | 'limited' | 'unspecified';

interface AmazonPay {}

interface AuBecsDebit {
Expand Down
2 changes: 1 addition & 1 deletion types/CreditNotesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ declare module 'stripe' {
list(options?: RequestOptions): ApiListPromise<Stripe.CreditNote>;

/**
* When retrieving a credit note, you'll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
* When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
*/
listLineItems(
id: string,
Expand Down
36 changes: 36 additions & 0 deletions types/EventTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,14 @@ declare module 'stripe' {
| TreasuryOutboundPaymentFailedEvent
| TreasuryOutboundPaymentPostedEvent
| TreasuryOutboundPaymentReturnedEvent
| TreasuryOutboundPaymentTrackingDetailsUpdatedEvent
| TreasuryOutboundTransferCanceledEvent
| TreasuryOutboundTransferCreatedEvent
| TreasuryOutboundTransferExpectedArrivalDateUpdatedEvent
| TreasuryOutboundTransferFailedEvent
| TreasuryOutboundTransferPostedEvent
| TreasuryOutboundTransferReturnedEvent
| TreasuryOutboundTransferTrackingDetailsUpdatedEvent
| TreasuryReceivedCreditCreatedEvent
| TreasuryReceivedCreditFailedEvent
| TreasuryReceivedCreditSucceededEvent
Expand Down Expand Up @@ -4205,6 +4207,23 @@ declare module 'stripe' {
}
}

/**
* Occurs whenever tracking_details on an OutboundPayment is updated.
*/
interface TreasuryOutboundPaymentTrackingDetailsUpdatedEvent
extends EventBase {
type: 'treasury.outbound_payment.tracking_details_updated';
data: TreasuryOutboundPaymentTrackingDetailsUpdatedEvent.Data;
}

namespace TreasuryOutboundPaymentTrackingDetailsUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Treasury.OutboundPayment;

previous_attributes?: Partial<Stripe.Treasury.OutboundPayment>;
}
}

/**
* Occurs whenever an OutboundTransfer is canceled.
*/
Expand Down Expand Up @@ -4302,6 +4321,23 @@ declare module 'stripe' {
}
}

/**
* Occurs whenever tracking_details on an OutboundTransfer is updated.
*/
interface TreasuryOutboundTransferTrackingDetailsUpdatedEvent
extends EventBase {
type: 'treasury.outbound_transfer.tracking_details_updated';
data: TreasuryOutboundTransferTrackingDetailsUpdatedEvent.Data;
}

namespace TreasuryOutboundTransferTrackingDetailsUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Treasury.OutboundTransfer;

previous_attributes?: Partial<Stripe.Treasury.OutboundTransfer>;
}
}

/**
* Occurs whenever a received_credit is created as a result of funds being pushed by another account.
*/
Expand Down
2 changes: 2 additions & 0 deletions types/Events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,14 @@ declare module 'stripe' {
| 'treasury.outbound_payment.failed'
| 'treasury.outbound_payment.posted'
| 'treasury.outbound_payment.returned'
| 'treasury.outbound_payment.tracking_details_updated'
| 'treasury.outbound_transfer.canceled'
| 'treasury.outbound_transfer.created'
| 'treasury.outbound_transfer.expected_arrival_date_updated'
| 'treasury.outbound_transfer.failed'
| 'treasury.outbound_transfer.posted'
| 'treasury.outbound_transfer.returned'
| 'treasury.outbound_transfer.tracking_details_updated'
| 'treasury.received_credit.created'
| 'treasury.received_credit.failed'
| 'treasury.received_credit.succeeded'
Expand Down
2 changes: 1 addition & 1 deletion types/InvoiceItemsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ declare module 'stripe' {
quantity?: number;

/**
* The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
* The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
*/
subscription?: string;

Expand Down
4 changes: 2 additions & 2 deletions types/Issuing/AuthorizationsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ declare module 'stripe' {
/**
* [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
* This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
* @deprecated This method is deprecated, please refer to the description for details.
* @deprecated
*/
approve(
id: string,
Expand All @@ -134,7 +134,7 @@ declare module 'stripe' {
/**
* [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
* This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
* @deprecated This method is deprecated, please refer to the description for details.
* @deprecated
*/
decline(
id: string,
Expand Down
7 changes: 7 additions & 0 deletions types/PaymentMethods.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ declare module 'stripe' {

alipay?: PaymentMethod.Alipay;

/**
* This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
*/
allow_redisplay?: PaymentMethod.AllowRedisplay;

amazon_pay?: PaymentMethod.AmazonPay;

au_becs_debit?: PaymentMethod.AuBecsDebit;
Expand Down Expand Up @@ -169,6 +174,8 @@ declare module 'stripe' {

interface Alipay {}

type AllowRedisplay = 'always' | 'limited' | 'unspecified';

interface AmazonPay {}

interface AuBecsDebit {
Expand Down
2 changes: 1 addition & 1 deletion types/Quotes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ declare module 'stripe' {
line_items?: ApiList<Stripe.LineItem>;

/**
* A list of lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
* A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
*/
lines?: Array<string> | null;

Expand Down
4 changes: 2 additions & 2 deletions types/QuotesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ declare module 'stripe' {
line_items?: Array<QuoteCreateParams.LineItem>;

/**
* A list of lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
* A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
*/
lines?: Array<QuoteCreateParams.Line>;

Expand Down Expand Up @@ -1791,7 +1791,7 @@ declare module 'stripe' {
line_items?: Array<QuoteUpdateParams.LineItem>;

/**
* A list of lines on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
* A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
*/
lines?: Array<QuoteUpdateParams.Line>;

Expand Down
Loading
Loading