Skip to content

Commit

Permalink
Merge branch 'master' into sdk-release/next-major
Browse files Browse the repository at this point in the history
  • Loading branch information
anniel-stripe authored Aug 14, 2023
2 parents 08eeb1b + ca229a6 commit c4cbe03
Show file tree
Hide file tree
Showing 17 changed files with 49 additions and 22 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Changelog

## 12.18.0 - 2023-08-10
* [#1867](https://github.com/stripe/stripe-node/pull/1867) Update generated code
* Add support for new values `incorporated_partnership` and `unincorporated_partnership` on enums `Account.company.structure`, `AccountCreateParams.company.structure`, `AccountUpdateParams.company.structure`, and `TokenCreateParams.account.company.structure`
* Add support for new value `payment_reversal` on enum `BalanceTransaction.type`
* Change `Invoice.subscription_details.metadata` and `Invoice.subscription_details` to be required

## 12.17.0 - 2023-08-03
* [#1863](https://github.com/stripe/stripe-node/pull/1863) Update generated code
* Change type of `AccountCreateParams.settings.card_issuing.tos_acceptance.user_agent`, `AccountCreateParams.settings.treasury.tos_acceptance.user_agent`, `AccountUpdateParams.settings.card_issuing.tos_acceptance.user_agent`, `AccountUpdateParams.settings.treasury.tos_acceptance.user_agent`, `BillingPortal.ConfigurationCreateParams.business_profile.headline`, `BillingPortal.ConfigurationUpdateParams.business_profile.headline`, `InvoiceCreateParams.payment_settings.default_mandate`, `InvoiceCreateParams.shipping_details.phone`, `InvoicePayParams.mandate`, `InvoiceUpdateParams.default_source`, `InvoiceUpdateParams.payment_settings.default_mandate`, `InvoiceUpdateParams.shipping_details.phone`, `Issuing.CardholderCreateParams.individual.card_issuing.user_terms_acceptance.user_agent`, `Issuing.CardholderUpdateParams.individual.card_issuing.user_terms_acceptance.user_agent`, `Issuing.DisputeCreateParams.evidence.canceled.cancellation_reason`, `Issuing.DisputeCreateParams.evidence.canceled.explanation`, `Issuing.DisputeCreateParams.evidence.canceled.product_description`, `Issuing.DisputeCreateParams.evidence.duplicate.explanation`, `Issuing.DisputeCreateParams.evidence.fraudulent.explanation`, `Issuing.DisputeCreateParams.evidence.merchandise_not_as_described.explanation`, `Issuing.DisputeCreateParams.evidence.merchandise_not_as_described.return_description`, `Issuing.DisputeCreateParams.evidence.not_received.explanation`, `Issuing.DisputeCreateParams.evidence.not_received.product_description`, `Issuing.DisputeCreateParams.evidence.other.explanation`, `Issuing.DisputeCreateParams.evidence.other.product_description`, `Issuing.DisputeCreateParams.evidence.service_not_as_described.cancellation_reason`, `Issuing.DisputeCreateParams.evidence.service_not_as_described.explanation`, `Issuing.DisputeUpdateParams.evidence.canceled.cancellation_reason`, `Issuing.DisputeUpdateParams.evidence.canceled.explanation`, `Issuing.DisputeUpdateParams.evidence.canceled.product_description`, `Issuing.DisputeUpdateParams.evidence.duplicate.explanation`, `Issuing.DisputeUpdateParams.evidence.fraudulent.explanation`, `Issuing.DisputeUpdateParams.evidence.merchandise_not_as_described.explanation`, `Issuing.DisputeUpdateParams.evidence.merchandise_not_as_described.return_description`, `Issuing.DisputeUpdateParams.evidence.not_received.explanation`, `Issuing.DisputeUpdateParams.evidence.not_received.product_description`, `Issuing.DisputeUpdateParams.evidence.other.explanation`, `Issuing.DisputeUpdateParams.evidence.other.product_description`, `Issuing.DisputeUpdateParams.evidence.service_not_as_described.cancellation_reason`, `Issuing.DisputeUpdateParams.evidence.service_not_as_described.explanation`, `PaymentIntentConfirmParams.payment_method_data.billing_details.name`, `PaymentIntentConfirmParams.payment_method_data.billing_details.phone`, `PaymentIntentConfirmParams.payment_method_options.konbini.confirmation_number`, `PaymentIntentConfirmParams.payment_method_options.konbini.product_description`, `PaymentIntentCreateParams.payment_method_data.billing_details.name`, `PaymentIntentCreateParams.payment_method_data.billing_details.phone`, `PaymentIntentCreateParams.payment_method_options.konbini.confirmation_number`, `PaymentIntentCreateParams.payment_method_options.konbini.product_description`, `PaymentIntentUpdateParams.payment_method_data.billing_details.name`, `PaymentIntentUpdateParams.payment_method_data.billing_details.phone`, `PaymentIntentUpdateParams.payment_method_options.konbini.confirmation_number`, `PaymentIntentUpdateParams.payment_method_options.konbini.product_description`, `PaymentMethodCreateParams.billing_details.name`, `PaymentMethodCreateParams.billing_details.phone`, `PaymentMethodUpdateParams.billing_details.name`, `PaymentMethodUpdateParams.billing_details.phone`, `ProductUpdateParams.caption`, `ProductUpdateParams.description`, `ProductUpdateParams.unit_label`, `QuoteCreateParams.description`, `QuoteCreateParams.footer`, `QuoteCreateParams.header`, `QuoteUpdateParams.description`, `QuoteUpdateParams.footer`, `QuoteUpdateParams.header`, `QuoteUpdateParams.subscription_data.description`, `SetupIntentConfirmParams.payment_method_data.billing_details.name`, `SetupIntentConfirmParams.payment_method_data.billing_details.phone`, `SetupIntentCreateParams.payment_method_data.billing_details.name`, `SetupIntentCreateParams.payment_method_data.billing_details.phone`, `SetupIntentUpdateParams.payment_method_data.billing_details.name`, `SetupIntentUpdateParams.payment_method_data.billing_details.phone`, `SubscriptionCancelParams.cancellation_details.comment`, `SubscriptionScheduleCreateParams.default_settings.description`, `SubscriptionScheduleCreateParams.phases[].description`, `SubscriptionScheduleUpdateParams.default_settings.description`, `SubscriptionScheduleUpdateParams.phases[].description`, `SubscriptionUpdateParams.cancellation_details.comment`, `SubscriptionUpdateParams.default_source`, `SubscriptionUpdateParams.description`, `Tax.CalculationCreateParams.customer_details.address.city`, `Tax.CalculationCreateParams.customer_details.address.line1`, `Tax.CalculationCreateParams.customer_details.address.line2`, `Tax.CalculationCreateParams.customer_details.address.postal_code`, `Tax.CalculationCreateParams.customer_details.address.state`, `Terminal.LocationUpdateParams.configuration_overrides`, `Terminal.ReaderUpdateParams.label`, `TokenCreateParams.person.documents.company_authorization.files[]`, `TokenCreateParams.person.documents.passport.files[]`, `TokenCreateParams.person.documents.visa.files[]`, `Treasury.OutboundPaymentCreateParams.destination_payment_method_data.billing_details.name`, `Treasury.OutboundPaymentCreateParams.destination_payment_method_data.billing_details.phone`, `WebhookEndpointCreateParams.description`, and `WebhookEndpointUpdateParams.description` from `string` to `emptyStringable(string)`
* Change many types from `string` to `emptyStringable(string)`
* Add support for `subscription_details` on `Invoice`
* Add support for `preferred_settlement_speed` on `PaymentIntent.payment_method_options.us_bank_account`, `PaymentIntentConfirmParams.payment_method_options.us_bank_account`, `PaymentIntentCreateParams.payment_method_options.us_bank_account`, and `PaymentIntentUpdateParams.payment_method_options.us_bank_account`
* Add support for new values `sepa_debit_fingerprint` and `us_bank_account_fingerprint` on enums `Radar.ValueList.item_type` and `Radar.ValueListCreateParams.item_type`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v446
v458
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.17.0
12.18.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stripe",
"version": "12.17.0",
"version": "12.18.0",
"description": "Stripe API wrapper",
"keywords": [
"stripe",
Expand Down
2 changes: 1 addition & 1 deletion src/stripe.core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function createStripe(
platformFunctions: PlatformFunctions,
requestSender: RequestSenderFactory = defaultRequestSenderFactory
): typeof Stripe {
Stripe.PACKAGE_VERSION = '12.17.0';
Stripe.PACKAGE_VERSION = '12.18.0';
Stripe.USER_AGENT = {
bindings_version: Stripe.PACKAGE_VERSION,
lang: 'node',
Expand Down
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion types/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ declare module 'stripe' {
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'incorporated_partnership'
| 'limited_liability_partnership'
| 'llc'
| 'multi_member_llc'
Expand All @@ -635,7 +636,8 @@ declare module 'stripe' {
| 'sole_proprietorship'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';
| 'unincorporated_non_profit'
| 'unincorporated_partnership';

interface Verification {
document: Verification.Document;
Expand Down
12 changes: 8 additions & 4 deletions types/AccountsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ declare module 'stripe' {
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'incorporated_partnership'
| 'limited_liability_partnership'
| 'llc'
| 'multi_member_llc'
Expand All @@ -725,7 +726,8 @@ declare module 'stripe' {
| 'sole_proprietorship'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';
| 'unincorporated_non_profit'
| 'unincorporated_partnership';

interface Verification {
/**
Expand Down Expand Up @@ -1991,6 +1993,7 @@ declare module 'stripe' {
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'incorporated_partnership'
| 'limited_liability_partnership'
| 'llc'
| 'multi_member_llc'
Expand All @@ -2005,7 +2008,8 @@ declare module 'stripe' {
| 'sole_proprietorship'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';
| 'unincorporated_non_profit'
| 'unincorporated_partnership';

interface Verification {
/**
Expand Down Expand Up @@ -3359,7 +3363,7 @@ declare module 'stripe' {
* for a Standard or Express account, some parameters can no longer be changed. These are marked as Custom Only or Custom and Express
* below.
*
* To update your own account, use the [Dashboard](https://dashboard.stripe.com/account). Refer to our
* To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our
* [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.
*/
update(
Expand All @@ -3382,7 +3386,7 @@ declare module 'stripe' {
*
* Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
*
* If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/account) instead.
* If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
*/
del(
id: string,
Expand Down
3 changes: 2 additions & 1 deletion types/BalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ declare module 'stripe' {
status: string;

/**
* Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `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](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.
* Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `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](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.
*/
type: BalanceTransaction.Type;
}
Expand Down Expand Up @@ -148,6 +148,7 @@ declare module 'stripe' {
| 'payment'
| 'payment_failure_refund'
| 'payment_refund'
| 'payment_reversal'
| 'payout'
| 'payout_cancel'
| 'payout_failure'
Expand Down
2 changes: 1 addition & 1 deletion types/BalanceTransactionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `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`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `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`.
*/
type?: string;
}
Expand Down
2 changes: 1 addition & 1 deletion types/BillingPortal/SessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ declare module 'stripe' {
flow_data?: SessionCreateParams.FlowData;

/**
* The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used.
* The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used.
*/
locale?: SessionCreateParams.Locale;

Expand Down
2 changes: 1 addition & 1 deletion types/CreditNoteLineItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare module 'stripe' {
namespace Stripe {
/**
* The CreditNoteLineItem object.
* The credit note line item object
*/
interface CreditNoteLineItem {
/**
Expand Down
10 changes: 10 additions & 0 deletions types/CustomerCashBalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ declare module 'stripe' {
*/
object: 'customer_cash_balance_transaction';

adjusted_for_overdraft?: CustomerCashBalanceTransaction.AdjustedForOverdraft;

applied_to_payment?: CustomerCashBalanceTransaction.AppliedToPayment;

/**
Expand Down Expand Up @@ -64,6 +66,13 @@ declare module 'stripe' {
}

namespace CustomerCashBalanceTransaction {
interface AdjustedForOverdraft {
/**
* The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.
*/
linked_transaction: string | Stripe.CustomerCashBalanceTransaction;
}

interface AppliedToPayment {
/**
* The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.
Expand Down Expand Up @@ -181,6 +190,7 @@ declare module 'stripe' {
}

type Type =
| 'adjusted_for_overdraft'
| 'applied_to_payment'
| 'funded'
| 'funding_reversed'
Expand Down
4 changes: 2 additions & 2 deletions types/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ declare module 'stripe' {
/**
* Details about the subscription that created this invoice.
*/
subscription_details?: Invoice.SubscriptionDetails | null;
subscription_details: Invoice.SubscriptionDetails | null;

/**
* Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
Expand Down Expand Up @@ -1196,7 +1196,7 @@ declare module 'stripe' {
/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
*/
metadata?: Stripe.Metadata | null;
metadata: Stripe.Metadata | null;
}

interface ThresholdReason {
Expand Down
4 changes: 3 additions & 1 deletion types/TaxRates.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ declare module 'stripe' {
display_name: string;

/**
* Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage does not include the statutory tax rate of non-taxable jurisdictions.
* Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true,
* this percentage reflects the rate actually used to calculate tax based on the product's taxability
* and whether the user is registered to collect taxes in the corresponding jurisdiction.
*/
effective_percentage: number | null;

Expand Down
4 changes: 3 additions & 1 deletion types/TokensResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ declare module 'stripe' {
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'incorporated_partnership'
| 'limited_liability_partnership'
| 'llc'
| 'multi_member_llc'
Expand All @@ -211,7 +212,8 @@ declare module 'stripe' {
| 'sole_proprietorship'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';
| 'unincorporated_non_profit'
| 'unincorporated_partnership';

interface Verification {
/**
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3154,9 +3154,9 @@ [email protected]:
string-width "^1.0.2 || 2"

word-wrap@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
version "1.2.5"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==

[email protected]:
version "6.1.0"
Expand Down

0 comments on commit c4cbe03

Please sign in to comment.