synapse_fi 0.0.3 → 0.0.4
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/Gemfile +1 -0
- data/Gemfile.lock +15 -9
- data/README.md +12 -1
- data/Rakefile +1 -1
- data/lib/synapse_api/client.rb +66 -59
- data/lib/synapse_api/error.rb +0 -27
- data/lib/synapse_api/http_request.rb +12 -3
- data/lib/synapse_api/user.rb +130 -87
- data/lib/synapse_api/version.rb +1 -1
- data/lib/synapse_fi.rb +28 -0
- data/pkg/synapse_fi-0.0.3.gem +0 -0
- data/samples.md +260 -247
- metadata +4 -14
- data/.DS_Store +0 -0
- data/node_modules/.yarn-integrity +0 -16
- data/node_modules/dotenv/CHANGELOG.md +0 -117
- data/node_modules/dotenv/LICENSE +0 -23
- data/node_modules/dotenv/README.md +0 -295
- data/node_modules/dotenv/config.js +0 -11
- data/node_modules/dotenv/lib/cli-options.js +0 -13
- data/node_modules/dotenv/lib/env-options.js +0 -18
- data/node_modules/dotenv/lib/main.js +0 -103
- data/node_modules/dotenv/package.json +0 -45
- data/package.json +0 -5
- data/synapse_fi-0.0.2.gem +0 -0
data/samples.md
CHANGED
@@ -1,25 +1,75 @@
|
|
1
|
+
# Table of Contents
|
2
|
+
- [Client](#client)
|
3
|
+
* [Initialize Client](#initialize-client)
|
4
|
+
* [Create User](#create-user)
|
5
|
+
* [Get User](#get-user)
|
6
|
+
* [Get Subscription](#get-subscription)
|
7
|
+
* [Update Subscription](#update-subscription)
|
8
|
+
* [Get All Users](#get-all-users)
|
9
|
+
* [Get All Client Transactions](#get-all-client-transactions)
|
10
|
+
* [Get All Client Nodes](#get-all-client-nodes)
|
11
|
+
* [Get All Client Institutions](#get-all-client-institutions)
|
12
|
+
* [Issue Public Key](#issue-public-key)
|
13
|
+
- [User](#user)
|
14
|
+
* [Get New Oauth](#get-new-oauth)
|
15
|
+
* [Update User or Update/Add Documents](#update-user-or-update-add-documents)
|
16
|
+
* [Generate UBO](#generate-ubo)
|
17
|
+
* [Get All User Nodes](#get-all-user-nodes)
|
18
|
+
* [Get All User Transactions](#get-all-user-transactions)
|
19
|
+
+ [Nodes](#nodes)
|
20
|
+
* [Create Node](#create-node)
|
21
|
+
* [Get Node](#get-node)
|
22
|
+
* [Get All User Nodes](#get-all-user-nodes-1)
|
23
|
+
* [Update Node](#update-node)
|
24
|
+
* [Ship Debit](#ship-debit)
|
25
|
+
* [Reset Debit](#reset-debit)
|
26
|
+
* [Verify Micro Deposit](#verify-micro-deposit)
|
27
|
+
* [Reinitiate Micro Deposit](#reinitiate-micro-deposit)
|
28
|
+
* [Generate Apple Pay](#generate-apple-pay)
|
29
|
+
* [Delete Node](#delete-node)
|
30
|
+
* [Get All Node Subnets](#get-all-node-subnets)
|
31
|
+
* [Get All Node Transactions](#get-all-node-transactions)
|
32
|
+
+ [Subnets](#subnets)
|
33
|
+
* [Create Subnet](#create-subnet)
|
34
|
+
* [Get Subnet](#get-subnet)
|
35
|
+
+ [Transactions](#transactions)
|
36
|
+
* [Create Transaction](#create-transaction)
|
37
|
+
* [Get Transaction](#get-transaction)
|
38
|
+
* [Comment on Status](#comment-on-status)
|
39
|
+
* [Dispute Transaction](#dispute-transaction)
|
40
|
+
* [Cancel Delete Transaction](#cancel-delete-transaction)
|
41
|
+
|
1
42
|
# Client
|
2
43
|
|
3
|
-
|
44
|
+
##### Initialize Client
|
4
45
|
|
5
46
|
- Set up a .env file to fetch your client_id and client_secret
|
6
47
|
- Returns Client instance
|
7
|
-
- Set raise_for_202 as true if you want 2FA and MFA to be raised
|
8
48
|
|
9
49
|
```bash
|
10
50
|
args = {
|
51
|
+
# synapse client_id
|
11
52
|
client_id: ENV.fetch("client_id"),
|
53
|
+
# synapse client_secret
|
12
54
|
client_secret: ENV.fetch("client_secret"),
|
55
|
+
# a hashed value, either unique to user or static for app
|
13
56
|
fingerprint: "fp",
|
57
|
+
# end user's IP
|
14
58
|
ip_address: 'ip',
|
59
|
+
# (optional) requests go to sandbox endpoints if true
|
15
60
|
development_mode: true,
|
61
|
+
# (optional) if true logs requests to stdout
|
62
|
+
logging: true,
|
63
|
+
# (optional) file path to write logs to
|
64
|
+
log_to: nil,
|
65
|
+
# (optional) rases for 2FA and MFA if set to true
|
16
66
|
raise_for_202: true
|
17
67
|
}
|
18
68
|
|
19
69
|
client = Synapse::Client.new(args)
|
20
70
|
```
|
21
71
|
|
22
|
-
|
72
|
+
##### Create User
|
23
73
|
|
24
74
|
- Returns user instance
|
25
75
|
|
@@ -47,15 +97,7 @@ payload = {
|
|
47
97
|
user = client.create_user(payload: payload)
|
48
98
|
```
|
49
99
|
|
50
|
-
|
51
|
-
|
52
|
-
- Updates current headers for future request
|
53
|
-
|
54
|
-
```bash
|
55
|
-
headers = client.update_headers(fingerprint:nil, idemopotency_key:nil, ip_address:nil)
|
56
|
-
```
|
57
|
-
|
58
|
-
## Get USER
|
100
|
+
##### Get User
|
59
101
|
- returns USER instance
|
60
102
|
|
61
103
|
```bash
|
@@ -63,124 +105,113 @@ user_id = "1232"
|
|
63
105
|
user = client.get_user(user_id: user_id,full_dehydrate: true)
|
64
106
|
```
|
65
107
|
|
66
|
-
|
67
|
-
-
|
68
|
-
- Array of users on a platform
|
108
|
+
##### Create Subscription
|
109
|
+
- Returns subscription instace
|
69
110
|
|
70
111
|
```bash
|
71
|
-
|
112
|
+
scope = {
|
113
|
+
"scope": [
|
114
|
+
"USERS|POST",
|
115
|
+
"USER|PATCH",
|
116
|
+
"NODES|POST",
|
117
|
+
"NODE|PATCH",
|
118
|
+
"TRANS|POST",
|
119
|
+
"TRAN|PATCH"
|
120
|
+
],
|
121
|
+
"url": "https://requestb.in/zp216zzp"
|
122
|
+
}
|
123
|
+
subscription = client.create_subscriptions(scope: scope)
|
72
124
|
```
|
73
125
|
|
74
|
-
|
75
|
-
|
76
|
-
- returns Transactions instance
|
77
|
-
- array of Transaction instance
|
126
|
+
##### Get Subscription
|
127
|
+
- returns a subscription instance
|
78
128
|
|
79
129
|
```bash
|
80
|
-
|
130
|
+
subscription_id = "2342324"
|
131
|
+
subscription = client.get_subscription(subscriptions_id: subscription_id)
|
81
132
|
```
|
82
133
|
|
83
|
-
|
84
|
-
|
85
|
-
-
|
86
|
-
-
|
87
|
-
- Per Page (optional params)
|
134
|
+
#### Update Subscription
|
135
|
+
|
136
|
+
- Updates a subscription scope, active or url
|
137
|
+
- Returns a subscription instance
|
88
138
|
|
89
139
|
```bash
|
90
|
-
|
140
|
+
subscription_id = "2342324"
|
141
|
+
body = {
|
142
|
+
"is_active": true,
|
143
|
+
"scope": [
|
144
|
+
"USERS|POST",
|
145
|
+
"NODES|POST",
|
146
|
+
"TRANS|POST"
|
147
|
+
]
|
148
|
+
"url": 'https://requestb.in/zp216zzp'
|
149
|
+
}
|
150
|
+
subscription = client.update_subscriptions(subscription_id: subscription_id , body: body)
|
91
151
|
```
|
92
152
|
|
93
|
-
|
94
|
-
|
95
|
-
-
|
96
|
-
- Page (optional params)
|
97
|
-
- Per Page (optional params)
|
153
|
+
##### Get All Users
|
154
|
+
- returns USERS instance
|
155
|
+
- Array of users on a platform
|
98
156
|
|
99
157
|
```bash
|
100
|
-
|
158
|
+
# param page (optional) response will default to 1
|
159
|
+
# param per_page [Integer] (optional) response will default to 20
|
160
|
+
users = client.get_users(page: 5, per_page: 5)
|
101
161
|
```
|
102
162
|
|
103
|
-
|
104
|
-
|
105
|
-
-
|
163
|
+
#### Get All Client Transactions
|
164
|
+
|
165
|
+
- returns Transactions instance
|
166
|
+
- array of Transaction instance
|
106
167
|
|
107
168
|
```bash
|
108
|
-
|
109
|
-
url = "webhooks.com"
|
110
|
-
subscription = client.create_subscriptions(scope: scope, url: url )
|
169
|
+
trans = client.get_transaction(page: 5, per_page: 5)
|
111
170
|
```
|
112
171
|
|
113
|
-
|
114
|
-
-
|
172
|
+
#### Get All Client Nodes
|
173
|
+
- Returns Nodes instance
|
174
|
+
- Array of Node instance
|
115
175
|
- Page (optional params)
|
116
176
|
- Per Page (optional params)
|
117
177
|
|
118
178
|
```bash
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
## Get a subscription by id
|
123
|
-
- returns a subscription instance
|
124
|
-
|
125
|
-
```bash
|
126
|
-
subscription_id = "2342324"
|
127
|
-
subscription = client.get_subscription(subscriptions_id:)
|
179
|
+
# param page (optional) response will default to 1
|
180
|
+
# param per_page [Integer] (optional) response will default to 20
|
181
|
+
Nodes = client.get_all_nodes(page: 5, per_page: 5)
|
128
182
|
```
|
129
183
|
|
130
|
-
|
184
|
+
#### Get All Client Institutions
|
131
185
|
|
132
|
-
-
|
133
|
-
-
|
186
|
+
- Returns institutions available for bank logins
|
187
|
+
- Page (optional params)
|
188
|
+
- Per Page (optional params)
|
134
189
|
|
135
190
|
```bash
|
136
|
-
|
137
|
-
|
138
|
-
|
191
|
+
# param page (optional) response will default to 1
|
192
|
+
# param per_page [Integer] (optional) response will default to 20
|
193
|
+
institutions = client.get_all_institutions(page: 5, per_page: 5)
|
139
194
|
```
|
140
195
|
|
141
|
-
|
196
|
+
#### Issue Public Key
|
142
197
|
|
143
198
|
- Returns api response
|
144
199
|
|
145
200
|
```bash
|
146
|
-
scope =
|
201
|
+
scope = "USERS|GET,USER|GET,USER|PATCH"
|
147
202
|
public_key = client.issue_public_key(scope: scope)
|
148
203
|
```
|
149
|
-
## Locate ATM
|
150
|
-
- Returns all atms nearby
|
151
|
-
- Param zip
|
152
|
-
- Param radius
|
153
|
-
- Param lat
|
154
|
-
- Param lon
|
155
|
-
|
156
|
-
```bash
|
157
|
-
atms = client.locate_atm(** options)
|
158
|
-
```
|
159
|
-
|
160
|
-
## Get Crypto Quotes
|
161
|
-
|
162
|
-
- Returns Crypto Currencies Quotes
|
163
|
-
|
164
|
-
```bash
|
165
|
-
crypto_quotes = client.get_crypto_quotes()
|
166
|
-
```
|
167
|
-
|
168
|
-
## Get Market Data
|
169
204
|
|
170
|
-
|
171
|
-
- Param limit
|
172
|
-
- Param currency
|
205
|
+
# User
|
173
206
|
|
207
|
+
##### Get New Oauth
|
174
208
|
|
175
209
|
```bash
|
176
|
-
|
210
|
+
scope =["USERS|GET,USER|GET,USER|PATCH"]
|
211
|
+
user.authenticate(scope: scope)
|
177
212
|
```
|
178
213
|
|
179
|
-
|
180
|
-
|
181
|
-
## Update User Documents
|
182
|
-
|
183
|
-
- Updates user documents
|
214
|
+
##### Update User or Update/Add Documents
|
184
215
|
|
185
216
|
```bash
|
186
217
|
body = {
|
@@ -195,261 +226,243 @@ body = {
|
|
195
226
|
"remove_phone_number":"901.111.1111"
|
196
227
|
}
|
197
228
|
}
|
198
|
-
|
199
|
-
|
200
|
-
user = user.user_update(payload:)
|
201
|
-
```
|
202
|
-
|
203
|
-
## Get User Node
|
204
|
-
|
205
|
-
- Gets User node
|
206
|
-
- Param full_dehydrate or force_refresh
|
207
|
-
|
208
|
-
```bash
|
209
|
-
node_id = "5bd9e7b3389f2400adb012ae"
|
210
|
-
|
211
|
-
node = user.get_user_node(node_id: node_id, full_dehydrate: true, force_refresh: true)
|
212
|
-
```
|
213
|
-
|
214
|
-
## Get All User Nodes
|
215
|
-
|
216
|
-
- Options[page, per_page, type]
|
217
|
-
```bash
|
218
|
-
Nodes = user.get_all_nodes(**options)
|
219
|
-
```
|
220
|
-
|
221
|
-
## Authenticate a USER
|
222
|
-
|
223
|
-
- Authenticates users
|
224
|
-
- Params Scope [Array]
|
225
|
-
- Param Idempotency_key [String] (optional)
|
226
|
-
|
227
|
-
```bash
|
228
|
-
response = user.authenticate(** options)
|
229
|
+
user = user.user_update(payload:body)
|
229
230
|
```
|
230
231
|
|
231
|
-
|
232
|
+
##### Create UBO
|
232
233
|
|
233
|
-
-
|
234
|
-
- Param device
|
235
|
-
- Param Idempotency_key [String] (optional)
|
234
|
+
- Upload an Ultimate Beneficial Ownership or REG GG Form
|
236
235
|
|
237
236
|
```bash
|
238
|
-
|
237
|
+
body = {
|
238
|
+
"entity_info": {
|
239
|
+
"cryptocurrency": True,
|
240
|
+
"msb": {
|
241
|
+
"federal": True,
|
242
|
+
"states": ["AL"]
|
243
|
+
},
|
244
|
+
"public_company": False,
|
245
|
+
"majority_owned_by_listed": False,
|
246
|
+
"registered_SEC": False,
|
247
|
+
"regulated_financial": False,
|
248
|
+
"gambling": False,
|
249
|
+
"document_id": "2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8"
|
250
|
+
...
|
251
|
+
}
|
252
|
+
user.create_ubo(payload:body)
|
239
253
|
```
|
240
254
|
|
241
|
-
|
242
|
-
|
243
|
-
- Supply pin
|
244
|
-
- Param pin
|
245
|
-
- Param Idempotency_key [String] (optional)
|
255
|
+
#### Get All User Nodes
|
246
256
|
|
247
257
|
```bash
|
248
|
-
|
258
|
+
Nodes = user.get_all_nodes(page=1, per_page=5, type='ACH-US')
|
249
259
|
```
|
250
260
|
|
251
|
-
|
261
|
+
#### Get All User Transactions
|
252
262
|
|
253
263
|
- Returns transactons instance
|
254
|
-
- Options[page, per_page, type]
|
255
|
-
|
256
|
-
```bash
|
257
|
-
transactions = user.get_user_transactions(** options)
|
258
|
-
```
|
259
|
-
|
260
|
-
## Create Node
|
261
|
-
|
262
|
-
- Creates Node
|
263
|
-
- Param node payload
|
264
|
-
- Param Idempotency_key [String] (optional)
|
265
|
-
- Returns node or access token depending on node
|
266
264
|
|
267
265
|
```bash
|
268
|
-
|
266
|
+
# param page (optional) response will default to 1
|
267
|
+
# param per_page (optional) response will default to 20
|
268
|
+
transactions = user.get_user_transactions(page=1, per_page=5)
|
269
269
|
```
|
270
270
|
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
-
|
275
|
-
-
|
276
|
-
-
|
271
|
+
### Nodes
|
272
|
+
##### Create Node
|
273
|
+
Refer to the following docs for how to setup the payload for a specific Node type:
|
274
|
+
- [Deposit Accounts](https://docs.synapsefi.com/v3.1/docs/deposit-accounts)
|
275
|
+
- [Card Issuance](https://docs.synapsefi.com/v3.1/docs/card-issuance)
|
276
|
+
- [ACH-US with Logins](https://docs.synapsefi.com/v3.1/docs/add-ach-us-node)
|
277
|
+
- [ACH-US MFA](https://docs.synapsefi.com/v3.1/docs/add-ach-us-node-via-bank-logins-mfa)
|
278
|
+
- [ACH-US with AC/RT](https://docs.synapsefi.com/v3.1/docs/add-ach-us-node-via-acrt-s)
|
279
|
+
- [INTERCHANGE-US](https://docs.synapsefi.com/v3.1/docs/interchange-us)
|
280
|
+
- [CHECK-US](https://docs.synapsefi.com/v3.1/docs/check-us)
|
281
|
+
- [CRYPTO-US](https://docs.synapsefi.com/v3.1/docs/crypto-us)
|
282
|
+
- [WIRE-US](https://docs.synapsefi.com/v3.1/docs/add-wire-us-node)
|
283
|
+
- [WIRE-INT](https://docs.synapsefi.com/v3.1/docs/add-wire-int-node)
|
284
|
+
- [IOU](https://docs.synapsefi.com/v3.1/docs/add-iou-node)
|
277
285
|
|
278
286
|
```bash
|
279
|
-
|
287
|
+
body = {
|
288
|
+
"type": "DEPOSIT-US",
|
289
|
+
"info":{
|
290
|
+
"nickname":"My Checking"
|
291
|
+
}
|
292
|
+
}
|
293
|
+
node = user.create_node(payload:, idempotency_key='123456')
|
280
294
|
```
|
281
295
|
|
282
|
-
|
283
|
-
|
284
|
-
- Upload an Ultimate Beneficial Ownership or REG GG Form
|
296
|
+
##### Get Node
|
285
297
|
|
286
298
|
```bash
|
287
|
-
|
299
|
+
node_id = "5bd9e7b3389f2400adb012ae"
|
300
|
+
node = user.get_user_node(node_id: node_id, full_dehydrate: true, force_refresh: true)
|
288
301
|
```
|
289
302
|
|
290
|
-
|
291
|
-
|
292
|
-
- Gets user statements
|
293
|
-
- Options[page, per_page, type]
|
303
|
+
#### Get All User Nodes
|
294
304
|
|
295
305
|
```bash
|
296
|
-
|
306
|
+
Nodes = user.get_all_nodes(page=1, per_page=5, type='ACH-US')
|
297
307
|
```
|
298
308
|
|
299
|
-
|
309
|
+
#### Update Node
|
300
310
|
|
301
|
-
- Initate card shipment
|
302
311
|
- Param node_id
|
303
312
|
- Param payload
|
304
313
|
|
305
314
|
```bash
|
306
|
-
|
315
|
+
node_id = '5ba05ed620b3aa005882c52a'
|
316
|
+
body = {
|
317
|
+
"supp_id":"new_supp_id_1234"
|
318
|
+
}
|
319
|
+
node = user.generate(node_id:node_id, payload:body)
|
307
320
|
```
|
308
321
|
|
309
|
-
|
310
|
-
|
311
|
-
- Get new card number and cvv
|
312
|
-
- Param node_id
|
322
|
+
#### Ship Card
|
313
323
|
|
314
324
|
```bash
|
315
|
-
|
316
|
-
```
|
317
|
-
|
318
|
-
## Create Transaction
|
319
|
-
|
320
|
-
- Create a node transaction
|
321
|
-
- Param node_id
|
322
|
-
- Param payload
|
323
|
-
- Param Idempotency_key [String] (optional)
|
325
|
+
node_id = '5ba05ed620b3aa005882c52a'
|
324
326
|
|
325
|
-
|
326
|
-
|
327
|
+
body = {
|
328
|
+
"fee_node_id":"5ba05e7920b3aa006482c5ad",
|
329
|
+
"expedite":True
|
330
|
+
}
|
331
|
+
node = user.ship_card(node_id: node_id, payload: body)
|
327
332
|
```
|
328
333
|
|
329
|
-
|
330
|
-
|
331
|
-
- Param node_id
|
332
|
-
- Param trans_id
|
334
|
+
#### Reset Debit Cards
|
333
335
|
|
334
336
|
```bash
|
335
|
-
|
337
|
+
node_id = '5ba05ed620b3aa005882c52a'
|
338
|
+
node = user.reset_debit_card(node_id: node_id)
|
336
339
|
```
|
337
340
|
|
338
|
-
|
339
|
-
|
340
|
-
- Param node_id
|
341
|
-
- Options[page, per_page, type]
|
341
|
+
#### Verify Micro Deposit
|
342
342
|
|
343
343
|
```bash
|
344
|
-
|
344
|
+
node_id = '5ba05ed620b3aa005882c52a'
|
345
|
+
body = {
|
346
|
+
"micro":[0.1,0.1]
|
347
|
+
}
|
348
|
+
node = user.verify_micro_deposit(node_id: node_id, payload: body)
|
345
349
|
```
|
346
350
|
|
347
|
-
|
348
|
-
|
349
|
-
- Param node_id
|
350
|
-
- Param payload
|
351
|
+
#### Reinitiate Micro Deposit
|
351
352
|
|
352
353
|
```bash
|
353
|
-
|
354
|
+
node_id = '5ba05ed620b3aa005882c52a'
|
355
|
+
node = user.reinitiate_micro_deposit(node_id: node_id)
|
354
356
|
```
|
355
357
|
|
356
|
-
|
357
|
-
|
358
|
-
- Param node_id
|
358
|
+
##### Generate Apple Pay
|
359
359
|
|
360
360
|
```bash
|
361
|
-
|
361
|
+
node_id = '5ba05ed620b3aa005882c52a'
|
362
|
+
body = {
|
363
|
+
"certificate": "your applepay cert",
|
364
|
+
"nonce": "9c02xxx2",
|
365
|
+
"nonce_signature": "4082f883ae62d0700c283e225ee9d286713ef74"
|
366
|
+
}
|
367
|
+
response = user.generate_apple_pay_token(node_id: node_id, payload: body)
|
362
368
|
```
|
363
369
|
|
364
|
-
|
365
|
-
|
366
|
-
- Param node_id
|
367
|
-
- Param payload
|
370
|
+
#### Delete Node
|
368
371
|
|
369
372
|
```bash
|
370
|
-
|
373
|
+
node_id = '594e606212e17a002f2e3251'
|
374
|
+
response = user.delete_node(node_id: node_id)
|
371
375
|
```
|
372
376
|
|
373
|
-
|
374
|
-
|
375
|
-
- Param node_id
|
376
|
-
- Param payload
|
377
|
+
#### Get All Node Subnets
|
377
378
|
|
378
379
|
```bash
|
379
|
-
|
380
|
+
node_id = '594e606212e17a002f2e3251'
|
381
|
+
subnets = user.get_all_subnets(node_id:node_id, page=4, per_page=10)
|
380
382
|
```
|
381
383
|
|
382
|
-
|
383
|
-
|
384
|
-
- Param node_id
|
384
|
+
#### Get All Node Transactions
|
385
385
|
|
386
386
|
```bash
|
387
|
-
|
387
|
+
node_id = '594e606212e17a002f2e3251'
|
388
|
+
nodes = user.get_all_node_transaction(node_id: node_id, page=4, per_page=10)
|
388
389
|
```
|
389
390
|
|
390
|
-
## Dummy Transactions
|
391
391
|
|
392
|
-
|
393
|
-
- Param node_id [String]
|
394
|
-
- Param is_credit [Boolean]
|
392
|
+
### Subnets
|
395
393
|
|
396
|
-
|
397
|
-
|
394
|
+
##### Create Subnet
|
395
|
+
```python
|
396
|
+
node_id = '594e606212e17a002f2e3251'
|
397
|
+
body = {
|
398
|
+
"nickname":"Test AC/RT"
|
399
|
+
}
|
400
|
+
user.create_subnet(node_id: node_id, payload: body)
|
398
401
|
```
|
399
402
|
|
400
|
-
|
401
|
-
## Comment on status
|
402
|
-
|
403
|
-
- Param node_id
|
404
|
-
- Param trans_id
|
405
|
-
- Param payload
|
406
|
-
|
403
|
+
#### Get Subnet
|
407
404
|
```bash
|
408
|
-
|
405
|
+
node_id = '594e606212e17a002f2e3251'
|
406
|
+
subn_id = '59c9f77cd412960028b99d2b'
|
407
|
+
subnet = user.get_subnet(node_id:, subnet_id:)
|
409
408
|
```
|
410
409
|
|
411
|
-
|
412
|
-
|
413
|
-
- Param node_id
|
414
|
-
- Param trans_id
|
410
|
+
### Transactions
|
415
411
|
|
412
|
+
#### Create Transaction
|
416
413
|
```bash
|
417
|
-
|
414
|
+
node_id = '594e606212e17a002f2e3251'
|
415
|
+
body = {
|
416
|
+
"to": {
|
417
|
+
"type": "ACH-US",
|
418
|
+
"id": "594e6e6c12e17a002f2e39e4"
|
419
|
+
},
|
420
|
+
"amount": {
|
421
|
+
"amount": 20.1,
|
422
|
+
"currency": "USD"
|
423
|
+
},
|
424
|
+
"extra": {
|
425
|
+
"ip": "192.168.0.1"
|
426
|
+
}
|
427
|
+
}
|
428
|
+
transaction = user.create_transaction(node_id: node_id, payload: body, idempotency_key:"2435")
|
418
429
|
```
|
419
430
|
|
420
|
-
|
431
|
+
#### Get Transaction
|
421
432
|
|
422
433
|
- Param node_id
|
423
434
|
- Param trans_id
|
424
435
|
|
425
436
|
```bash
|
426
|
-
|
437
|
+
node_id = '594e606212e17a002f2e3251'
|
438
|
+
trans_id = '594e72124599e8002fe62e4f'
|
439
|
+
transaction = user.get_node_transaction(node_id: node_id, trans_id: trans_id)
|
427
440
|
```
|
428
441
|
|
429
|
-
|
430
|
-
|
431
|
-
- Param node_id
|
432
|
-
- Options[page, per_page, type]
|
442
|
+
#### Comment on status
|
433
443
|
|
434
444
|
```bash
|
435
|
-
|
445
|
+
node_id = '594e606212e17a002f2e3251'
|
446
|
+
trans_id = '594e72124599e8002fe62e4f'
|
447
|
+
body = 'Pending verification...'
|
448
|
+
transaction = user.comment_transaction(node_id: node_id, trans_id: trans_id, payload: body)
|
436
449
|
```
|
437
450
|
|
438
|
-
|
439
|
-
|
440
|
-
- Param node_id
|
441
|
-
- Param subnet_id
|
451
|
+
#### Dispute Transaction
|
442
452
|
|
443
453
|
```bash
|
444
|
-
|
454
|
+
node_id = '594e606212e17a002f2e3251'
|
455
|
+
trans_id = '594e72124599e8002fe62e4f'
|
456
|
+
dispute_reason = {
|
457
|
+
"dispute_reason":"CHARGE_BACK"
|
458
|
+
}
|
459
|
+
response = user.dispute_user_transactions(node_id:, trans_id:)
|
445
460
|
```
|
446
|
-
## Get Node Statements
|
447
461
|
|
448
|
-
|
449
|
-
- Options[page, per_page, type]
|
462
|
+
#### Cancel Delete Transaction
|
450
463
|
|
451
464
|
```bash
|
452
|
-
|
465
|
+
node_id = '594e606212e17a002f2e3251'
|
466
|
+
trans_id = '594e72124599e8002fe62e4f'
|
467
|
+
response = user.cancel_transaction(node_id: node_id, trans_id: trans_id)
|
453
468
|
```
|
454
|
-
|
455
|
-
|