Skip to content

Commit

Permalink
Merge 3d448d8 into 9e607bf
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Apr 30, 2024
2 parents 9e607bf + 3d448d8 commit f803eec
Show file tree
Hide file tree
Showing 25 changed files with 107 additions and 27 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v993
v1002
2 changes: 1 addition & 1 deletion types/Apps/Secrets.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ declare module 'stripe' {
/**
* The plaintext secret value to be stored.
*/
payload: string | null;
payload?: string | null;

scope: Secret.Scope;
}
Expand Down
2 changes: 1 addition & 1 deletion types/BillingPortal/Configurations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ declare module 'stripe' {
/**
* The list of up to 10 products that support subscription updates.
*/
products: Array<SubscriptionUpdate.Product> | null;
products?: Array<SubscriptionUpdate.Product> | null;

/**
* Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation.
Expand Down
5 changes: 4 additions & 1 deletion types/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ declare module 'stripe' {
/**
* A list of refunds that have been applied to the charge.
*/
refunds: ApiList<Stripe.Refund> | null;
refunds?: ApiList<Stripe.Refund> | null;

/**
* ID of the review associated with this charge if one exists.
Expand Down Expand Up @@ -1642,6 +1642,9 @@ declare module 'stripe' {
}

interface Mobilepay {
/**
* Internal card details
*/
card: Mobilepay.Card | null;
}

Expand Down
2 changes: 1 addition & 1 deletion types/ConfirmationTokens.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ declare module 'stripe' {
/**
* The customer's date of birth, if provided.
*/
dob: Klarna.Dob | null;
dob?: Klarna.Dob | null;
}

