Skip to content

Commit 1a1e0d8

Browse files
Chore: Subaccounts clean up
1 parent 493b1f3 commit 1a1e0d8

8 files changed

Lines changed: 29 additions & 75 deletions

File tree

api/subaccounts/create/index.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
url="https://api.paystack.co/subaccount"
33
authorization="Authorization: Bearer YOUR_SECRET_KEY"
44
content_type="Content-Type: application/json"
5-
data='{ "business_name": "Sunshine Studios", "settlement_bank": "044", "account_number": "0193274682", "percentage_charge": 18.2 }'
6-
7-
curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X POST
8-
9-
10-
11-
12-
5+
data='{
6+
"business_name": "Sunshine Studios",
7+
"settlement_bank": "044",
8+
"account_number": "0193274682",
9+
"percentage_charge": 18.2
10+
}'
11+
12+
curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X POST

api/subaccounts/fetch/index.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,4 @@
22
url="https://api.paystack.co/subaccount/:id_or_code"
33
authorization="Authorization: Bearer YOUR_SECRET_KEY"
44

5-
curl "$url" -H "$authorization" -X GET
6-
7-
8-
9-
10-
11-
12-
5+
curl "$url" -H "$authorization" -X GET

api/subaccounts/list/index.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,4 @@
22
url="https://api.paystack.co/subaccount"
33
authorization="Authorization: Bearer YOUR_SECRET_KEY"
44

5-
curl "$url" -H "$authorization" -X GET
6-
7-
8-
9-
10-
11-
12-
13-
5+
curl "$url" -H "$authorization" -X GET

api/subaccounts/update/index.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22
url="https://api.paystack.co/subaccount/:id_or_code"
33
authorization="Authorization: Bearer YOUR_SECRET_KEY"
44
content_type="Content-Type: application/json"
5-
data='{ "primary_contact_email": "dafe@aba.com", "percentage_charge": 18.9 }'
6-
7-
curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X PUT
8-
9-
10-
11-
12-
13-
14-
15-
5+
data='{
6+
"primary_contact_email": "dafe@aba.com",
7+
"percentage_charge": 18.9
8+
}'
169

10+
curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X PUT

dist/api/subaccounts/create/requests.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ const sh = `#!/bin/sh
22
url="https://api.paystack.co/subaccount"
33
authorization="Authorization: Bearer YOUR_SECRET_KEY"
44
content_type="Content-Type: application/json"
5-
data='{ "business_name": "Sunshine Studios", "settlement_bank": "044", "account_number": "0193274682", "percentage_charge": 18.2 }'
6-
7-
curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X POST
8-
9-
10-
11-
5+
data='{
6+
"business_name": "Sunshine Studios",
7+
"settlement_bank": "044",
8+
"account_number": "0193274682",
9+
"percentage_charge": 18.2
10+
}'
1211
13-
`
12+
curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X POST`
1413

1514
const js = `const https = require('https')
1615

dist/api/subaccounts/fetch/requests.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,7 @@ const sh = `#!/bin/sh
22
url="https://api.paystack.co/subaccount/:id_or_code"
33
authorization="Authorization: Bearer YOUR_SECRET_KEY"
44
5-
curl "$url" -H "$authorization" -X GET
6-
7-
8-
9-
10-
11-
12-
13-
`
5+
curl "$url" -H "$authorization" -X GET`
146

157
const js = `const https = require('https')
168

dist/api/subaccounts/list/requests.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,7 @@ const sh = `#!/bin/sh
22
url="https://api.paystack.co/subaccount"
33
authorization="Authorization: Bearer YOUR_SECRET_KEY"
44
5-
curl "$url" -H "$authorization" -X GET
6-
7-
8-
9-
10-
11-
12-
13-
14-
`
5+
curl "$url" -H "$authorization" -X GET`
156

167
const js = `const https = require('https')
178

dist/api/subaccounts/update/requests.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,12 @@ const sh = `#!/bin/sh
22
url="https://api.paystack.co/subaccount/:id_or_code"
33
authorization="Authorization: Bearer YOUR_SECRET_KEY"
44
content_type="Content-Type: application/json"
5-
data='{ "primary_contact_email": "dafe@aba.com", "percentage_charge": 18.9 }'
5+
data='{
6+
"primary_contact_email": "dafe@aba.com",
7+
"percentage_charge": 18.9
8+
}'
69
7-
curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X PUT
8-
9-
10-
11-
12-
13-
14-
15-
16-
17-
`
10+
curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X PUT`
1811

1912
const js = `const https = require('https')
2013

0 commit comments

Comments
 (0)