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 #2222

Merged
merged 3 commits into from
Nov 20, 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 @@
v1319
v1347
2 changes: 1 addition & 1 deletion src/apiVersion.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// File generated from our OpenAPI spec

export const ApiVersion = '2024-10-28.acacia';
export const ApiVersion = '2024-11-20.acacia';
19 changes: 18 additions & 1 deletion src/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ import {Customers as TestHelpersCustomers} from './resources/TestHelpers/Custome
import {DebitReversals as TreasuryDebitReversals} from './resources/Treasury/DebitReversals.js';
import {Disputes as IssuingDisputes} from './resources/Issuing/Disputes.js';
import {EarlyFraudWarnings as RadarEarlyFraudWarnings} from './resources/Radar/EarlyFraudWarnings.js';
import {EventDestinations as V2CoreEventDestinations} from './resources/V2/Core/EventDestinations.js';
import {Events as V2CoreEvents} from './resources/V2/Core/Events.js';
import {Features as EntitlementsFeatures} from './resources/Entitlements/Features.js';
import {FinancialAccounts as TreasuryFinancialAccounts} from './resources/Treasury/FinancialAccounts.js';
import {InboundTransfers as TestHelpersTreasuryInboundTransfers} from './resources/TestHelpers/Treasury/InboundTransfers.js';
import {InboundTransfers as TreasuryInboundTransfers} from './resources/Treasury/InboundTransfers.js';
import {Locations as TerminalLocations} from './resources/Terminal/Locations.js';
import {MeterEventAdjustments as BillingMeterEventAdjustments} from './resources/Billing/MeterEventAdjustments.js';
import {MeterEventAdjustments as V2BillingMeterEventAdjustments} from './resources/V2/Billing/MeterEventAdjustments.js';
import {MeterEventSession as V2BillingMeterEventSession} from './resources/V2/Billing/MeterEventSession.js';
import {MeterEventStream as V2BillingMeterEventStream} from './resources/V2/Billing/MeterEventStream.js';
import {MeterEvents as BillingMeterEvents} from './resources/Billing/MeterEvents.js';
import {MeterEvents as V2BillingMeterEvents} from './resources/V2/Billing/MeterEvents.js';
import {Meters as BillingMeters} from './resources/Billing/Meters.js';
import {Orders as ClimateOrders} from './resources/Climate/Orders.js';
import {OutboundPayments as TestHelpersTreasuryOutboundPayments} from './resources/TestHelpers/Treasury/OutboundPayments.js';
Expand Down Expand Up @@ -121,7 +127,6 @@ export {TaxRates} from './resources/TaxRates.js';
export {Tokens} from './resources/Tokens.js';
export {Topups} from './resources/Topups.js';
export {Transfers} from './resources/Transfers.js';
export {V2} from './resources/V2.js';
export {WebhookEndpoints} from './resources/WebhookEndpoints.js';
export const Apps = resourceNamespace('apps', {Secrets: AppsSecrets});
export const Billing = resourceNamespace('billing', {
Expand Down Expand Up @@ -229,3 +234,15 @@ export const Treasury = resourceNamespace('treasury', {
TransactionEntries: TreasuryTransactionEntries,
Transactions: TreasuryTransactions,
});
export const V2 = resourceNamespace('v2', {
Billing: resourceNamespace('billing', {
MeterEventAdjustments: V2BillingMeterEventAdjustments,
MeterEventSession: V2BillingMeterEventSession,
MeterEventStream: V2BillingMeterEventStream,
MeterEvents: V2BillingMeterEvents,
}),
Core: resourceNamespace('core', {
EventDestinations: V2CoreEventDestinations,
Events: V2CoreEvents,
}),
});
5 changes: 5 additions & 0 deletions src/resources/TestHelpers/Issuing/Authorizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export const Authorizations = StripeResource.extend({
fullPath:
'/v1/test_helpers/issuing/authorizations/{authorization}/increment',
}),
respond: stripeMethod({
method: 'POST',
fullPath:
'/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond',
}),
reverse: stripeMethod({
method: 'POST',
fullPath: '/v1/test_helpers/issuing/authorizations/{authorization}/reverse',
Expand Down
12 changes: 0 additions & 12 deletions src/resources/V2.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/resources/V2/Billing.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/resources/V2/Core.ts

This file was deleted.

2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions types/AccountSessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ declare module 'stripe' {
/**
* Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
*/
disable_stripe_user_authentication?: boolean;
disable_stripe_user_authentication: boolean;

/**
* Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
Expand All @@ -107,7 +107,7 @@ declare module 'stripe' {
/**
* Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
*/
disable_stripe_user_authentication?: boolean;
disable_stripe_user_authentication: boolean;

/**
* Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
Expand All @@ -130,7 +130,7 @@ declare module 'stripe' {
/**
* Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
*/
disable_stripe_user_authentication?: boolean;
disable_stripe_user_authentication: boolean;

/**
* Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
Expand Down Expand Up @@ -181,7 +181,7 @@ declare module 'stripe' {
/**
* Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
*/
disable_stripe_user_authentication?: boolean;
disable_stripe_user_authentication: boolean;

/**
* Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
Expand Down Expand Up @@ -270,7 +270,7 @@ declare module 'stripe' {
/**
* Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
*/
disable_stripe_user_authentication?: boolean;
disable_stripe_user_authentication: boolean;

/**
* Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
Expand Down
42 changes: 38 additions & 4 deletions types/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -909,9 +909,9 @@ declare module 'stripe' {
currently_due: Array<string> | null;

/**
* This is typed as a string for consistency with `requirements.disabled_reason`.
* This is typed as an enum for consistency with `requirements.disabled_reason`.
*/
disabled_reason: string | null;
disabled_reason: FutureRequirements.DisabledReason | null;

/**
* Fields that are `currently_due` and need to be collected again because validation or verification failed.
Expand Down Expand Up @@ -947,6 +947,23 @@ declare module 'stripe' {
original_fields_due: Array<string>;
}

type DisabledReason =
| 'action_required.requested_capabilities'
| 'listed'
| 'other'
| 'platform_paused'
| 'rejected.fraud'
| 'rejected.incomplete_verification'
| 'rejected.listed'
| 'rejected.other'
| 'rejected.platform_fraud'
| 'rejected.platform_other'
| 'rejected.platform_terms_of_service'
| 'rejected.terms_of_service'
| 'requirements.past_due'
| 'requirements.pending_verification'
| 'under_review';

interface Error {
/**
* The code for the type of error.
Expand Down Expand Up @@ -1083,9 +1100,9 @@ declare module 'stripe' {
currently_due: Array<string> | null;

/**
* If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`.
* If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
*/
disabled_reason: string | null;
disabled_reason: Requirements.DisabledReason | null;

/**
* Fields that are `currently_due` and need to be collected again because validation or verification failed.
Expand Down Expand Up @@ -1121,6 +1138,23 @@ declare module 'stripe' {
original_fields_due: Array<string>;
}

type DisabledReason =
| 'action_required.requested_capabilities'
| 'listed'
| 'other'
| 'platform_paused'
| 'rejected.fraud'
| 'rejected.incomplete_verification'
| 'rejected.listed'
| 'rejected.other'
| 'rejected.platform_fraud'
| 'rejected.platform_other'
| 'rejected.platform_terms_of_service'
| 'rejected.terms_of_service'
| 'requirements.past_due'
| 'requirements.pending_verification'
| 'under_review';

interface Error {
/**
* The code for the type of error.
Expand Down
15 changes: 15 additions & 0 deletions types/AccountsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3637,6 +3637,11 @@ declare module 'stripe' {
}

interface Relationship {
/**
* Whether the person is the authorizer of the account's representative.
*/
authorizer?: boolean;

/**
* Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
*/
Expand Down Expand Up @@ -3753,6 +3758,11 @@ declare module 'stripe' {

namespace AccountListPersonsParams {
interface Relationship {
/**
* A filter on the list of people returned based on whether these people are authorizers of the account's representative.
*/
authorizer?: boolean;

/**
* A filter on the list of people returned based on whether these people are directors of the account's company.
*/
Expand Down Expand Up @@ -4167,6 +4177,11 @@ declare module 'stripe' {
}

interface Relationship {
/**
* Whether the person is the authorizer of the account's representative.
*/
authorizer?: boolean;

/**
* Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
*/
Expand Down
2 changes: 1 addition & 1 deletion types/Billing/CreditBalanceSummaryResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ declare module 'stripe' {
namespace Filter {
interface ApplicabilityScope {
/**
* The price type to which credit grants can apply to. We currently only support `metered` price type.
* The price type for which credit grants can apply. We currently only support the `metered` price type.
*/
price_type: 'metered';
}
Expand Down
11 changes: 5 additions & 6 deletions types/Billing/CreditGrants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ declare module 'stripe' {
* A credit grant is an API resource that documents the allocation of some billing credits to a customer.
*
* Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)
* end
*/
interface CreditGrant {
/**
Expand All @@ -25,7 +24,7 @@ declare module 'stripe' {
applicability_config: CreditGrant.ApplicabilityConfig;

/**
* The category of this credit grant. This is for tracking purposes and will not be displayed to the customer.
* The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
*/
category: CreditGrant.Category;

Expand All @@ -35,17 +34,17 @@ declare module 'stripe' {
created: number;

/**
* ID of the customer to whom the billing credits are granted.
* ID of the customer receiving the billing credits.
*/
customer: string | Stripe.Customer | Stripe.DeletedCustomer;

/**
* The time when the billing credits become effective i.e when they are eligible to be used.
* The time when the billing credits become effectivewhen they're eligible for use.
*/
effective_at: number | null;

/**
* The time when the billing credits will expire. If not present, the billing credits will never expire.
* The time when the billing credits expire. If not present, the billing credits don't expire.
*/
expires_at: number | null;

Expand Down Expand Up @@ -114,7 +113,7 @@ declare module 'stripe' {
namespace ApplicabilityConfig {
interface Scope {
/**
* The price type to which credit grants can apply to. We currently only support `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
* The price type for which credit grants can apply. 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';
}
Expand Down
Loading
Loading