@riocrypto/common-server 1.0.879 → 1.0.880

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -106,6 +106,19 @@ declare class BridgeClient {
106
106
  link_token_expires_at: string;
107
107
  callback_url: string;
108
108
  }>;
109
+ createExternalAccount(bridgeCustomerId: string, bankName: string, accountName: string, accountNumber: string, routingNumber: string, accountOwnerName: string, address: {
110
+ streetLine1: string;
111
+ streetLine2?: string;
112
+ city: string;
113
+ state: string;
114
+ postalCode: string;
115
+ country: string;
116
+ }): Promise<{
117
+ id: string;
118
+ bank_name: string;
119
+ account_name: string;
120
+ last_4: string;
121
+ }>;
109
122
  }
110
123
  export declare const buildBridgeClient: () => Promise<BridgeClient>;
111
124
  export {};
@@ -90,6 +90,25 @@ class BridgeClient {
90
90
  return data;
91
91
  });
92
92
  }
93
+ createExternalAccount(bridgeCustomerId, bankName, accountName, accountNumber, routingNumber, accountOwnerName, address) {
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ const { data } = yield axios_1.default.post(`${this.baseUrl}/v0/customers/${bridgeCustomerId}/external_accounts`, {
96
+ type: "wire",
97
+ bank_name: bankName,
98
+ account_name: accountName,
99
+ account_number: accountNumber,
100
+ routing_number: routingNumber,
101
+ account_owner_name: accountOwnerName,
102
+ address,
103
+ }, {
104
+ headers: {
105
+ "Api-Key": this.apiKey,
106
+ "Idempotency-Key": (0, uuid_1.v4)(),
107
+ },
108
+ });
109
+ return data;
110
+ });
111
+ }
93
112
  }
94
113
  const buildBridgeClient = () => __awaiter(void 0, void 0, void 0, function* () {
95
114
  // Retrieve secrets asynchronously
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.879",
3
+ "version": "1.0.880",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",