Skip to content

Commit

Permalink
Merge pull request #2232 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 Dec 5, 2024
2 parents 922bd6c + 95381ab commit 3b6da69
Show file tree
Hide file tree
Showing 35 changed files with 271 additions and 76 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1370
v1384
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions types/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ declare module 'stripe' {
*/
au_becs_debit_payments?: Capabilities.AuBecsDebitPayments;

/**
* The status of the automatic_indirect_tax capability of the account.
*/
automatic_indirect_tax?: Capabilities.AutomaticIndirectTax;

/**
* The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.
*/
Expand Down Expand Up @@ -558,6 +563,8 @@ declare module 'stripe' {

type AuBecsDebitPayments = 'active' | 'inactive' | 'pending';

type AutomaticIndirectTax = 'active' | 'inactive' | 'pending';

type BacsDebitPayments = 'active' | 'inactive' | 'pending';

type BancontactPayments = 'active' | 'inactive' | 'pending';
Expand Down
28 changes: 26 additions & 2 deletions types/AccountsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ declare module 'stripe' {
external_account?: string | AccountCreateParams.ExternalAccount;

/**
* A hash of account group type to tokens. These are account groups this account should be added to
* A hash of account group type to tokens. These are account groups this account should be added to.
*/
groups?: AccountCreateParams.Groups;

Expand Down Expand Up @@ -234,6 +234,11 @@ declare module 'stripe' {
*/
au_becs_debit_payments?: Capabilities.AuBecsDebitPayments;

/**
* The automatic_indirect_tax capability.
*/
automatic_indirect_tax?: Capabilities.AutomaticIndirectTax;

/**
* The bacs_debit_payments capability.
*/
Expand Down Expand Up @@ -573,6 +578,13 @@ declare module 'stripe' {
requested?: boolean;
}

interface AutomaticIndirectTax {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface BacsDebitPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down Expand Up @@ -1986,7 +1998,7 @@ declare module 'stripe' {
>;

/**
* A hash of account group type to tokens. These are account groups this account should be added to
* A hash of account group type to tokens. These are account groups this account should be added to.
*/
groups?: AccountUpdateParams.Groups;

Expand Down Expand Up @@ -2180,6 +2192,11 @@ declare module 'stripe' {
*/
au_becs_debit_payments?: Capabilities.AuBecsDebitPayments;

/**
* The automatic_indirect_tax capability.
*/
automatic_indirect_tax?: Capabilities.AutomaticIndirectTax;

/**
* The bacs_debit_payments capability.
*/
Expand Down Expand Up @@ -2519,6 +2536,13 @@ declare module 'stripe' {
requested?: boolean;
}

interface AutomaticIndirectTax {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface BacsDebitPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down
4 changes: 3 additions & 1 deletion types/BalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ declare module 'stripe' {
status: string;

/**
* Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
* Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
*/
type: BalanceTransaction.Type;
}
Expand Down Expand Up @@ -141,6 +141,8 @@ declare module 'stripe' {
| 'payout'
| 'payout_cancel'
| 'payout_failure'
| 'payout_minimum_balance_hold'
| 'payout_minimum_balance_release'
| 'refund'
| 'refund_failure'
| 'reserve_transaction'
Expand Down
2 changes: 1 addition & 1 deletion types/BalanceTransactionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ declare module 'stripe' {
source?: string;

/**
* Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
* Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
*/
type?: string;
}
Expand Down
4 changes: 2 additions & 2 deletions 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 for which credit grants can apply. We currently only support the `metered` price type.
* The price type that credit grants can apply to. We currently only support the `metered` price type.
*/
price_type: 'metered';
}
Expand All @@ -52,7 +52,7 @@ declare module 'stripe' {

class CreditBalanceSummaryResource {
/**
* Retrieves the credit balance summary for a customer
* Retrieves the credit balance summary for a customer.
*/
retrieve(
params: CreditBalanceSummaryRetrieveParams,
Expand Down
4 changes: 2 additions & 2 deletions types/Billing/CreditBalanceTransactionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ declare module 'stripe' {

class CreditBalanceTransactionsResource {
/**
* Retrieves a credit balance transaction
* Retrieves a credit balance transaction.
*/
retrieve(
id: string,
Expand All @@ -42,7 +42,7 @@ declare module 'stripe' {
): Promise<Stripe.Response<Stripe.Billing.CreditBalanceTransaction>>;

/**
* Retrieve a list of credit balance transactions
* Retrieve a list of credit balance transactions.
*/
list(
params: CreditBalanceTransactionListParams,
Expand Down
4 changes: 2 additions & 2 deletions types/Billing/CreditGrants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ declare module 'stripe' {
customer: string | Stripe.Customer | Stripe.DeletedCustomer;

/**
* The time when the billing credits become effectivewhen they're eligible for use.
* The time when the billing credits become effective-when they're eligible for use.
*/
effective_at: number | null;

Expand Down Expand Up @@ -113,7 +113,7 @@ declare module 'stripe' {
namespace ApplicabilityConfig {
interface Scope {
/**
* 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.
* The price type that credit grants can apply to. 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
16 changes: 8 additions & 8 deletions types/Billing/CreditGrantsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ declare module 'stripe' {
customer: string;

/**
* The time when the billing credits become effectivewhen they're eligible for use. Defaults to the current timestamp if not specified.
* The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified.
*/
effective_at?: number;

Expand All @@ -35,12 +35,12 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* The time when the billing credits will expire. If not specified, the billing credits don't expire.
* The time when the billing credits expire. If not specified, the billing credits don't expire.
*/
expires_at?: number;

/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format.
* Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
*/
metadata?: Stripe.MetadataParam;

Expand Down Expand Up @@ -87,7 +87,7 @@ declare module 'stripe' {
namespace ApplicabilityConfig {
interface Scope {
/**
* The price type for which credit grants can apply. We currently only support the `metered` price type.
* The price type that credit grants can apply to. We currently only support the `metered` price type.
*/
price_type: 'metered';
}
Expand Down Expand Up @@ -115,7 +115,7 @@ declare module 'stripe' {
expires_at?: Stripe.Emptyable<number>;

/**
* Set of key-value pairs you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format.
* Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
*/
metadata?: Stripe.MetadataParam;
}
Expand Down Expand Up @@ -148,15 +148,15 @@ declare module 'stripe' {

class CreditGrantsResource {
/**
* Creates a credit grant
* Creates a credit grant.
*/
create(
params: CreditGrantCreateParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Billing.CreditGrant>>;

/**
* Retrieves a credit grant
* Retrieves a credit grant.
*/
retrieve(
id: string,
Expand All @@ -169,7 +169,7 @@ declare module 'stripe' {
): Promise<Stripe.Response<Stripe.Billing.CreditGrant>>;

/**
* Updates a credit grant
* Updates a credit grant.
*/
update(
id: string,
Expand Down
2 changes: 1 addition & 1 deletion types/Billing/MeterEventAdjustmentsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ declare module 'stripe' {

class MeterEventAdjustmentsResource {
/**
* Creates a billing meter event adjustment
* Creates a billing meter event adjustment.
*/
create(
params: MeterEventAdjustmentCreateParams,
Expand Down
3 changes: 1 addition & 2 deletions types/Billing/MeterEvents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ declare module 'stripe' {
namespace Stripe {
namespace Billing {
/**
* A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage.
* Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing.
* Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event's payload and how to aggregate those events.
*/
interface MeterEvent {
/**
Expand Down
4 changes: 2 additions & 2 deletions types/Billing/MeterEventsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* A unique identifier for the event. If not provided, one will be generated. We strongly advise using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.
* A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.
*/
identifier?: string;

Expand All @@ -34,7 +34,7 @@ declare module 'stripe' {

class MeterEventsResource {
/**
* Creates a billing meter event
* Creates a billing meter event.
*/
create(
params: MeterEventCreateParams,
Expand Down
2 changes: 1 addition & 1 deletion types/Billing/Meters.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ declare module 'stripe' {
namespace Stripe {
namespace Billing {
/**
* A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make.
* Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill.
*
* Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based)
*/
Expand Down
16 changes: 8 additions & 8 deletions types/Billing/MetersResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ declare module 'stripe' {
default_aggregation: MeterCreateParams.DefaultAggregation;

/**
* The meter's name.
* The meter's name. Not visible to the customer.
*/
display_name: string;

Expand Down Expand Up @@ -43,7 +43,7 @@ declare module 'stripe' {
namespace MeterCreateParams {
interface CustomerMapping {
/**
* The key in the usage event payload to use for mapping the event to a customer.
* The key in the meter event payload to use for mapping the event to a customer.
*/
event_payload_key: string;

Expand Down Expand Up @@ -83,7 +83,7 @@ declare module 'stripe' {

interface MeterUpdateParams {
/**
* The meter's name.
* The meter's name. Not visible to the customer.
*/
display_name?: string;

Expand Down Expand Up @@ -156,15 +156,15 @@ declare module 'stripe' {

class MetersResource {
/**
* Creates a billing meter
* Creates a billing meter.
*/
create(
params: MeterCreateParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Billing.Meter>>;

/**
* Retrieves a billing meter given an ID
* Retrieves a billing meter given an ID.
*/
retrieve(
id: string,
Expand All @@ -177,7 +177,7 @@ declare module 'stripe' {
): Promise<Stripe.Response<Stripe.Billing.Meter>>;

/**
* Updates a billing meter
* Updates a billing meter.
*/
update(
id: string,
Expand All @@ -195,7 +195,7 @@ declare module 'stripe' {
list(options?: RequestOptions): ApiListPromise<Stripe.Billing.Meter>;

/**
* Deactivates a billing meter
* When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.
*/
deactivate(
id: string,
Expand All @@ -217,7 +217,7 @@ declare module 'stripe' {
): ApiListPromise<Stripe.Billing.MeterEventSummary>;

/**
* Reactivates a billing meter
* When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.
*/
reactivate(
id: string,
Expand Down
Loading

0 comments on commit 3b6da69

Please sign in to comment.