|
1 | 1 | [Payment Rails JavaScript SDK](../README.md) > [BalancesGateway](../classes/balancesgateway.md) |
2 | 2 |
|
| 3 | +# Class: BalancesGateway |
3 | 4 |
|
| 5 | +## Hierarchy |
4 | 6 |
|
5 | | -# Class: BalancesGateway |
| 7 | +**BalancesGateway** |
6 | 8 |
|
7 | 9 | ## Index |
8 | 10 |
|
| 11 | +### Constructors |
| 12 | + |
| 13 | +* [constructor](balancesgateway.md#constructor) |
| 14 | + |
| 15 | +### Properties |
| 16 | + |
| 17 | +* [config](balancesgateway.md#config) |
| 18 | +* [gateway](balancesgateway.md#gateway) |
| 19 | + |
9 | 20 | ### Methods |
10 | 21 |
|
11 | 22 | * [all](balancesgateway.md#all) |
12 | 23 | * [find](balancesgateway.md#find) |
13 | 24 |
|
| 25 | +--- |
14 | 26 |
|
| 27 | +## Constructors |
15 | 28 |
|
16 | | ---- |
| 29 | +<a id="constructor"></a> |
17 | 30 |
|
| 31 | +### `<Private>` constructor |
18 | 32 |
|
19 | | -## Methods |
20 | | -<a id="all"></a> |
| 33 | +⊕ **new BalancesGateway**(gateway: *[Gateway](gateway.md)*): [BalancesGateway](balancesgateway.md) |
21 | 34 |
|
22 | | -### all |
| 35 | +*Defined in [BalancesGateway.ts:15](https://github.com/PaymentRails/javascript-sdk/blob/c3121c6/lib/BalancesGateway.ts#L15)* |
23 | 36 |
|
24 | | -► **all**(): `Promise`.<`Balance`[]> |
| 37 | +**Parameters:** |
25 | 38 |
|
| 39 | +| Param | Type | Description | |
| 40 | +| ------ | ------ | ------ | |
| 41 | +| gateway | [Gateway](gateway.md) | gateway object | |
26 | 42 |
|
| 43 | +**Returns:** [BalancesGateway](balancesgateway.md) |
27 | 44 |
|
28 | | -*Defined in [BalancesGateway.ts:32](https://github.com/PaymentRails/javascript-sdk/blob/0e7d5e5/lib/BalancesGateway.ts#L32)* |
| 45 | +___ |
29 | 46 |
|
| 47 | +## Properties |
30 | 48 |
|
| 49 | +<a id="config"></a> |
31 | 50 |
|
32 | | -Fetch the account balance for all enabled bank accounts |
| 51 | +### `<Private>` config |
33 | 52 |
|
34 | | - const balances = await client.balances.all(); |
| 53 | +**● config**: *[Configuration](configuration.md)* |
35 | 54 |
|
| 55 | +*Defined in [BalancesGateway.ts:15](https://github.com/PaymentRails/javascript-sdk/blob/c3121c6/lib/BalancesGateway.ts#L15)* |
36 | 56 |
|
| 57 | +___ |
| 58 | +<a id="gateway"></a> |
37 | 59 |
|
| 60 | +### `<Private>` gateway |
38 | 61 |
|
39 | | -**Returns:** `Promise`.<`Balance`[]> |
| 62 | +**● gateway**: *[Gateway](gateway.md)* |
40 | 63 |
|
| 64 | +*Defined in [BalancesGateway.ts:11](https://github.com/PaymentRails/javascript-sdk/blob/c3121c6/lib/BalancesGateway.ts#L11)* |
41 | 65 |
|
| 66 | +___ |
42 | 67 |
|
| 68 | +## Methods |
43 | 69 |
|
| 70 | +<a id="all"></a> |
44 | 71 |
|
45 | | -___ |
| 72 | +### all |
46 | 73 |
|
47 | | -<a id="find"></a> |
| 74 | +▸ **all**(): `Promise`<`Balance`[]> |
48 | 75 |
|
49 | | -### find |
| 76 | +*Defined in [BalancesGateway.ts:32](https://github.com/PaymentRails/javascript-sdk/blob/c3121c6/lib/BalancesGateway.ts#L32)* |
| 77 | + |
| 78 | +Fetch the account balance for all enabled bank accounts |
50 | 79 |
|
51 | | -► **find**(kind: *"paypal"⎮"paymentrails"*): `Promise`.<`Balance`[]> |
| 80 | + const balances = await client.balances.all(); |
52 | 81 |
|
| 82 | +**Returns:** `Promise`<`Balance`[]> |
53 | 83 |
|
| 84 | +___ |
| 85 | +<a id="find"></a> |
54 | 86 |
|
55 | | -*Defined in [BalancesGateway.ts:49](https://github.com/PaymentRails/javascript-sdk/blob/0e7d5e5/lib/BalancesGateway.ts#L49)* |
| 87 | +### find |
56 | 88 |
|
| 89 | +▸ **find**(kind: *"paypal" |"paymentrails"*): `Promise`<`Balance`[]> |
57 | 90 |
|
| 91 | +*Defined in [BalancesGateway.ts:49](https://github.com/PaymentRails/javascript-sdk/blob/c3121c6/lib/BalancesGateway.ts#L49)* |
58 | 92 |
|
59 | 93 | Fetch the account balance for the given account type |
60 | 94 |
|
61 | 95 | const balances = await client.balances.find("paymentrails"); |
62 | 96 |
|
63 | | - |
64 | 97 | **Parameters:** |
65 | 98 |
|
66 | 99 | | Param | Type | Description | |
67 | 100 | | ------ | ------ | ------ | |
68 | | -| kind | "paypal"⎮"paymentrails" | The account type to get the balances for | |
69 | | - |
70 | | - |
71 | | - |
72 | | - |
73 | | - |
74 | | -**Returns:** `Promise`.<`Balance`[]> |
75 | | - |
76 | | - |
77 | | - |
| 101 | +| kind | "paypal" | |
| 102 | +"paymentrails" |
| 103 | + | The account type to get the balances for | |
78 | 104 |
|
| 105 | +**Returns:** `Promise`<`Balance`[]> |
79 | 106 |
|
80 | 107 | ___ |
81 | 108 |
|
82 | | - |
|
0 commit comments