namespace Klarna {
Expand Down
10 changes: 5 additions & 5 deletions types/Identity/VerificationReports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ declare module 'stripe' {
/**
* Date of birth as it appears in the document.
*/
dob: Document.Dob | null;
dob?: Document.Dob | null;

/**
* Details on the verification error. Present when status is `unverified`.
Expand All @@ -105,7 +105,7 @@ declare module 'stripe' {
/**
* Expiration date of the document.
*/
expiration_date: Document.ExpirationDate | null;
expiration_date?: Document.ExpirationDate | null;

/**
* Array of [File](https://stripe.com/docs/api/files) ids containing images for this document.
Expand Down Expand Up @@ -135,7 +135,7 @@ declare module 'stripe' {
/**
* Document ID number.
*/
number: string | null;
number?: string | null;

/**
* Status of this `document` check.
Expand Down Expand Up @@ -267,7 +267,7 @@ declare module 'stripe' {
/**
* Date of birth.
*/
dob: IdNumber.Dob | null;
dob?: IdNumber.Dob | null;

/**
* Details on the verification error. Present when status is `unverified`.
Expand All @@ -282,7 +282,7 @@ declare module 'stripe' {
/**
* ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present.
*/
id_number: string | null;
id_number?: string | null;

/**
* Type of ID number.
Expand Down
8 changes: 4 additions & 4 deletions types/Identity/VerificationSessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ declare module 'stripe' {
/**
* Details provided about the user being verified. These details may be shown to the user.
*/
provided_details: VerificationSession.ProvidedDetails | null;
provided_details?: VerificationSession.ProvidedDetails | null;

/**
* Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
Expand Down Expand Up @@ -103,7 +103,7 @@ declare module 'stripe' {
/**
* The user's verified data.
*/
verified_outputs: VerificationSession.VerifiedOutputs | null;
verified_outputs?: VerificationSession.VerifiedOutputs | null;
}

namespace VerificationSession {
Expand Down Expand Up @@ -232,7 +232,7 @@ declare module 'stripe' {
/**
* The user's verified date of birth.
*/
dob: VerifiedOutputs.Dob | null;
dob?: VerifiedOutputs.Dob | null;

/**
* The user's verified email address
Expand All @@ -247,7 +247,7 @@ declare module 'stripe' {
/**
* The user's verified id number.
*/
id_number: string | null;
id_number?: string | null;

/**
* The user's verified id number type.
Expand Down
5 changes: 3 additions & 2 deletions types/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,12 @@ declare module 'stripe' {
payment_settings: Invoice.PaymentSettings;

/**
* End of the usage period during which invoice items were added to this invoice.
* End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
*/
period_end: number;

/**
* Start of the usage period during which invoice items were added to this invoice.
* Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
*/
period_start: number;

Expand Down Expand Up @@ -928,6 +928,7 @@ declare module 'stripe' {
| 'setup_intent_mandate_invalid'
| 'setup_intent_setup_attempt_expired'
| 'setup_intent_unexpected_state'
| 'shipping_address_invalid'
| 'shipping_calculation_failed'
| 'sku_inactive'
| 'state_unsupported'
Expand Down
2 changes: 2 additions & 0 deletions types/Issuing/AuthorizationsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +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.
*/
approve(
id: string,
Expand All @@ -133,6 +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.
*/
decline(
id: string,
Expand Down
2 changes: 1 addition & 1 deletion types/Issuing/Disputes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ declare module 'stripe' {
/**
* List of balance transactions associated with the dispute.
*/
balance_transactions: Array<Stripe.BalanceTransaction> | null;
balance_transactions?: Array<Stripe.BalanceTransaction> | null;

/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down
2 changes: 1 addition & 1 deletion types/Issuing/Transactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ declare module 'stripe' {
/**
* Additional purchase information that is optionally provided by the merchant.
*/
purchase_details: Transaction.PurchaseDetails | null;
purchase_details?: Transaction.PurchaseDetails | null;

/**
* [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null.
Expand Down
1 change: 1 addition & 0 deletions types/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ declare module 'stripe' {
| 'setup_intent_mandate_invalid'
| 'setup_intent_setup_attempt_expired'
| 'setup_intent_unexpected_state'
| 'shipping_address_invalid'
| 'shipping_calculation_failed'
| 'sku_inactive'
| 'state_unsupported'
Expand Down
5 changes: 5 additions & 0 deletions types/PaymentIntentsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4752,6 +4752,11 @@ declare module 'stripe' {
*/
payment_method_options?: PaymentIntentConfirmParams.PaymentMethodOptions;

/**
* The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
*/
payment_method_types?: Array<string>;

/**
* Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
*/
Expand Down
2 changes: 2 additions & 0 deletions types/PaymentMethodConfigurations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ declare module 'stripe' {
*
* Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account's associated child configuration. Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API.
*
* **Note:** The ability to turn off cards is in limited preview. Please [contact us](https://support.stripe.com/contact) if you require this functionality.
*
* Related guides:
* - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations)
* - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs)
Expand Down
2 changes: 1 addition & 1 deletion types/PaymentMethods.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ declare module 'stripe' {
/**
* The customer's date of birth, if provided.
*/
dob: Klarna.Dob | null;
dob?: Klarna.Dob | null;
}

namespace Klarna {
Expand Down
1 change: 1 addition & 0 deletions types/SetupAttempts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ declare module 'stripe' {
| 'setup_intent_mandate_invalid'
| 'setup_intent_setup_attempt_expired'
| 'setup_intent_unexpected_state'
| 'shipping_address_invalid'
| 'shipping_calculation_failed'
| 'sku_inactive'
| 'state_unsupported'
Expand Down
1 change: 1 addition & 0 deletions types/SetupIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ declare module 'stripe' {
| 'setup_intent_mandate_invalid'
| 'setup_intent_setup_attempt_expired'
| 'setup_intent_unexpected_state'
| 'shipping_address_invalid'
| 'shipping_calculation_failed'
| 'sku_inactive'
| 'state_unsupported'
Expand Down
2 changes: 1 addition & 1 deletion types/Tax/CalculationLineItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ declare module 'stripe' {
/**
* Detailed account of taxes relevant to this line item.
*/
tax_breakdown: Array<CalculationLineItem.TaxBreakdown> | null;
tax_breakdown?: Array<CalculationLineItem.TaxBreakdown> | null;

/**
* The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.
Expand Down
11 changes: 10 additions & 1 deletion types/Tax/Calculations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,18 @@ declare module 'stripe' {
/**
* The list of items the customer is purchasing.
*/
line_items: ApiList<Stripe.Tax.CalculationLineItem> | null;
line_items?: ApiList<Stripe.Tax.CalculationLineItem> | null;

/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;

/**
* The details of the ship from location, such as the address.
*/
ship_from_details: Calculation.ShipFromDetails | null;

/**
* The shipping cost details for the calculation.
*/
Expand Down Expand Up @@ -202,6 +207,10 @@ declare module 'stripe' {
}
}

interface ShipFromDetails {
address: Stripe.Address;
}

interface ShippingCost {
/**
* The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
Expand Down
46 changes: 46 additions & 0 deletions types/Tax/CalculationsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ declare module 'stripe' {
*/
expand?: Array<string>;

/**
* Details about the address from which the goods are being shipped.
*/
ship_from_details?: CalculationCreateParams.ShipFromDetails;

/**
* Shipping cost details to be used for the calculation.
*/
Expand Down Expand Up @@ -235,6 +240,47 @@ declare module 'stripe' {
type TaxBehavior = 'exclusive' | 'inclusive';
}

interface ShipFromDetails {
/**
* The address from which the goods are being shipped from.
*/
address: ShipFromDetails.Address;
}

namespace ShipFromDetails {
interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: Stripe.Emptyable<string>;

/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country: string;

/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: Stripe.Emptyable<string>;

/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: Stripe.Emptyable<string>;

/**
* ZIP or postal code.
*/
postal_code?: Stripe.Emptyable<string>;

/**
* State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX".
*/
state?: Stripe.Emptyable<string>;
}
}

interface ShippingCost {
/**
* A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
Expand Down
11 changes: 10 additions & 1 deletion types/Tax/Transactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ declare module 'stripe' {
/**
* The tax collected or refunded, by line item.
*/
line_items: ApiList<Stripe.Tax.TransactionLineItem> | null;
line_items?: ApiList<Stripe.Tax.TransactionLineItem> | null;

/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
Expand All @@ -61,6 +61,11 @@ declare module 'stripe' {
*/
reversal: Transaction.Reversal | null;

/**
* The details of the ship from location, such as the address.
*/
ship_from_details: Transaction.ShipFromDetails | null;

/**
* The shipping cost details for the transaction.
*/
Expand Down Expand Up @@ -209,6 +214,10 @@ declare module 'stripe' {
original_transaction: string | null;
}

interface ShipFromDetails {
address: Stripe.Address;
}

interface ShippingCost {
/**
* The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
Expand Down
2 changes: 1 addition & 1 deletion types/Treasury/FinancialAccounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ declare module 'stripe' {
/**
* The account number.
*/
account_number: string | null;
account_number?: string | null;

/**
* The last four characters of the account number.
Expand Down
2 changes: 1 addition & 1 deletion types/Treasury/ReceivedCredits.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ declare module 'stripe' {
/**
* The expandable object of the source flow.
*/
source_flow_details: LinkedFlows.SourceFlowDetails | null;
source_flow_details?: LinkedFlows.SourceFlowDetails | null;

/**
* The type of flow that originated the ReceivedCredit (for example, `outbound_payment`).
Expand Down

0 comments on commit f803eec

Please sign in to comment.