summaryrefslogtreecommitdiff
path: root/jb-ui/src/api_fsb/docs/WalletApi.md
blob: 80bd3edd69e076d1ca0947a07fa08bfc5d74d875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
# WalletApi

All URIs are relative to *https://fsb.generalresearch.com*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createCashoutMethodProductIdCashoutMethodsPost**](#createcashoutmethodproductidcashoutmethodspost) | **POST** /{product_id}/cashout_methods/ | Create Cashout Method|
|[**deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete**](#deletecashoutmethodproductidcashoutmethodscashoutmethodiddelete) | **DELETE** /{product_id}/cashout_methods/{cashout_method_id}/ | Delete Cashout Method|
|[**getCashoutDetailProductIdCashoutCashoutIdGet**](#getcashoutdetailproductidcashoutcashoutidget) | **GET** /{product_id}/cashout/{cashout_id}/ | Get Cashout Detail|
|[**getCashoutMethodsProductIdCashoutMethodsGet**](#getcashoutmethodsproductidcashoutmethodsget) | **GET** /{product_id}/cashout_methods/ | Get Cashout Methods|
|[**getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet**](#getexpectedredemptionvalueproductidcashoutmethodcashoutmethodidvalueget) | **GET** /{product_id}/cashout_method/{cashout_method_id}/value/ | Get Expected Redemption Value|
|[**getUserTransactionHistoryProductIdTransactionHistoryGet**](#getusertransactionhistoryproductidtransactionhistoryget) | **GET** /{product_id}/transaction_history/ | Get User Transaction History|
|[**getUserWalletBalanceProductIdWalletGet**](#getuserwalletbalanceproductidwalletget) | **GET** /{product_id}/wallet/ | Get User Wallet Balance|
|[**submitUserCashoutProductIdCashoutPost**](#submitusercashoutproductidcashoutpost) | **POST** /{product_id}/cashout/ | Submit User Cashout|

# **createCashoutMethodProductIdCashoutMethodsPost**
> CashoutMethodResponse createCashoutMethodProductIdCashoutMethodsPost(body)

A user can only have 1 unique Cashout Method of any type at a time (eg. they can\'t create multiple paypal payout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different Cashout Methods will require type-dependent request data attributes in order to be successfully created.  Currently only creating paypal or Cash in Mail cashout methods are supported

### Example

```typescript
import {
    WalletApi,
    Configuration,
    Body
} from './api';

const configuration = new Configuration();
const apiInstance = new WalletApi(configuration);

let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined)
let body: Body; //

const { status, data } = await apiInstance.createCashoutMethodProductIdCashoutMethodsPost(
    productId,
    body
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **body** | **Body**|  | |
| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined|


### Return type

**CashoutMethodResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful Response |  -  |
|**422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete**
> StatusResponse deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete()

Delete a cashout method

### Example

```typescript
import {
    WalletApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WalletApi(configuration);

let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined)
let cashoutMethodId: string; //The ID of the cashout method to delete (default to undefined)
let bpuid: string; //A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. (default to undefined)

const { status, data } = await apiInstance.deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete(
    productId,
    cashoutMethodId,
    bpuid
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined|
| **cashoutMethodId** | [**string**] | The ID of the cashout method to delete | defaults to undefined|
| **bpuid** | [**string**] | A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. | defaults to undefined|


### Return type

**StatusResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful Response |  -  |
|**422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getCashoutDetailProductIdCashoutCashoutIdGet**
> CashoutRequestResponse getCashoutDetailProductIdCashoutCashoutIdGet()

Retrieve the details for a specific Cashout event

### Example

```typescript
import {
    WalletApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WalletApi(configuration);

let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined)
let cashoutId: string; //The cashout event ID (default to undefined)

const { status, data } = await apiInstance.getCashoutDetailProductIdCashoutCashoutIdGet(
    productId,
    cashoutId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined|
| **cashoutId** | [**string**] | The cashout event ID | defaults to undefined|


### Return type

**CashoutRequestResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful Response |  -  |
|**422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getCashoutMethodsProductIdCashoutMethodsGet**
> CashoutMethodsResponse getCashoutMethodsProductIdCashoutMethodsGet()

Retrieve the current available mechanisms that a user can use to retrieve funds.

### Example

```typescript
import {
    WalletApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WalletApi(configuration);

let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined)
let bpuid: string; //A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. (default to undefined)

const { status, data } = await apiInstance.getCashoutMethodsProductIdCashoutMethodsGet(
    productId,
    bpuid
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined|
| **bpuid** | [**string**] | A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. | defaults to undefined|


### Return type

**CashoutMethodsResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful Response |  -  |
|**422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet**
> CashoutMethodForeignValueResponse getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet()

Use this function to get the \"value\" (in local currency, e.g. CAD, BTC) for this   cashout_method, for amount (in USD cents).

### Example

```typescript
import {
    WalletApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WalletApi(configuration);

let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined)
let cashoutMethodId: string; //The ID of the cashout method (default to undefined)
let amount: number; //(USD cents) The amount to convert (default to undefined)

const { status, data } = await apiInstance.getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet(
    productId,
    cashoutMethodId,
    amount
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined|
| **cashoutMethodId** | [**string**] | The ID of the cashout method | defaults to undefined|
| **amount** | [**number**] | (USD cents) The amount to convert | defaults to undefined|


### Return type

**CashoutMethodForeignValueResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful Response |  -  |
|**422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getUserTransactionHistoryProductIdTransactionHistoryGet**
> UserLedgerTransactionsResponse getUserTransactionHistoryProductIdTransactionHistoryGet()

Return array of user events that altered their wallet balance

### Example

```typescript
import {
    WalletApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WalletApi(configuration);

let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined)
let bpuid: string; //A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. (default to undefined)
let createdAfter: string; //Filter transactions created after this timestamp (optional) (default to undefined)
let createdBefore: string; //Filter transactions created before this timestamp (optional) (default to undefined)
let orderBy: string; //Comma-separated fields to order by (optional) (default to 'created')
let page: number; // (optional) (default to 1)
let size: number; // (optional) (default to 50)

const { status, data } = await apiInstance.getUserTransactionHistoryProductIdTransactionHistoryGet(
    productId,
    bpuid,
    createdAfter,
    createdBefore,
    orderBy,
    page,
    size
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined|
| **bpuid** | [**string**] | A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. | defaults to undefined|
| **createdAfter** | [**string**] | Filter transactions created after this timestamp | (optional) defaults to undefined|
| **createdBefore** | [**string**] | Filter transactions created before this timestamp | (optional) defaults to undefined|
| **orderBy** | [**string**] | Comma-separated fields to order by | (optional) defaults to 'created'|
| **page** | [**number**] |  | (optional) defaults to 1|
| **size** | [**number**] |  | (optional) defaults to 50|


### Return type

**UserLedgerTransactionsResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful Response |  -  |
|**422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getUserWalletBalanceProductIdWalletGet**
> UserWalletBalanceResponse getUserWalletBalanceProductIdWalletGet()

Retrieve the current balance of a respondent\'s wallet balance for display

### Example

```typescript
import {
    WalletApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WalletApi(configuration);

let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined)
let bpuid: string; //A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. (default to undefined)

const { status, data } = await apiInstance.getUserWalletBalanceProductIdWalletGet(
    productId,
    bpuid
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined|
| **bpuid** | [**string**] | A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. | defaults to undefined|


### Return type

**UserWalletBalanceResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful Response |  -  |
|**422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **submitUserCashoutProductIdCashoutPost**
> CashoutRequestResponse submitUserCashoutProductIdCashoutPost(createCashoutRequest)

Request a cashout taken from a user\'s available wallet balance, to be paid via a particular cashout method.

### Example

```typescript
import {
    WalletApi,
    Configuration,
    CreateCashoutRequest
} from './api';

const configuration = new Configuration();
const apiInstance = new WalletApi(configuration);

let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined)
let createCashoutRequest: CreateCashoutRequest; //

const { status, data } = await apiInstance.submitUserCashoutProductIdCashoutPost(
    productId,
    createCashoutRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **createCashoutRequest** | **CreateCashoutRequest**|  | |
| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined|


### Return type

**CashoutRequestResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful Response |  -  |
|**422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)