Skip to content

Commit

Permalink
Merge branch 'master' into feature/webhook-signing-nestjs
Browse files Browse the repository at this point in the history
  • Loading branch information
alikarimii committed Sep 10, 2023
2 parents bf3be05 + d5a9b0c commit 3d07dff
Show file tree
Hide file tree
Showing 26 changed files with 431 additions and 28 deletions.
21 changes: 16 additions & 5 deletions CHANGELOG.md
@@ -1,5 +1,16 @@
# Changelog

## 13.5.0 - 2023-09-07
* [#1893](https://github.com/stripe/stripe-node/pull/1893) Update generated code
* Add support for new resource `PaymentMethodDomain`
* Add support for `create`, `list`, `retrieve`, `update`, and `validate` methods on resource `PaymentMethodDomain`
* Add support for new value `n26` on enums `Charge.payment_method_details.ideal.bank`, `PaymentIntentConfirmParams.payment_method_data.ideal.bank`, `PaymentIntentCreateParams.payment_method_data.ideal.bank`, `PaymentIntentUpdateParams.payment_method_data.ideal.bank`, `PaymentMethod.ideal.bank`, `PaymentMethodCreateParams.ideal.bank`, `SetupAttempt.payment_method_details.ideal.bank`, `SetupIntentConfirmParams.payment_method_data.ideal.bank`, `SetupIntentCreateParams.payment_method_data.ideal.bank`, and `SetupIntentUpdateParams.payment_method_data.ideal.bank`
* Add support for new value `NTSBDEB1` on enums `Charge.payment_method_details.ideal.bic`, `PaymentMethod.ideal.bic`, and `SetupAttempt.payment_method_details.ideal.bic`
* Add support for new values `treasury.credit_reversal.created`, `treasury.credit_reversal.posted`, `treasury.debit_reversal.completed`, `treasury.debit_reversal.created`, `treasury.debit_reversal.initial_credit_granted`, `treasury.financial_account.closed`, `treasury.financial_account.created`, `treasury.financial_account.features_status_updated`, `treasury.inbound_transfer.canceled`, `treasury.inbound_transfer.created`, `treasury.inbound_transfer.failed`, `treasury.inbound_transfer.succeeded`, `treasury.outbound_payment.canceled`, `treasury.outbound_payment.created`, `treasury.outbound_payment.expected_arrival_date_updated`, `treasury.outbound_payment.failed`, `treasury.outbound_payment.posted`, `treasury.outbound_payment.returned`, `treasury.outbound_transfer.canceled`, `treasury.outbound_transfer.created`, `treasury.outbound_transfer.expected_arrival_date_updated`, `treasury.outbound_transfer.failed`, `treasury.outbound_transfer.posted`, `treasury.outbound_transfer.returned`, `treasury.received_credit.created`, `treasury.received_credit.failed`, `treasury.received_credit.succeeded`, and `treasury.received_debit.created` on enum `Event.type`
* Remove support for value `invoiceitem.updated` from enum `Event.type`
* Add support for `features` on `ProductCreateParams`, `ProductUpdateParams`, and `Product`
* Remove support for value `invoiceitem.updated` from enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`

## 13.4.0 - 2023-08-31
* [#1884](https://github.com/stripe/stripe-node/pull/1884) Update generated code
* Add support for new resource `AccountSession`
Expand All @@ -11,11 +22,11 @@

## 13.3.0 - 2023-08-24
* [#1879](https://github.com/stripe/stripe-node/pull/1879) Update generated code
* Add support for `retention` on `BillingPortal.Session.flow.subscription_cancel` and `BillingPortal.SessionCreateParams.flow_data.subscription_cancel`
* Add support for `prefetch` on `Checkout.Session.payment_method_options.us_bank_account.financial_connections`, `Checkout.SessionCreateParams.payment_method_options.us_bank_account.financial_connections`, `FinancialConnections.SessionCreateParams`, `FinancialConnections.Session`, `Invoice.payment_settings.payment_method_options.us_bank_account.financial_connections`, `InvoiceCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `InvoiceUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `PaymentIntent.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentConfirmParams.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentCreateParams.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentUpdateParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntent.payment_method_options.us_bank_account.financial_connections`, `SetupIntentConfirmParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntentCreateParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntentUpdateParams.payment_method_options.us_bank_account.financial_connections`, `Subscription.payment_settings.payment_method_options.us_bank_account.financial_connections`, `SubscriptionCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, and `SubscriptionUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`
* Add support for `payment_method_details` on `Dispute`
* Change type of `PaymentIntentCreateParams.mandate_data` and `SetupIntentCreateParams.mandate_data` from `secret_key_param` to `emptyStringable(secret_key_param)`
* Change type of `PaymentIntentConfirmParams.mandate_data` and `SetupIntentConfirmParams.mandate_data` from `secret_key_param | client_key_param` to `emptyStringable(secret_key_param | client_key_param)`
* Add support for `retention` on `BillingPortal.Session.flow.subscription_cancel` and `BillingPortal.SessionCreateParams.flow_data.subscription_cancel`
* Add support for `prefetch` on `Checkout.Session.payment_method_options.us_bank_account.financial_connections`, `Checkout.SessionCreateParams.payment_method_options.us_bank_account.financial_connections`, `FinancialConnections.SessionCreateParams`, `FinancialConnections.Session`, `Invoice.payment_settings.payment_method_options.us_bank_account.financial_connections`, `InvoiceCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `InvoiceUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `PaymentIntent.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentConfirmParams.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentCreateParams.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentUpdateParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntent.payment_method_options.us_bank_account.financial_connections`, `SetupIntentConfirmParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntentCreateParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntentUpdateParams.payment_method_options.us_bank_account.financial_connections`, `Subscription.payment_settings.payment_method_options.us_bank_account.financial_connections`, `SubscriptionCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, and `SubscriptionUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`
* Add support for `payment_method_details` on `Dispute`
* Change type of `PaymentIntentCreateParams.mandate_data` and `SetupIntentCreateParams.mandate_data` from `secret_key_param` to `emptyStringable(secret_key_param)`
* Change type of `PaymentIntentConfirmParams.mandate_data` and `SetupIntentConfirmParams.mandate_data` from `secret_key_param | client_key_param` to `emptyStringable(secret_key_param | client_key_param)`
* Add support for `balance_transaction` on `CustomerCashBalanceTransaction.adjusted_for_overdraft`
* [#1882](https://github.com/stripe/stripe-node/pull/1882) Update v13.0.0 CHANGELOG.md
* [#1880](https://github.com/stripe/stripe-node/pull/1880) Improved `maxNetworkRetries` options JSDoc
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
@@ -1 +1 @@
v499
v514
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
13.4.0
13.5.0
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "stripe",
"version": "13.4.0",
"version": "13.5.0",
"description": "Stripe API wrapper",
"keywords": [
"stripe",
Expand Down
1 change: 1 addition & 0 deletions src/resources.ts
Expand Up @@ -72,6 +72,7 @@ export {Mandates} from './resources/Mandates.js';
export {OAuth} from './resources/OAuth.js';
export {PaymentIntents} from './resources/PaymentIntents.js';
export {PaymentLinks} from './resources/PaymentLinks.js';
export {PaymentMethodDomains} from './resources/PaymentMethodDomains.js';
export {PaymentMethods} from './resources/PaymentMethods.js';
export {Payouts} from './resources/Payouts.js';
export {Plans} from './resources/Plans.js';
Expand Down
27 changes: 27 additions & 0 deletions src/resources/PaymentMethodDomains.ts
@@ -0,0 +1,27 @@
// File generated from our OpenAPI spec

import {StripeResource} from '../StripeResource.js';
const stripeMethod = StripeResource.method;
export const PaymentMethodDomains = StripeResource.extend({
create: stripeMethod({
method: 'POST',
fullPath: '/v1/payment_method_domains',
}),
retrieve: stripeMethod({
method: 'GET',
fullPath: '/v1/payment_method_domains/{payment_method_domain}',
}),
update: stripeMethod({
method: 'POST',
fullPath: '/v1/payment_method_domains/{payment_method_domain}',
}),
list: stripeMethod({
method: 'GET',
fullPath: '/v1/payment_method_domains',
methodType: 'list',
}),
validate: stripeMethod({
method: 'POST',
fullPath: '/v1/payment_method_domains/{payment_method_domain}/validate',
}),
});
2 changes: 1 addition & 1 deletion src/stripe.core.ts
Expand Up @@ -49,7 +49,7 @@ export function createStripe(
platformFunctions: PlatformFunctions,
requestSender: RequestSenderFactory = defaultRequestSenderFactory
): typeof Stripe {
Stripe.PACKAGE_VERSION = '13.4.0';
Stripe.PACKAGE_VERSION = '13.5.0';
Stripe.USER_AGENT = {
bindings_version: Stripe.PACKAGE_VERSION,
lang: 'node',
Expand Down
2 changes: 1 addition & 1 deletion types/AccountLinks.d.ts
Expand Up @@ -6,7 +6,7 @@ declare module 'stripe' {
* Account Links are the means by which a Connect platform grants a connected account permission to access
* Stripe-hosted applications, such as Connect Onboarding.
*
* Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding)
* Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding)
*/
interface AccountLink {
/**
Expand Down
1 change: 1 addition & 0 deletions types/BalanceTransactions.d.ts
Expand Up @@ -77,6 +77,7 @@ declare module 'stripe' {
| Stripe.ApplicationFee
| Stripe.Charge
| Stripe.ConnectCollectionTransfer
| Stripe.CustomerCashBalanceTransaction
| Stripe.Dispute
| Stripe.FeeRefund
| Stripe.Issuing.Authorization
Expand Down
4 changes: 3 additions & 1 deletion types/Charges.d.ts
Expand Up @@ -1264,7 +1264,7 @@ declare module 'stripe' {

interface Ideal {
/**
* The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
* The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
*/
bank: Ideal.Bank | null;

Expand Down Expand Up @@ -1304,6 +1304,7 @@ declare module 'stripe' {
| 'ing'
| 'knab'
| 'moneyou'
| 'n26'
| 'rabobank'
| 'regiobank'
| 'revolut'
Expand All @@ -1322,6 +1323,7 @@ declare module 'stripe' {
| 'INGBNL2A'
| 'KNABNL2H'
| 'MOYONL21'
| 'NTSBDEB1'
| 'RABONL2U'
| 'RBRBNL21'
| 'REVOIE23'
Expand Down
32 changes: 30 additions & 2 deletions types/Events.d.ts
Expand Up @@ -201,7 +201,6 @@ declare module 'stripe' {
| 'invoice.voided'
| 'invoiceitem.created'
| 'invoiceitem.deleted'
| 'invoiceitem.updated'
| 'issuing_authorization.created'
| 'issuing_authorization.request'
| 'issuing_authorization.updated'
Expand Down Expand Up @@ -308,7 +307,36 @@ declare module 'stripe' {
| 'topup.succeeded'
| 'transfer.created'
| 'transfer.reversed'
| 'transfer.updated';
| 'transfer.updated'
| 'treasury.credit_reversal.created'
| 'treasury.credit_reversal.posted'
| 'treasury.debit_reversal.completed'
| 'treasury.debit_reversal.created'
| 'treasury.debit_reversal.initial_credit_granted'
| 'treasury.financial_account.closed'
| 'treasury.financial_account.created'
| 'treasury.financial_account.features_status_updated'
| 'treasury.inbound_transfer.canceled'
| 'treasury.inbound_transfer.created'
| 'treasury.inbound_transfer.failed'
| 'treasury.inbound_transfer.succeeded'
| 'treasury.outbound_payment.canceled'
| 'treasury.outbound_payment.created'
| 'treasury.outbound_payment.expected_arrival_date_updated'
| 'treasury.outbound_payment.failed'
| 'treasury.outbound_payment.posted'
| 'treasury.outbound_payment.returned'
| 'treasury.outbound_transfer.canceled'
| 'treasury.outbound_transfer.created'
| 'treasury.outbound_transfer.expected_arrival_date_updated'
| 'treasury.outbound_transfer.failed'
| 'treasury.outbound_transfer.posted'
| 'treasury.outbound_transfer.returned'
| 'treasury.received_credit.created'
| 'treasury.received_credit.failed'
| 'treasury.received_credit.succeeded'
| 'treasury.received_debit.created'
| 'invoiceitem.updated';
}
}
}
3 changes: 3 additions & 0 deletions types/PaymentIntentsResource.d.ts
Expand Up @@ -599,6 +599,7 @@ declare module 'stripe' {
| 'ing'
| 'knab'
| 'moneyou'
| 'n26'
| 'rabobank'
| 'regiobank'
| 'revolut'
Expand Down Expand Up @@ -2526,6 +2527,7 @@ declare module 'stripe' {
| 'ing'
| 'knab'
| 'moneyou'
| 'n26'
| 'rabobank'
| 'regiobank'
| 'revolut'
Expand Down Expand Up @@ -4594,6 +4596,7 @@ declare module 'stripe' {
| 'ing'
| 'knab'
| 'moneyou'
| 'n26'
| 'rabobank'
| 'regiobank'
| 'revolut'
Expand Down
157 changes: 157 additions & 0 deletions types/PaymentMethodDomains.d.ts
@@ -0,0 +1,157 @@
// File generated from our OpenAPI spec

declare module 'stripe' {
namespace Stripe {
/**
* A payment method domain represents a web domain that you have registered with Stripe.
* Stripe Elements use registered payment method domains to control where certain payment methods are shown.
*
* Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
*/
interface PaymentMethodDomain {
/**
* Unique identifier for the object.
*/
id: string;

/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'payment_method_domain';

/**
* Indicates the status of a specific payment method on a payment method domain.
*/
apple_pay: PaymentMethodDomain.ApplePay;

/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;

/**
* The domain name that this payment method domain object represents.
*/
domain_name: string;

/**
* Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
*/
enabled: boolean;

/**
* Indicates the status of a specific payment method on a payment method domain.
*/
google_pay: PaymentMethodDomain.GooglePay;

/**
* Indicates the status of a specific payment method on a payment method domain.
*/
link: PaymentMethodDomain.Link;

/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;

/**
* Indicates the status of a specific payment method on a payment method domain.
*/
paypal: PaymentMethodDomain.Paypal;
}

namespace PaymentMethodDomain {
interface ApplePay {
/**
* The status of the payment method on the domain.
*/
status: ApplePay.Status;

/**
* Contains additional details about the status of a payment method for a specific payment method domain.
*/
status_details?: ApplePay.StatusDetails;
}

namespace ApplePay {
type Status = 'active' | 'inactive';

interface StatusDetails {
/**
* The error message associated with the status of the payment method on the domain.
*/
error_message: string;
}
}

interface GooglePay {
/**
* The status of the payment method on the domain.
*/
status: GooglePay.Status;

/**
* Contains additional details about the status of a payment method for a specific payment method domain.
*/
status_details?: GooglePay.StatusDetails;
}

namespace GooglePay {
type Status = 'active' | 'inactive';

interface StatusDetails {
/**
* The error message associated with the status of the payment method on the domain.
*/
error_message: string;
}
}

interface Link {
/**
* The status of the payment method on the domain.
*/
status: Link.Status;

/**
* Contains additional details about the status of a payment method for a specific payment method domain.
*/
status_details?: Link.StatusDetails;
}

namespace Link {
type Status = 'active' | 'inactive';

interface StatusDetails {
/**
* The error message associated with the status of the payment method on the domain.
*/
error_message: string;
}
}

interface Paypal {
/**
* The status of the payment method on the domain.
*/
status: Paypal.Status;

/**
* Contains additional details about the status of a payment method for a specific payment method domain.
*/
status_details?: Paypal.StatusDetails;
}

namespace Paypal {
type Status = 'active' | 'inactive';

interface StatusDetails {
/**
* The error message associated with the status of the payment method on the domain.
*/
error_message: string;
}
}
}
}
}

0 comments on commit 3d07dff

Please sign in to comment.