Skip to content

Commit

Permalink
API Updates (#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcr-stripe authored May 5, 2022
1 parent babff9b commit 1d4344a
Show file tree
Hide file tree
Showing 14 changed files with 1,019 additions and 0 deletions.
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
52 changes: 52 additions & 0 deletions types/2020-08-27/FinancialConnections/AccountOwners.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// File generated from our OpenAPI spec

declare module 'stripe' {
namespace Stripe {
namespace FinancialConnections {
/**
* The AccountOwner object.
*/
interface AccountOwner {
/**
* Unique identifier for the object.
*/
id: string;

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

/**
* The email address of the owner.
*/
email: string | null;

/**
* The full name of the owner.
*/
name: string;

/**
* The ownership object that this owner belongs to.
*/
ownership: string;

/**
* The raw phone number of the owner.
*/
phone: string | null;

/**
* The raw physical address of the owner.
*/
raw_address: string | null;

/**
* The timestamp of the refresh that updated this owner.
*/
refreshed_at: number | null;
}
}
}
}
32 changes: 32 additions & 0 deletions types/2020-08-27/FinancialConnections/AccountOwnerships.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// File generated from our OpenAPI spec

declare module 'stripe' {
namespace Stripe {
namespace FinancialConnections {
/**
* The AccountOwnership object.
*/
interface AccountOwnership {
/**
* Unique identifier for the object.
*/
id: string;

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

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

/**
* A paginated list of owners for this account.
*/
owners: ApiList<Stripe.FinancialConnections.AccountOwner>;
}
}
}
}
Loading

0 comments on commit 1d4344a

Please sign in to comment.