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

Merged
merged 4 commits into from
May 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions lib/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ module.exports = {
Checkout: resourceNamespace('checkout', {
Sessions: require('./resources/Checkout/Sessions'),
}),
FinancialConnections: resourceNamespace('financialConnections', {
Accounts: require('./resources/FinancialConnections/Accounts'),
Sessions: require('./resources/FinancialConnections/Sessions'),
}),
Identity: resourceNamespace('identity', {
VerificationReports: require('./resources/Identity/VerificationReports'),
VerificationSessions: require('./resources/Identity/VerificationSessions'),
Expand Down
25 changes: 25 additions & 0 deletions lib/resources/FinancialConnections/Accounts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// File generated from our OpenAPI spec

'use strict';

const StripeResource = require('../../StripeResource');
const stripeMethod = StripeResource.method;

module.exports = StripeResource.extend({
path: 'financial_connections/accounts',

retrieve: stripeMethod({
method: 'GET',
path: '/{account}',
}),

disconnect: stripeMethod({
method: 'POST',
path: '/{account}/disconnect',
}),

refresh: stripeMethod({
method: 'POST',
path: '/{account}/refresh',
}),
});
20 changes: 20 additions & 0 deletions lib/resources/FinancialConnections/Sessions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// File generated from our OpenAPI spec

'use strict';

const StripeResource = require('../../StripeResource');
const stripeMethod = StripeResource.method;

module.exports = StripeResource.extend({
path: 'financial_connections/sessions',

create: stripeMethod({
method: 'POST',
path: '',
}),

retrieve: stripeMethod({
method: 'GET',
path: '/{session}',
}),
});
42 changes: 42 additions & 0 deletions types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,13 +535,35 @@ declare module 'stripe' {
}

interface UsBankAccount {
financial_connections?: UsBankAccount.FinancialConnections;

/**
* Bank account verification method.
*/
verification_method?: UsBankAccount.VerificationMethod;
}

namespace UsBankAccount {
interface FinancialConnections {
/**
* The list of permissions to request. The `payment_method` permission must be included.
*/
permissions?: Array<FinancialConnections.Permission>;

/**
* For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
*/
return_url?: string;
}

namespace FinancialConnections {
type Permission =
| 'balances'
| 'ownership'
| 'payment_method'
| 'transactions';
}

type VerificationMethod = 'automatic' | 'instant';
}
}
Expand Down Expand Up @@ -1658,13 +1680,33 @@ declare module 'stripe' {
}

interface UsBankAccount {
/**
* Additional fields for Financial Connections Session creation
*/
financial_connections?: UsBankAccount.FinancialConnections;

/**
* Verification method for the intent
*/
verification_method?: UsBankAccount.VerificationMethod;
}

namespace UsBankAccount {
interface FinancialConnections {
/**
* The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `payment_method`, and `transactions`.
*/
permissions?: Array<FinancialConnections.Permission>;
}

namespace FinancialConnections {
type Permission =
| 'balances'
| 'ownership'
| 'payment_method'
| 'transactions';
}

type VerificationMethod = 'automatic' | 'instant';
}

Expand Down
Loading