Skip to content

Commit

Permalink
API Updates (#1118)
Browse files Browse the repository at this point in the history
* Codegen for openapi 79b5ae3
  • Loading branch information
richardm-stripe committed Feb 5, 2021
1 parent 1a3b2be commit 8c3269d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
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

0 comments on commit 8c3269d

Please sign in to comment.