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

Merged
merged 1 commit into from
Feb 11, 2022
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
5 changes: 5 additions & 0 deletions lib/resources/PaymentIntents.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ module.exports = StripeResource.extend({
method: 'POST',
path: '/{intent}/confirm',
}),

verifyMicrodeposits: stripeMethod({
method: 'POST',
path: '/{intent}/verify_microdeposits',
}),
});
5 changes: 5 additions & 0 deletions lib/resources/SetupIntents.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@ module.exports = StripeResource.extend({
method: 'POST',
path: '/{intent}/confirm',
}),

verifyMicrodeposits: stripeMethod({
method: 'POST',
path: '/{intent}/verify_microdeposits',
}),
});
3 changes: 3 additions & 0 deletions types/2020-08-27/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ declare module 'stripe' {
| 'card'
| 'fpx'
| 'giropay'
| 'grabpay'
| 'ideal'
| 'sepa_credit_transfer'
| 'sepa_debit'
Expand Down Expand Up @@ -1029,6 +1030,7 @@ declare module 'stripe' {
| 'card'
| 'fpx'
| 'giropay'
| 'grabpay'
| 'ideal'
| 'sepa_credit_transfer'
| 'sepa_debit'
Expand Down Expand Up @@ -1286,6 +1288,7 @@ declare module 'stripe' {
| 'card'
| 'fpx'
| 'giropay'
| 'grabpay'
| 'ideal'
| 'sepa_credit_transfer'
| 'sepa_debit'
Expand Down
25 changes: 25 additions & 0 deletions types/2020-08-27/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4005,6 +4005,18 @@ declare module 'stripe' {
}
}

interface PaymentIntentVerifyMicrodepositsParams {
/**
* Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
*/
amounts?: Array<number>;

/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}

class PaymentIntentsResource {
/**
* Creates a PaymentIntent object.
Expand Down Expand Up @@ -4132,6 +4144,19 @@ declare module 'stripe' {
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.PaymentIntent>>;

/**
* Verifies microdeposits on a PaymentIntent object.
*/
verifyMicrodeposits(
id: string,
params?: PaymentIntentVerifyMicrodepositsParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.PaymentIntent>>;
verifyMicrodeposits(
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.PaymentIntent>>;
}
}
}
25 changes: 25 additions & 0 deletions types/2020-08-27/SetupIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,18 @@ declare module 'stripe' {
}
}

interface SetupIntentVerifyMicrodepositsParams {
/**
* Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
*/
amounts?: Array<number>;

/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}

class SetupIntentsResource {
/**
* Creates a SetupIntent object.
Expand Down Expand Up @@ -1121,6 +1133,19 @@ declare module 'stripe' {
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.SetupIntent>>;

/**
* Verifies microdeposits on a SetupIntent object.
*/
verifyMicrodeposits(
id: string,
params?: SetupIntentVerifyMicrodepositsParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.SetupIntent>>;
verifyMicrodeposits(
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.SetupIntent>>;
}
}
}
4 changes: 2 additions & 2 deletions types/2020-08-27/SubscriptionItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ declare module 'stripe' {
*
* For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
*
* Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/billing/prices-guide).
* Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).
*/
plan: Stripe.Plan;

Expand All @@ -51,7 +51,7 @@ declare module 'stripe' {
*
* For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
*
* Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/billing/prices-guide).
* Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).
*/
price: Stripe.Price;

Expand Down
3 changes: 3 additions & 0 deletions types/2020-08-27/Subscriptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ declare module 'stripe' {
| 'card'
| 'fpx'
| 'giropay'
| 'grabpay'
| 'ideal'
| 'sepa_credit_transfer'
| 'sepa_debit'
Expand Down Expand Up @@ -869,6 +870,7 @@ declare module 'stripe' {
| 'card'
| 'fpx'
| 'giropay'
| 'grabpay'
| 'ideal'
| 'sepa_credit_transfer'
| 'sepa_debit'
Expand Down Expand Up @@ -1401,6 +1403,7 @@ declare module 'stripe' {
| 'card'
| 'fpx'
| 'giropay'
| 'grabpay'
| 'ideal'
| 'sepa_credit_transfer'
| 'sepa_debit'
Expand Down
18 changes: 15 additions & 3 deletions types/2020-08-27/Terminal/Readers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,19 @@ declare module 'stripe' {
id: string,
params?: ReaderRetrieveParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Terminal.Reader>>;
): Promise<
Stripe.Response<
Stripe.Terminal.Reader | Stripe.Terminal.DeletedReader
>
>;
retrieve(
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Terminal.Reader>>;
): Promise<
Stripe.Response<
Stripe.Terminal.Reader | Stripe.Terminal.DeletedReader
>
>;

/**
* Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Expand All @@ -205,7 +213,11 @@ declare module 'stripe' {
id: string,
params?: ReaderUpdateParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Terminal.Reader>>;
): Promise<
Stripe.Response<
Stripe.Terminal.Reader | Stripe.Terminal.DeletedReader
>
>;

/**
* Returns a list of Reader objects.
Expand Down