Skip to content

Commit

Permalink
Merge pull request #1620 from stripe/anniel-latest-api-version
Browse files Browse the repository at this point in the history
Update sdk-release/next-major with latest API changes
  • Loading branch information
anniel-stripe committed Nov 15, 2022
2 parents 664bd7f + 6c64bbf commit 07c7892
Show file tree
Hide file tree
Showing 126 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022-11-09
2022-11-15
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ and instantiate it as `new Stripe()` with the latest API version.
```ts
import Stripe from 'stripe';
const stripe = new Stripe('sk_test_...', {
apiVersion: '2022-11-09',
apiVersion: '2022-11-15',
});

const createCustomer = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import env from 'dotenv';
env.config();

const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
apiVersion: '2022-11-09',
apiVersion: '2022-11-15',
});

const webhookSecret: string = process.env.STRIPE_WEBHOOK_SECRET;
Expand Down
2 changes: 1 addition & 1 deletion lib/apiVersion.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"node": ">=12.*"
},
"main": "lib/stripe.js",
"types": "types/2022-11-09/index.d.ts",
"types": "types/2022-11-15/index.d.ts",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
Expand Down
2 changes: 1 addition & 1 deletion src/apiVersion.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// File generated from our OpenAPI spec

module.exports = {ApiVersion: '2022-11-09'};
module.exports = {ApiVersion: '2022-11-15'};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ declare module 'stripe' {
* but not yet refunded. Funds will be refunded to the credit or debit card that
* was originally charged.
*
* Stripe Tax users with recurring payments and invoices can create [Credit Notes](https://stripe.com/docs/api/credit_notes),
* which reduce overall tax liability because tax is correctly recalculated and
* apportioned to the related invoice.
*
* Related guide: [Refunds](https://stripe.com/docs/refunds).
*/
interface Refund {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ declare module 'stripe' {
| '2020-03-02'
| '2020-08-27'
| '2022-08-01'
| '2022-11-09';
| '2022-11-15';

type EnabledEvent =
| '*'
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion types/lib.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ declare module 'stripe' {
};
static MAX_BUFFERED_REQUEST_METRICS: number;
}
export type LatestApiVersion = '2022-11-09';
export type LatestApiVersion = '2022-11-15';
export type HttpAgent = Agent;
export type HttpProtocol = 'http' | 'https';

Expand Down
8 changes: 4 additions & 4 deletions types/test/typescriptTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* and to perform a basic sanity check that types are exported as intended.
*/

///<reference types="../2022-11-09" />
///<reference types="../2022-11-15" />
import Stripe from 'stripe';

let stripe = new Stripe('sk_test_123', {
apiVersion: '2022-11-09',
apiVersion: '2022-11-15',
});

// @ts-ignore lazily ignore apiVersion requirement.
Expand All @@ -27,7 +27,7 @@ stripe = new Stripe('sk_test_123', {

// Check config object.
stripe = new Stripe('sk_test_123', {
apiVersion: '2022-11-09',
apiVersion: '2022-11-15',
typescript: true,
maxNetworkRetries: 1,
timeout: 1000,
Expand All @@ -45,7 +45,7 @@ stripe = new Stripe('sk_test_123', {
description: 'test',
};
const opts: Stripe.RequestOptions = {
apiVersion: '2022-11-09',
apiVersion: '2022-11-15',
};
const customer: Stripe.Customer = await stripe.customers.create(params, opts);

Expand Down

0 comments on commit 07c7892

Please sign in to comment.