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

API Updates for beta branch #1643

Merged
merged 7 commits into from
Dec 22, 2022
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 11.5.0 - 2022-12-22
* [#1642](https://github.com/stripe/stripe-node/pull/1642) API Updates
* Add support for new value `merchant_default` on enums `CashBalanceUpdateParams.settings.reconciliation_mode`, `CustomerCreateParams.cash_balance.settings.reconciliation_mode`, and `CustomerUpdateParams.cash_balance.settings.reconciliation_mode`
* Add support for `using_merchant_default` on `CashBalance.settings`
* Change `CheckoutSessionCreateParams.cancel_url` to be optional
* Change type of `Checkout.Session.cancel_url` from `string` to `string | null`

## 11.5.0-beta.1 - 2022-12-15
* [#1640](https://github.com/stripe/stripe-node/pull/1640) API Updates for beta branch
* Updated stable APIs to the latest version
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v215
v216
6 changes: 4 additions & 2 deletions lib/resources.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ module.exports = {
SubscriptionItems: require('./resources/SubscriptionItems'),
Subscriptions: require('./resources/Subscriptions'),
SubscriptionSchedules: require('./resources/SubscriptionSchedules'),
TaxCalculations: require('./resources/TaxCalculations'),
TaxCodes: require('./resources/TaxCodes'),
TaxRates: require('./resources/TaxRates'),
TaxTransactions: require('./resources/TaxTransactions'),
Tokens: require('./resources/Tokens'),
Topups: require('./resources/Topups'),
Transfers: require('./resources/Transfers'),
Expand Down Expand Up @@ -103,6 +101,10 @@ module.exports = {
Sigma: resourceNamespace('sigma', {
ScheduledQueryRuns: require('./resources/Sigma/ScheduledQueryRuns'),
}),
Tax: resourceNamespace('tax', {
Calculations: require('./resources/Tax/Calculations'),
Transactions: require('./resources/Tax/Transactions'),
}),
Terminal: resourceNamespace('terminal', {
Configurations: require('./resources/Terminal/Configurations'),
ConnectionTokens: require('./resources/Terminal/ConnectionTokens'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

'use strict';

const StripeResource = require('../StripeResource');
const StripeResource = require('../../StripeResource');
const stripeMethod = StripeResource.method;

module.exports = StripeResource.extend({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

'use strict';

const StripeResource = require('../StripeResource');
const StripeResource = require('../../StripeResource');
const stripeMethod = StripeResource.method;

module.exports = StripeResource.extend({
Expand Down
5 changes: 5 additions & 0 deletions types/CashBalances.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ declare module 'stripe' {
* The configuration for how funds that land in the customer cash balance are reconciled.
*/
reconciliation_mode: Settings.ReconciliationMode;

/**
* A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance
*/
using_merchant_default: boolean;
}

namespace Settings {
Expand Down
4 changes: 2 additions & 2 deletions types/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ declare module 'stripe' {
billing_address_collection: Session.BillingAddressCollection | null;

/**
* The URL the customer will be directed to if they decide to cancel payment and return to your website.
* If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
*/
cancel_url: string;
cancel_url: string | null;

/**
* A unique string to reference the Checkout Session. This can be a
Expand Down
10 changes: 5 additions & 5 deletions types/Checkout/SessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ declare module 'stripe' {
namespace Stripe {
namespace Checkout {
interface SessionCreateParams {
/**
* The URL the customer will be directed to if they decide to cancel payment and return to your website.
*/
cancel_url: string;

/**
* The URL to which Stripe should send customers when payment or setup
* is complete.
Expand Down Expand Up @@ -37,6 +32,11 @@ declare module 'stripe' {
*/
billing_address_collection?: SessionCreateParams.BillingAddressCollection;

/**
* If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
*/
cancel_url?: string;

/**
* A unique string to reference the Checkout Session. This can be a
* customer ID, a cart ID, or similar, and can be used to reconcile the
Expand Down
12 changes: 6 additions & 6 deletions types/CustomersResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ declare module 'stripe' {
namespace CashBalance {
interface Settings {
/**
* Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic` or `manual`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
* Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
*/
reconciliation_mode?: Settings.ReconciliationMode;
}

namespace Settings {
type ReconciliationMode = 'automatic' | 'manual';
type ReconciliationMode = 'automatic' | 'manual' | 'merchant_default';
}
}

Expand Down Expand Up @@ -393,13 +393,13 @@ declare module 'stripe' {
namespace CashBalance {
interface Settings {
/**
* Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic` or `manual`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
* Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
*/
reconciliation_mode?: Settings.ReconciliationMode;
}

namespace Settings {
type ReconciliationMode = 'automatic' | 'manual';
type ReconciliationMode = 'automatic' | 'manual' | 'merchant_default';
}
}

Expand Down Expand Up @@ -661,13 +661,13 @@ declare module 'stripe' {
namespace CashBalanceUpdateParams {
interface Settings {
/**
* Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic` or `manual`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
* Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
*/
reconciliation_mode?: Settings.ReconciliationMode;
}

namespace Settings {
type ReconciliationMode = 'automatic' | 'manual';
type ReconciliationMode = 'automatic' | 'manual' | 'merchant_default';
}
}

Expand Down
6 changes: 6 additions & 0 deletions types/OrdersResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,9 @@ declare module 'stripe' {

namespace CustomerBalance {
interface BankTransfer {
/**
* Configuration for the eu_bank_transfer funding type.
*/
eu_bank_transfer?: BankTransfer.EuBankTransfer;

/**
Expand Down Expand Up @@ -1845,6 +1848,9 @@ declare module 'stripe' {

namespace CustomerBalance {
interface BankTransfer {
/**
* Configuration for the eu_bank_transfer funding type.
*/
eu_bank_transfer?: BankTransfer.EuBankTransfer;

/**
Expand Down
9 changes: 9 additions & 0 deletions types/PaymentIntentsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,9 @@ declare module 'stripe' {

namespace CustomerBalance {
interface BankTransfer {
/**
* Configuration for the eu_bank_transfer funding type.
*/
eu_bank_transfer?: BankTransfer.EuBankTransfer;

/**
Expand Down Expand Up @@ -3282,6 +3285,9 @@ declare module 'stripe' {

namespace CustomerBalance {
interface BankTransfer {
/**
* Configuration for the eu_bank_transfer funding type.
*/
eu_bank_transfer?: BankTransfer.EuBankTransfer;

/**
Expand Down Expand Up @@ -5273,6 +5279,9 @@ declare module 'stripe' {

namespace CustomerBalance {
interface BankTransfer {
/**
* Configuration for the eu_bank_transfer funding type.
*/
eu_bank_transfer?: BankTransfer.EuBankTransfer;

/**
Expand Down
6 changes: 3 additions & 3 deletions types/Quotes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ declare module 'stripe' {

interface SubscriptionData {
/**
* TODO
* Describes what period to bill for upon accepting the quote.
*/
bill_on_acceptance?: SubscriptionData.BillOnAcceptance | null;

Expand All @@ -577,7 +577,7 @@ declare module 'stripe' {
effective_date: number | null;

/**
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` and `cancel`.
* Behavior of the subscription schedule and underlying subscription when it ends.
*/
end_behavior?: SubscriptionData.EndBehavior | null;

Expand Down Expand Up @@ -756,7 +756,7 @@ declare module 'stripe' {
description: string | null;

/**
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` and `cancel`.
* Behavior of the subscription schedule and underlying subscription when it ends.
*/
end_behavior: SubscriptionDataOverride.EndBehavior | null;

Expand Down
8 changes: 4 additions & 4 deletions types/QuotesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ declare module 'stripe' {
effective_date?: Stripe.Emptyable<'current_period_end' | number>;

/**
* Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.
* Behavior of the subscription schedule and underlying subscription when it ends.
*/
end_behavior?: SubscriptionData.EndBehavior;

Expand Down Expand Up @@ -1359,7 +1359,7 @@ declare module 'stripe' {
description?: string;

/**
* Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.
* Behavior of the subscription schedule and underlying subscription when it ends.
*/
end_behavior?: SubscriptionDataOverride.EndBehavior;

Expand Down Expand Up @@ -2696,7 +2696,7 @@ declare module 'stripe' {
effective_date?: Stripe.Emptyable<'current_period_end' | number>;

/**
* Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.
* Behavior of the subscription schedule and underlying subscription when it ends.
*/
end_behavior?: SubscriptionData.EndBehavior;

Expand Down Expand Up @@ -2870,7 +2870,7 @@ declare module 'stripe' {
description?: string;

/**
* Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.
* Behavior of the subscription schedule and underlying subscription when it ends.
*/
end_behavior?: SubscriptionDataOverride.EndBehavior;

Expand Down
2 changes: 1 addition & 1 deletion types/SubscriptionSchedules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ declare module 'stripe' {
default_settings: SubscriptionSchedule.DefaultSettings;

/**
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` and `cancel`.
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.
*/
end_behavior: SubscriptionSchedule.EndBehavior;

Expand Down
10 changes: 7 additions & 3 deletions types/SubscriptionSchedulesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ declare module 'stripe' {
default_settings?: SubscriptionScheduleCreateParams.DefaultSettings;

/**
* Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.
*/
end_behavior?: SubscriptionScheduleCreateParams.EndBehavior;

Expand Down Expand Up @@ -729,7 +729,7 @@ declare module 'stripe' {
default_settings?: SubscriptionScheduleUpdateParams.DefaultSettings;

/**
* Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.
*/
end_behavior?: SubscriptionScheduleUpdateParams.EndBehavior;

Expand Down Expand Up @@ -1577,6 +1577,8 @@ declare module 'stripe' {
| 'duration'
| 'schedule_end'
| 'timestamp'
| 'trial_end'
| 'trial_start'
| 'upcoming_invoice';
}

Expand Down Expand Up @@ -1623,6 +1625,8 @@ declare module 'stripe' {
| 'now'
| 'schedule_end'
| 'timestamp'
| 'trial_end'
| 'trial_start'
| 'upcoming_invoice';
}

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

interface ScheduleSettings {
/**
* Configures how the subscription schedule behaves when it ends.
* Behavior of the subscription schedule and underlying subscription when it ends.
*/
end_behavior?: ScheduleSettings.EndBehavior;
}
Expand Down
Loading