Skip to content

Commit

Permalink
Merge pull request #1614 from stripe/anniel-merge-master
Browse files Browse the repository at this point in the history
Update sdk-release/next-major with latest changes
  • Loading branch information
anniel-stripe committed Nov 9, 2022
2 parents 20f978f + e8ab3a5 commit 1356531
Show file tree
Hide file tree
Showing 129 changed files with 35 additions and 31 deletions.
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022-08-01
2022-11-09
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 10.17.0 - 2022-11-08
* [#1610](https://github.com/stripe/stripe-node/pull/1610) API Updates
* Add support for new values `eg_tin`, `ph_tin`, and `tr_tin` on enums `Checkout.Session.customer_details.tax_ids[].type`, `Invoice.customer_tax_ids[].type`, `Order.tax_details.tax_ids[].type`, and `TaxId.type`
* Add support for new values `eg_tin`, `ph_tin`, and `tr_tin` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceUpcomingLinesParams.customer_details.tax_ids[].type`, `InvoiceUpcomingParams.customer_details.tax_ids[].type`, `OrderCreateParams.tax_details.tax_ids[].type`, `OrderUpdateParams.tax_details.tax_ids[].type`, and `TaxIdCreateParams.type`
* Add support for `reason_message` on `Issuing.Authorization.request_history[]`
* Add support for new value `webhook_error` on enum `Issuing.Authorization.request_history[].reason`

## 10.16.0 - 2022-11-03
* [#1596](https://github.com/stripe/stripe-node/pull/1596) API Updates
* Add support for `on_behalf_of` on `CheckoutSessionCreateParams.subscription_data`, `SubscriptionCreateParams`, `SubscriptionSchedule.default_settings`, `SubscriptionSchedule.phases[]`, `SubscriptionScheduleCreateParams.default_settings`, `SubscriptionScheduleCreateParams.phases[]`, `SubscriptionScheduleUpdateParams.default_settings`, `SubscriptionScheduleUpdateParams.phases[]`, `SubscriptionUpdateParams`, and `Subscription`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v204
v206
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-08-01',
apiVersion: '2022-11-09',
});

const createCustomer = async () => {
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.16.0
10.17.0
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-08-01',
apiVersion: '2022-11-09',
});

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.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stripe",
"version": "10.16.0",
"version": "10.17.0",
"description": "Stripe API wrapper",
"keywords": [
"stripe",
Expand All @@ -25,7 +25,7 @@
"node": ">=12.*"
},
"main": "lib/stripe.js",
"types": "types/2022-08-01/index.d.ts",
"types": "types/2022-11-09/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-08-01'};
module.exports = {ApiVersion: '2022-11-09'};
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 @@ -204,7 +204,7 @@ declare module 'stripe' {
/**
* A list of refunds that have been applied to the charge.
*/
refunds?: ApiList<Stripe.Refund>;
refunds: ApiList<Stripe.Refund> | null;

/**
* ID of the review associated with this charge if one exists.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1728,11 +1728,6 @@ declare module 'stripe' {
*/
adjustable_quantity?: LineItem.AdjustableQuantity;

/**
* [Deprecated] The amount to be collected per unit of the line item. If specified, must also pass `currency` and `name`.
*/
amount?: number;

/**
* The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU.
*/
Expand Down Expand Up @@ -2560,11 +2555,6 @@ declare module 'stripe' {
* When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
*/
setup_future_usage?: 'none';

/**
* Confirm that the payer has accepted the P24 terms and conditions.
*/
tos_shown_and_accepted?: boolean;
}

interface Pix {
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.
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ declare module 'stripe' {
* The reason for the approval or decline.
*/
reason: RequestHistory.Reason;

/**
* If approve/decline decision is directly responsed to the webhook with json payload and if the response is invalid (e.g., parsing errors), we surface the detailed message via this field.
*/
reason_message: string | null;
}

namespace RequestHistory {
Expand All @@ -294,6 +299,7 @@ declare module 'stripe' {
| 'verification_failed'
| 'webhook_approved'
| 'webhook_declined'
| 'webhook_error'
| 'webhook_timeout';
}

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.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ declare module 'stripe' {
*/
capture_method: PaymentIntent.CaptureMethod;

/**
* Charges that were created by this PaymentIntent, if any.
*/
charges?: ApiList<Stripe.Charge>;

/**
* The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.
*
Expand Down Expand Up @@ -123,6 +118,11 @@ declare module 'stripe' {
*/
last_payment_error: PaymentIntent.LastPaymentError | null;

/**
* The latest charge created by this payment intent.
*/
latest_charge?: string | Stripe.Charge | null;

/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
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.
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 @@ -230,7 +230,8 @@ declare module 'stripe' {
| '2019-12-03'
| '2020-03-02'
| '2020-08-27'
| '2022-08-01';
| '2022-08-01'
| '2022-11-09';

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-08-01';
export type LatestApiVersion = '2022-11-09';
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-08-01" />
///<reference types="../2022-11-09" />
import Stripe from 'stripe';

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

// @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-08-01',
apiVersion: '2022-11-09',
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-08-01',
apiVersion: '2022-11-09',
};
const customer: Stripe.Customer = await stripe.customers.create(params, opts);

Expand Down

0 comments on commit 1356531

Please sign in to comment.