Skip to content

Commit

Permalink
Merge pull request #2162 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 Sep 5, 2024
2 parents ee8f16c + 101d254 commit 57b8b5d
Show file tree
Hide file tree
Showing 40 changed files with 448 additions and 56 deletions.
20 changes: 15 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 16.9.0 - 2024-08-29
* [#2163](https://github.com/stripe/stripe-node/pull/2163) Generate SDK for OpenAPI spec version 1230
* Change `AccountLinkCreateParams.collection_options.fields` and `LineItem.description` to be optional
* Add support for new value `hr_oib` on enums `Checkout.Session.customer_details.tax_ids[].type`, `Invoice.customer_tax_ids[].type`, `Tax.Calculation.customer_details.tax_ids[].type`, `Tax.Transaction.customer_details.tax_ids[].type`, and `TaxId.type`
* Add support for new value `hr_oib` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `InvoiceUpcomingLinesParams.customer_details.tax_ids[].type`, `InvoiceUpcomingParams.customer_details.tax_ids[].type`, `Tax.CalculationCreateParams.customer_details.tax_ids[].type`, and `TaxIdCreateParams.type`
* Add support for new value `issuing_regulatory_reporting` on enums `File.purpose` and `FileListParams.purpose`
* Add support for new value `issuing_regulatory_reporting` on enum `FileCreateParams.purpose`
* Change `Issuing.Card.shipping.address_validation` to be required
* Add support for `status_details` on `TestHelpers.TestClock`

## 16.9.0-beta.2 - 2024-08-22
* [#2159](https://github.com/stripe/stripe-node/pull/2159) Update generated code for beta
* Add support for `mb_way_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
Expand Down Expand Up @@ -62,10 +72,10 @@

## 16.6.0 - 2024-08-01
* [#2144](https://github.com/stripe/stripe-node/pull/2144) Update generated code
* Add support for new resources `Billing.AlertTriggered` and `Billing.Alert`
* Add support for new value `charge_exceeds_transaction_limit` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`
* ⚠️ Remove support for `authorization_code` on `Charge.payment_method_details.card`. This was accidentally released last week.
* Add support for new value `billing.alert.triggered` on enum `Event.type`
* Add support for new resources `Billing.AlertTriggered` and `Billing.Alert`
* Add support for new value `charge_exceeds_transaction_limit` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`
* ⚠️ Remove support for `authorization_code` on `Charge.payment_method_details.card`. This was accidentally released last week.
* Add support for new value `billing.alert.triggered` on enum `Event.type`
* Add support for new value `billing.alert.triggered` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`

## 16.6.0-beta.1 - 2024-07-25
Expand Down Expand Up @@ -111,7 +121,7 @@

## 16.3.0 - 2024-07-11
* [#2130](https://github.com/stripe/stripe-node/pull/2130) Update generated code
* ⚠️ Remove support for values `billing_policy_remote_function_response_invalid`, `billing_policy_remote_function_timeout`, `billing_policy_remote_function_unexpected_status_code`, and `billing_policy_remote_function_unreachable` from enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`.
* ⚠️ Remove support for values `billing_policy_remote_function_response_invalid`, `billing_policy_remote_function_timeout`, `billing_policy_remote_function_unexpected_status_code`, and `billing_policy_remote_function_unreachable` from enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`.
* ⚠️ Remove support for value `payment_intent_fx_quote_invalid` from enum `StripeError.code`. The was mistakenly released last week.
* Add support for `payment_method_options` on `ConfirmationToken`
* Add support for `payment_element` on `CustomerSession.components` and `CustomerSessionCreateParams.components`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1214
v1247
2 changes: 1 addition & 1 deletion src/apiVersion.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File generated from our OpenAPI spec

export const ApiVersion = '2024-06-20';
export const PreviewVersion = '2024-08-21.preview-v2';
export const PreviewVersion = '2024-09-05.preview-v2';
2 changes: 2 additions & 0 deletions src/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {PersonalizationDesigns as TestHelpersIssuingPersonalizationDesigns} from
import {PersonalizationDesigns as IssuingPersonalizationDesigns} from './resources/Issuing/PersonalizationDesigns.js';
import {PhysicalBundles as IssuingPhysicalBundles} from './resources/Issuing/PhysicalBundles.js';
import {Products as ClimateProducts} from './resources/Climate/Products.js';
import {ReaderCollectedData as TerminalReaderCollectedData} from './resources/Terminal/ReaderCollectedData.js';
import {Readers as TestHelpersTerminalReaders} from './resources/TestHelpers/Terminal/Readers.js';
import {Readers as TerminalReaders} from './resources/Terminal/Readers.js';
import {ReceivedCredits as TestHelpersTreasuryReceivedCredits} from './resources/TestHelpers/Treasury/ReceivedCredits.js';
Expand Down Expand Up @@ -211,6 +212,7 @@ export const Terminal = resourceNamespace('terminal', {
Configurations: TerminalConfigurations,
ConnectionTokens: TerminalConnectionTokens,
Locations: TerminalLocations,
ReaderCollectedData: TerminalReaderCollectedData,
Readers: TerminalReaders,
});
export const TestHelpers = resourceNamespace('testHelpers', {
Expand Down
10 changes: 10 additions & 0 deletions src/resources/Terminal/ReaderCollectedData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// File generated from our OpenAPI spec

import {StripeResource} from '../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const ReaderCollectedData = StripeResource.extend({
retrieve: stripeMethod({
method: 'GET',
fullPath: '/v1/terminal/reader_collected_data/{reader_collected_data}',
}),
});
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/AccountLinksResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ declare module 'stripe' {
/**
* Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`.
*/
fields: CollectionOptions.Fields;
fields?: CollectionOptions.Fields;

/**
* Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
Expand Down
18 changes: 18 additions & 0 deletions types/AccountSessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ declare module 'stripe' {
*/
payouts_list?: Components.PayoutsList;

recipients?: Components.Recipients;

/**
* Configuration for the tax registrations embedded component.
*/
Expand Down Expand Up @@ -577,6 +579,22 @@ declare module 'stripe' {
interface Features {}
}

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

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

namespace Recipients {
interface Features {}
}

interface TaxRegistrations {
/**
* Whether the embedded component is enabled.
Expand Down
10 changes: 10 additions & 0 deletions types/Billing/AlertsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ declare module 'stripe' {
* Limit the scope to this alert only to this customer.
*/
customer?: string;

/**
* Limit the scope of this rated usage alert to this subscription.
*/
subscription?: string;

/**
* Limit the scope of this rated usage alert to this subscription item.
*/
subscription_item?: string;
}

interface UsageThresholdConfig {
Expand Down
106 changes: 106 additions & 0 deletions types/Billing/MeterErrorReports.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
// File generated from our OpenAPI spec

declare module 'stripe' {
namespace Stripe {
namespace Billing {
/**
* The MeterErrorReport object.
*/
interface MeterErrorReport {
/**
* Unique identifier for the object.
*/
id: string;

/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'billing.meter_error_report';

reason: MeterErrorReport.Reason;

/**
* The related objects about the error
*/
related_object: MeterErrorReport.RelatedObject | null;

/**
* Summary of invalid events
*/
summary: string;

/**
* Time when validation ended. Measured in seconds since the Unix epoch
*/
validation_end: number;

/**
* Time when validation started. Measured in seconds since the Unix epoch
*/
validation_start: number;
}

namespace MeterErrorReport {
interface Reason {
/**
* The number of errors generated
*/
error_count: number;

/**
* More information about errors
*/
error_types: Array<Reason.ErrorType>;
}

namespace Reason {
interface ErrorType {
sample_errors: Array<ErrorType.SampleError>;
}

namespace ErrorType {
interface SampleError {
api_request: SampleError.ApiRequest | null;

/**
* message of the error
*/
error_message: string;
}

namespace SampleError {
interface ApiRequest {
/**
* Unique identifier for the object.
*/
id: string;

/**
* idempotency_key of the request
*/
idempotency_key: string;
}
}
}
}

interface RelatedObject {
/**
* Unique identifier for the object.
*/
id: string;

/**
* The type of meter error related object. Should be 'meter'
*/
object: string;

/**
* The url of the meter object
*/
url: string;
}
}
}
}
}
113 changes: 112 additions & 1 deletion types/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ declare module 'stripe' {
recovered_from: string | null;

/**
* This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`.
* This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
*/
redirect_on_completion?: Session.RedirectOnCompletion;

Expand Down Expand Up @@ -386,10 +386,30 @@ declare module 'stripe' {
type BillingAddressCollection = 'auto' | 'required';

interface CollectedInformation {
/**
* Customer's business name for this Checkout Session
*/
business_name: string | null;

/**
* Customer's email for this Checkout Session
*/
email: string | null;

/**
* Customer's phone number for this Checkout Session
*/
phone: string | null;

/**
* Shipping information for this Checkout Session.
*/
shipping_details: CollectedInformation.ShippingDetails | null;

/**
* Customer's tax ids for this Checkout Session.
*/
tax_ids: Array<CollectedInformation.TaxId> | null;
}

namespace CollectedInformation {
Expand All @@ -416,6 +436,97 @@ declare module 'stripe' {
*/
tracking_number?: string | null;
}

interface TaxId {
/**
* The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown`
*/
type: TaxId.Type;

/**
* The value of the tax ID.
*/
value: string | null;
}

namespace TaxId {
type Type =
| 'ad_nrt'
| 'ae_trn'
| 'ar_cuit'
| 'au_abn'
| 'au_arn'
| 'bg_uic'
| 'bh_vat'
| 'bo_tin'
| 'br_cnpj'
| 'br_cpf'
| 'ca_bn'
| 'ca_gst_hst'
| 'ca_pst_bc'
| 'ca_pst_mb'
| 'ca_pst_sk'
| 'ca_qst'
| 'ch_uid'
| 'ch_vat'
| 'cl_tin'
| 'cn_tin'
| 'co_nit'
| 'cr_tin'
| 'de_stn'
| 'do_rcn'
| 'ec_ruc'
| 'eg_tin'
| 'es_cif'
| 'eu_oss_vat'
| 'eu_vat'
| 'gb_vat'
| 'ge_vat'
| 'hk_br'
| 'hr_oib'
| 'hu_tin'
| 'id_npwp'
| 'il_vat'
| 'in_gst'
| 'is_vat'
| 'jp_cn'
| 'jp_rn'
| 'jp_trn'
| 'ke_pin'
| 'kr_brn'
| 'kz_bin'
| 'li_uid'
| 'mx_rfc'
| 'my_frp'
| 'my_itn'
| 'my_sst'
| 'ng_tin'
| 'no_vat'
| 'no_voec'
| 'nz_gst'
| 'om_vat'
| 'pe_ruc'
| 'ph_tin'
| 'ro_tin'
| 'rs_pib'
| 'ru_inn'
| 'ru_kpp'
| 'sa_vat'
| 'sg_gst'
| 'sg_uen'
| 'si_tin'
| 'sv_nit'
| 'th_vat'
| 'tr_tin'
| 'tw_vat'
| 'ua_vat'
| 'unknown'
| 'us_ein'
| 'uy_ruc'
| 've_rif'
| 'vn_tin'
| 'za_vat';
}
}

interface Consent {
Expand Down
3 changes: 2 additions & 1 deletion types/Checkout/SessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ declare module 'stripe' {
phone_number_collection?: SessionCreateParams.PhoneNumberCollection;

/**
* This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`.
* This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
*/
redirect_on_completion?: SessionCreateParams.RedirectOnCompletion;

Expand Down Expand Up @@ -2003,6 +2003,7 @@ declare module 'stripe' {
| 'klarna'
| 'konbini'
| 'link'
| 'mb_way'
| 'mobilepay'
| 'multibanco'
| 'oxxo'
Expand Down
Loading

0 comments on commit 57b8b5d

Please sign in to comment.