Skip to content

Commit

Permalink
Merge pull request #1917 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 Oct 5, 2023
2 parents 3c80969 + b360659 commit 85d943b
Show file tree
Hide file tree
Showing 33 changed files with 1,032 additions and 208 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v569
v582
2 changes: 2 additions & 0 deletions src/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {Sessions as CheckoutSessions} from './resources/Checkout/Sessions.js';
import {Sessions as FinancialConnectionsSessions} from './resources/FinancialConnections/Sessions.js';
import {Settings as TaxSettings} from './resources/Tax/Settings.js';
import {TestClocks as TestHelpersTestClocks} from './resources/TestHelpers/TestClocks.js';
import {Tokens as IssuingTokens} from './resources/Issuing/Tokens.js';
import {TransactionEntries as TreasuryTransactionEntries} from './resources/Treasury/TransactionEntries.js';
import {Transactions as TestHelpersIssuingTransactions} from './resources/TestHelpers/Issuing/Transactions.js';
import {Transactions as FinancialConnectionsTransactions} from './resources/FinancialConnections/Transactions.js';
Expand Down Expand Up @@ -146,6 +147,7 @@ export const Issuing = resourceNamespace('issuing', {
Disputes: IssuingDisputes,
PersonalizationDesigns: IssuingPersonalizationDesigns,
PhysicalBundles: IssuingPhysicalBundles,
Tokens: IssuingTokens,
Transactions: IssuingTransactions,
});
export const Radar = resourceNamespace('radar', {
Expand Down
19 changes: 19 additions & 0 deletions src/resources/Issuing/Tokens.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// File generated from our OpenAPI spec

import {StripeResource} from '../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const Tokens = StripeResource.extend({
retrieve: stripeMethod({
method: 'GET',
fullPath: '/v1/issuing/tokens/{token}',
}),
update: stripeMethod({
method: 'POST',
fullPath: '/v1/issuing/tokens/{token}',
}),
list: stripeMethod({
method: 'GET',
fullPath: '/v1/issuing/tokens',
methodType: 'list',
}),
});
12 changes: 6 additions & 6 deletions src/resources/Quotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ export const Quotes = StripeResource.extend({
}),
accept: stripeMethod({method: 'POST', fullPath: '/v1/quotes/{quote}/accept'}),
cancel: stripeMethod({method: 'POST', fullPath: '/v1/quotes/{quote}/cancel'}),
draftQuote: stripeMethod({
method: 'POST',
fullPath: '/v1/quotes/{quote}/mark_draft',
}),
finalizeQuote: stripeMethod({
method: 'POST',
fullPath: '/v1/quotes/{quote}/finalize',
Expand Down Expand Up @@ -46,12 +42,16 @@ export const Quotes = StripeResource.extend({
fullPath: '/v1/quotes/{quote}/preview_invoices',
methodType: 'list',
}),
listPreviewSchedules: stripeMethod({
listPreviewSubscriptionSchedules: stripeMethod({
method: 'GET',
fullPath: '/v1/quotes/{quote}/preview_subscription_schedules',
methodType: 'list',
}),
markStaleQuote: stripeMethod({
markDraft: stripeMethod({
method: 'POST',
fullPath: '/v1/quotes/{quote}/mark_draft',
}),
markStale: stripeMethod({
method: 'POST',
fullPath: '/v1/quotes/{quote}/mark_stale',
}),
Expand Down
3 changes: 3 additions & 0 deletions types/AccountsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2948,6 +2948,9 @@ declare module 'stripe' {
*/
expand?: Array<string>;

/**
* Filter external accounts according to a particular object type.
*/
object?: ExternalAccountListParams.Object;
}

Expand Down
6 changes: 3 additions & 3 deletions types/BalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ declare module 'stripe' {
object: 'balance_transaction';

/**
* Gross amount of the transaction (in cents (or local equivalent)).
* Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party.
*/
amount: number;

Expand Down Expand Up @@ -50,7 +50,7 @@ declare module 'stripe' {
exchange_rate: number | null;

/**
* Fees (in cents (or local equivalent)) paid for this transaction.
* Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
*/
fee: number;

Expand All @@ -60,7 +60,7 @@ declare module 'stripe' {
fee_details: Array<BalanceTransaction.FeeDetail>;

/**
* Net amount of the transaction (in cents (or local equivalent)).
* Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee`
*/
net: number;

Expand Down
62 changes: 62 additions & 0 deletions types/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,11 @@ declare module 'stripe' {
}

interface Card {
/**
* The authorized amount.
*/
amount_authorized?: number | null;

/**
* Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
Expand Down Expand Up @@ -706,6 +711,8 @@ declare module 'stripe' {
*/
exp_year: number;

extended_authorization?: Card.ExtendedAuthorization;

/**
* Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
*
Expand All @@ -723,6 +730,8 @@ declare module 'stripe' {
*/
iin?: string | null;

incremental_authorization?: Card.IncrementalAuthorization;

/**
* Installment details for this payment (Mexico only).
*
Expand Down Expand Up @@ -750,6 +759,8 @@ declare module 'stripe' {
*/
moto?: boolean | null;

multicapture?: Card.Multicapture;

/**
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
Expand All @@ -760,6 +771,8 @@ declare module 'stripe' {
*/
network_token?: Card.NetworkToken | null;

overcapture?: Card.Overcapture;

/**
* Populated if this transaction used 3D Secure authentication.
*/
Expand Down Expand Up @@ -789,6 +802,28 @@ declare module 'stripe' {
cvc_check: string | null;
}

interface ExtendedAuthorization {
/**
* Indicates whether or not the capture window is extended beyond the standard authorization.
*/
status: ExtendedAuthorization.Status;
}

namespace ExtendedAuthorization {
type Status = 'disabled' | 'enabled';
}

interface IncrementalAuthorization {
/**
* Indicates whether or not the incremental authorization feature is supported.
*/
status: IncrementalAuthorization.Status;
}

namespace IncrementalAuthorization {
type Status = 'available' | 'unavailable';
}

interface Installments {
/**
* Installment plan selected for the payment.
Expand Down Expand Up @@ -816,13 +851,40 @@ declare module 'stripe' {
}
}

interface Multicapture {
/**
* Indicates whether or not multiple captures are supported.
*/
status: Multicapture.Status;
}

namespace Multicapture {
type Status = 'available' | 'unavailable';
}

interface NetworkToken {
/**
* Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
*/
used: boolean;
}

interface Overcapture {
/**
* The maximum amount that can be captured.
*/
maximum_amount_capturable: number;

/**
* Indicates whether or not the authorized amount can be over-captured.
*/
status: Overcapture.Status;
}

namespace Overcapture {
type Status = 'available' | 'unavailable';
}

interface ThreeDSecure {
/**
* For authenticated transactions: how the customer was authenticated by
Expand Down
42 changes: 42 additions & 0 deletions types/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,34 @@ declare module 'stripe' {
*/
enabled: boolean;

/**
* The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
*/
liability?: AutomaticTax.Liability | null;

/**
* The status of the most recent automated tax calculation for this session.
*/
status: AutomaticTax.Status | null;
}

namespace AutomaticTax {
interface Liability {
/**
* The connected account being referenced when `type` is `account`.
*/
account: string | Stripe.Account | null;

/**
* Type of the account referenced.
*/
type: Liability.Type;
}

namespace Liability {
type Type = 'account' | 'self';
}

type Status = 'complete' | 'failed' | 'requires_location_inputs';
}

Expand Down Expand Up @@ -692,6 +713,11 @@ declare module 'stripe' {
*/
footer: string | null;

/**
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
*/
issuer?: InvoiceData.Issuer | null;

/**
* 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 All @@ -716,6 +742,22 @@ declare module 'stripe' {
value: string;
}

interface Issuer {
/**
* The connected account being referenced when `type` is `account`.
*/
account: string | Stripe.Account | null;

/**
* Type of the account referenced.
*/
type: Issuer.Type;
}

namespace Issuer {
type Type = 'account' | 'self';
}

interface RenderingOptions {
/**
* How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
Expand Down
Loading

0 comments on commit 85d943b

Please sign in to comment.