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 #1118

Merged
merged 2 commits into from
Feb 5, 2021
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
2 changes: 1 addition & 1 deletion lib/resources/EphemeralKeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = StripeResource.extend({
validator: (data, options) => {
if (!options.headers || !options.headers['Stripe-Version']) {
throw new Error(
'stripe_version must be specified to create an ephemeral key'
'Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node'
);
}
},
Expand Down
4 changes: 3 additions & 1 deletion test/resources/EphemeralKeys.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ const expect = require('chai').expect;
function errorsOnNoStripeVersion() {
return expect(
stripe.ephemeralKeys.create({customer: 'cus_123'})
).to.be.eventually.rejectedWith(/stripe_version must be specified/i);
).to.be.eventually.rejectedWith(
/Passing apiVersion in a separate options hash is required/i
);
}

function sendsCorrectStripeVersion() {
Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/LineItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ declare module 'stripe' {
/**
* Total before any discounts or taxes are applied.
*/
amount_subtotal: number | null;
amount_subtotal: number;

/**
* Total after discounts and taxes.
*/
amount_total: number | null;
amount_total: number;

/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Expand Down