paystack-ruby 1.0.0
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 +7 -0
- data/.standard.yml +3 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/LICENSE.txt +21 -0
- data/README.md +153 -0
- data/Rakefile +8 -0
- data/docs/apple_pay.md +60 -0
- data/docs/balance.md +39 -0
- data/docs/bank.md +77 -0
- data/docs/bulk_charge.md +110 -0
- data/docs/charge.md +124 -0
- data/docs/customer.md +253 -0
- data/docs/dedicated_virtual_account.md +171 -0
- data/docs/direct_debit.md +44 -0
- data/docs/dispute.md +175 -0
- data/docs/integration.md +36 -0
- data/docs/miscellaneous.md +52 -0
- data/docs/order.md +101 -0
- data/docs/page.md +138 -0
- data/docs/payment_request.md +182 -0
- data/docs/plan.md +99 -0
- data/docs/product.md +114 -0
- data/docs/refund.md +87 -0
- data/docs/settlement.md +43 -0
- data/docs/split.md +140 -0
- data/docs/storefront.md +205 -0
- data/docs/subaccount.md +99 -0
- data/docs/subscription.md +132 -0
- data/docs/terminal.md +156 -0
- data/docs/transaction.md +206 -0
- data/docs/transfer.md +183 -0
- data/docs/transfer_recipient.md +124 -0
- data/docs/virtual_terminal.md +188 -0
- data/lib/paystack/base_resource.rb +13 -0
- data/lib/paystack/client.rb +146 -0
- data/lib/paystack/errors.rb +20 -0
- data/lib/paystack/resources/apple_pay.rb +31 -0
- data/lib/paystack/resources/balance.rb +24 -0
- data/lib/paystack/resources/bank.rb +31 -0
- data/lib/paystack/resources/bulk_charge.rb +52 -0
- data/lib/paystack/resources/charge.rb +59 -0
- data/lib/paystack/resources/customer.rb +94 -0
- data/lib/paystack/resources/dedicated_virtual_account.rb +73 -0
- data/lib/paystack/resources/direct_debit.rb +24 -0
- data/lib/paystack/resources/dispute.rb +66 -0
- data/lib/paystack/resources/integration.rb +24 -0
- data/lib/paystack/resources/miscellaneous.rb +31 -0
- data/lib/paystack/resources/order.rb +45 -0
- data/lib/paystack/resources/page.rb +52 -0
- data/lib/paystack/resources/payment_request.rb +73 -0
- data/lib/paystack/resources/plan.rb +38 -0
- data/lib/paystack/resources/product.rb +45 -0
- data/lib/paystack/resources/refund.rb +38 -0
- data/lib/paystack/resources/settlement.rb +24 -0
- data/lib/paystack/resources/split.rb +52 -0
- data/lib/paystack/resources/storefront.rb +87 -0
- data/lib/paystack/resources/subaccount.rb +38 -0
- data/lib/paystack/resources/subscription.rb +59 -0
- data/lib/paystack/resources/terminal.rb +66 -0
- data/lib/paystack/resources/transaction.rb +75 -0
- data/lib/paystack/resources/transfer.rb +87 -0
- data/lib/paystack/resources/transfer_recipient.rb +52 -0
- data/lib/paystack/resources/virtual_terminal.rb +73 -0
- data/lib/paystack/response.rb +40 -0
- data/lib/paystack/transport.rb +64 -0
- data/lib/paystack/version.rb +6 -0
- data/lib/paystack.rb +40 -0
- data/sig/paystack/ruby.rbs +6 -0
- metadata +110 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class Product < BaseResource
|
|
7
|
+
|
|
8
|
+
# Create Product
|
|
9
|
+
# POST /product
|
|
10
|
+
def create(body = {})
|
|
11
|
+
@transport.post("/product", body: body)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Delete Product
|
|
16
|
+
# DELETE /product/{id}
|
|
17
|
+
def delete(id)
|
|
18
|
+
@transport.delete("/product/#{id}")
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Fetch Product
|
|
23
|
+
# GET /product/{id}
|
|
24
|
+
def fetch(id)
|
|
25
|
+
@transport.get("/product/#{id}")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# List Products
|
|
30
|
+
# GET /product
|
|
31
|
+
def list(query = {})
|
|
32
|
+
@transport.get("/product", query: query)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# Update product
|
|
37
|
+
# PUT /product/{id}
|
|
38
|
+
def update(id, body = {})
|
|
39
|
+
@transport.put("/product/#{id}", body: body)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class Refund < BaseResource
|
|
7
|
+
|
|
8
|
+
# Create Refund
|
|
9
|
+
# POST /refund
|
|
10
|
+
def create(body = {})
|
|
11
|
+
@transport.post("/refund", body: body)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Fetch Refund
|
|
16
|
+
# GET /refund/{id}
|
|
17
|
+
def fetch(id)
|
|
18
|
+
@transport.get("/refund/#{id}")
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# List Refunds
|
|
23
|
+
# GET /refund
|
|
24
|
+
def list(query = {})
|
|
25
|
+
@transport.get("/refund", query: query)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Retry Refund
|
|
30
|
+
# POST /refund/retry_with_customer_details/{id}
|
|
31
|
+
def retry_(id, body = {})
|
|
32
|
+
@transport.post("/refund/retry_with_customer_details/#{id}", body: body)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class Settlement < BaseResource
|
|
7
|
+
|
|
8
|
+
# List Settlements
|
|
9
|
+
# GET /settlement
|
|
10
|
+
def settlements_fetch(query = {})
|
|
11
|
+
@transport.get("/settlement", query: query)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Fetch Settlement Transactions
|
|
16
|
+
# GET /settlement/{id}/transactions
|
|
17
|
+
def settlements_transaction(id)
|
|
18
|
+
@transport.get("/settlement/#{id}/transactions")
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class Split < BaseResource
|
|
7
|
+
|
|
8
|
+
# Add Subaccount to Split
|
|
9
|
+
# POST /split/{id}/subaccount/add
|
|
10
|
+
def add_subaccount(id, body = {})
|
|
11
|
+
@transport.post("/split/#{id}/subaccount/add", body: body)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Create Split
|
|
16
|
+
# POST /split
|
|
17
|
+
def create(body = {})
|
|
18
|
+
@transport.post("/split", body: body)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Fetch Split
|
|
23
|
+
# GET /split/{id}
|
|
24
|
+
def fetch(id)
|
|
25
|
+
@transport.get("/split/#{id}")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# List Splits
|
|
30
|
+
# GET /split
|
|
31
|
+
def list(query = {})
|
|
32
|
+
@transport.get("/split", query: query)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# Remove Subaccount from split
|
|
37
|
+
# POST /split/{id}/subaccount/remove
|
|
38
|
+
def remove_subaccount(id, body = {})
|
|
39
|
+
@transport.post("/split/#{id}/subaccount/remove", body: body)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# Update Split
|
|
44
|
+
# PUT /split/{id}
|
|
45
|
+
def update(id, body = {})
|
|
46
|
+
@transport.put("/split/#{id}", body: body)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class Storefront < BaseResource
|
|
7
|
+
|
|
8
|
+
# Add Products to Storefront
|
|
9
|
+
# POST /storefront/{id}/product
|
|
10
|
+
def add_products(id, body = {})
|
|
11
|
+
@transport.post("/storefront/#{id}/product", body: body)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Create Storefront
|
|
16
|
+
# POST /storefront
|
|
17
|
+
def create(body = {})
|
|
18
|
+
@transport.post("/storefront", body: body)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Delete Storefront
|
|
23
|
+
# DELETE /storefront/{id}
|
|
24
|
+
def delete(id)
|
|
25
|
+
@transport.delete("/storefront/#{id}")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Duplicate Storefront
|
|
30
|
+
# POST /storefront/{id}/duplicate
|
|
31
|
+
def duplicate(id)
|
|
32
|
+
@transport.post("/storefront/#{id}/duplicate")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# Fetch Storefront
|
|
37
|
+
# GET /storefront/{id}
|
|
38
|
+
def fetch(id)
|
|
39
|
+
@transport.get("/storefront/#{id}")
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# Fetch Storefront Orders
|
|
44
|
+
# GET /storefront/{id}/order
|
|
45
|
+
def fetch_orders(id)
|
|
46
|
+
@transport.get("/storefront/#{id}/order")
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# List Storefronts
|
|
51
|
+
# GET /storefront
|
|
52
|
+
def list(query = {})
|
|
53
|
+
@transport.get("/storefront", query: query)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# List Storefront Products
|
|
58
|
+
# GET /storefront/{id}/product
|
|
59
|
+
def list_products(id)
|
|
60
|
+
@transport.get("/storefront/#{id}/product")
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# Publish Storefront
|
|
65
|
+
# POST /storefront/{id}/publish
|
|
66
|
+
def publish(id)
|
|
67
|
+
@transport.post("/storefront/#{id}/publish")
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Update Storefront
|
|
72
|
+
# PUT /storefront/{id}
|
|
73
|
+
def update(id, body = {})
|
|
74
|
+
@transport.put("/storefront/#{id}", body: body)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# Verify Storefront Slug
|
|
79
|
+
# GET /storefront/verify/{slug}
|
|
80
|
+
def verify_slug(slug)
|
|
81
|
+
@transport.get("/storefront/verify/#{slug}")
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class Subaccount < BaseResource
|
|
7
|
+
|
|
8
|
+
# Create Subaccount
|
|
9
|
+
# POST /subaccount
|
|
10
|
+
def create(body = {})
|
|
11
|
+
@transport.post("/subaccount", body: body)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Fetch Subaccount
|
|
16
|
+
# GET /subaccount/{code}
|
|
17
|
+
def fetch(code)
|
|
18
|
+
@transport.get("/subaccount/#{code}")
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# List Subaccounts
|
|
23
|
+
# GET /subaccount
|
|
24
|
+
def list(query = {})
|
|
25
|
+
@transport.get("/subaccount", query: query)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Update Subaccount
|
|
30
|
+
# PUT /subaccount/{code}
|
|
31
|
+
def update(code, body = {})
|
|
32
|
+
@transport.put("/subaccount/#{code}", body: body)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class Subscription < BaseResource
|
|
7
|
+
|
|
8
|
+
# Create Subscription
|
|
9
|
+
# POST /subscription
|
|
10
|
+
def create(body = {})
|
|
11
|
+
@transport.post("/subscription", body: body)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Disable Subscription
|
|
16
|
+
# POST /subscription/disable
|
|
17
|
+
def disable(body = {})
|
|
18
|
+
@transport.post("/subscription/disable", body: body)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Enable Subscription
|
|
23
|
+
# POST /subscription/enable
|
|
24
|
+
def enable(body = {})
|
|
25
|
+
@transport.post("/subscription/enable", body: body)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Fetch Subscription
|
|
30
|
+
# GET /subscription/{code}
|
|
31
|
+
def fetch(code)
|
|
32
|
+
@transport.get("/subscription/#{code}")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# List Subscriptions
|
|
37
|
+
# GET /subscription
|
|
38
|
+
def list(query = {})
|
|
39
|
+
@transport.get("/subscription", query: query)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# Send Update Subscription Link
|
|
44
|
+
# POST /subscription/{code}/manage/email
|
|
45
|
+
def manage_email(code)
|
|
46
|
+
@transport.post("/subscription/#{code}/manage/email")
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# Generate Update Subscription Link
|
|
51
|
+
# GET /subscription/{code}/manage/link
|
|
52
|
+
def manage_link(code)
|
|
53
|
+
@transport.get("/subscription/#{code}/manage/link")
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class Terminal < BaseResource
|
|
7
|
+
|
|
8
|
+
# Commission Terminal
|
|
9
|
+
# POST /terminal/commission_device
|
|
10
|
+
def commission(body = {})
|
|
11
|
+
@transport.post("/terminal/commission_device", body: body)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Decommission Terminal
|
|
16
|
+
# POST /terminal/decommission_device
|
|
17
|
+
def decommission(body = {})
|
|
18
|
+
@transport.post("/terminal/decommission_device", body: body)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Fetch Terminal
|
|
23
|
+
# GET /terminal/{terminal_id}
|
|
24
|
+
def fetch(terminal_id)
|
|
25
|
+
@transport.get("/terminal/#{terminal_id}")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Fetch Event Status
|
|
30
|
+
# GET /terminal/{terminal_id}/event/{event_id}
|
|
31
|
+
def fetch_event_status(terminal_id, event_id)
|
|
32
|
+
@transport.get("/terminal/#{terminal_id}/event/#{event_id}")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# Fetch Terminal Status
|
|
37
|
+
# GET /terminal/{terminal_id}/presence
|
|
38
|
+
def fetch_terminal_status(terminal_id)
|
|
39
|
+
@transport.get("/terminal/#{terminal_id}/presence")
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# List Terminals
|
|
44
|
+
# GET /terminal
|
|
45
|
+
def list(query = {})
|
|
46
|
+
@transport.get("/terminal", query: query)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# Send Event
|
|
51
|
+
# POST /terminal/{id}/event
|
|
52
|
+
def send_event(id, body = {})
|
|
53
|
+
@transport.post("/terminal/#{id}/event", body: body)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# Update Terminal
|
|
58
|
+
# PUT /terminal/{terminal_id}
|
|
59
|
+
def update(terminal_id, body = {})
|
|
60
|
+
@transport.put("/terminal/#{terminal_id}", body: body)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class Transaction < BaseResource
|
|
7
|
+
|
|
8
|
+
# Charge Authorization
|
|
9
|
+
# POST /transaction/charge_authorization
|
|
10
|
+
def charge_authorization(body = {})
|
|
11
|
+
@transport.post("/transaction/charge_authorization", body: body)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Export Transactions
|
|
16
|
+
# GET /transaction/export
|
|
17
|
+
def export(query = {})
|
|
18
|
+
@transport.get("/transaction/export", query: query)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Fetch Transaction
|
|
23
|
+
# GET /transaction/{id}
|
|
24
|
+
def fetch(id)
|
|
25
|
+
@transport.get("/transaction/#{id}")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Initialize Transaction
|
|
30
|
+
# POST /transaction/initialize
|
|
31
|
+
def initialize(body = {})
|
|
32
|
+
@transport.post("/transaction/initialize", body: body)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
public :initialize
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# List Transactions
|
|
39
|
+
# GET /transaction
|
|
40
|
+
def list(query = {})
|
|
41
|
+
@transport.get("/transaction", query: query)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# Partial Debit
|
|
46
|
+
# POST /transaction/partial_debit
|
|
47
|
+
def partial_debit(body = {})
|
|
48
|
+
@transport.post("/transaction/partial_debit", body: body)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# Fetch Transaction Timeline
|
|
53
|
+
# GET /transaction/timeline/{id}
|
|
54
|
+
def timeline(id)
|
|
55
|
+
@transport.get("/transaction/timeline/#{id}")
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# Transaction Totals
|
|
60
|
+
# GET /transaction/totals
|
|
61
|
+
def totals(query = {})
|
|
62
|
+
@transport.get("/transaction/totals", query: query)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# Verify Transaction
|
|
67
|
+
# GET /transaction/verify/{reference}
|
|
68
|
+
def verify(reference)
|
|
69
|
+
@transport.get("/transaction/verify/#{reference}")
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class Transfer < BaseResource
|
|
7
|
+
|
|
8
|
+
# Initiate Bulk Transfer
|
|
9
|
+
# POST /transfer/bulk
|
|
10
|
+
def bulk(body = {})
|
|
11
|
+
@transport.post("/transfer/bulk", body: body)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Disable OTP for Transfers
|
|
16
|
+
# POST /transfer/disable_otp
|
|
17
|
+
def disable_otp()
|
|
18
|
+
@transport.post("/transfer/disable_otp")
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Finalize Disabling OTP for Transfers
|
|
23
|
+
# POST /transfer/disable_otp_finalize
|
|
24
|
+
def disable_otp_finalize(body = {})
|
|
25
|
+
@transport.post("/transfer/disable_otp_finalize", body: body)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Enable OTP requirement for Transfers
|
|
30
|
+
# POST /transfer/enable_otp
|
|
31
|
+
def enable_otp()
|
|
32
|
+
@transport.post("/transfer/enable_otp")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# Export Transfers
|
|
37
|
+
# GET /transfer/export
|
|
38
|
+
def export_transfer(query = {})
|
|
39
|
+
@transport.get("/transfer/export", query: query)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# Fetch Transfer
|
|
44
|
+
# GET /transfer/{code}
|
|
45
|
+
def fetch(code)
|
|
46
|
+
@transport.get("/transfer/#{code}")
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# Finalize Transfer
|
|
51
|
+
# POST /transfer/finalize_transfer
|
|
52
|
+
def finalize(body = {})
|
|
53
|
+
@transport.post("/transfer/finalize_transfer", body: body)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# Initiate Transfer
|
|
58
|
+
# POST /transfer
|
|
59
|
+
def initiate(body = {})
|
|
60
|
+
@transport.post("/transfer", body: body)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# List Transfers
|
|
65
|
+
# GET /transfer
|
|
66
|
+
def list(query = {})
|
|
67
|
+
@transport.get("/transfer", query: query)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Resend OTP for Transfer
|
|
72
|
+
# POST /transfer/resend_otp
|
|
73
|
+
def resend_otp(body = {})
|
|
74
|
+
@transport.post("/transfer/resend_otp", body: body)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# Verify Transfer
|
|
79
|
+
# GET /transfer/verify/{reference}
|
|
80
|
+
def verify(reference)
|
|
81
|
+
@transport.get("/transfer/verify/#{reference}")
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class TransferRecipient < BaseResource
|
|
7
|
+
|
|
8
|
+
# Bulk Create Transfer Recipient
|
|
9
|
+
# POST /transferrecipient/bulk
|
|
10
|
+
def transferrecipient_bulk(body = {})
|
|
11
|
+
@transport.post("/transferrecipient/bulk", body: body)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Create Transfer Recipient
|
|
16
|
+
# POST /transferrecipient
|
|
17
|
+
def transferrecipient_create(body = {})
|
|
18
|
+
@transport.post("/transferrecipient", body: body)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Delete Transfer Recipient
|
|
23
|
+
# DELETE /transferrecipient/{code}
|
|
24
|
+
def transferrecipient_delete(code)
|
|
25
|
+
@transport.delete("/transferrecipient/#{code}")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Fetch Transfer recipient
|
|
30
|
+
# GET /transferrecipient/{code}
|
|
31
|
+
def transferrecipient_fetch(code)
|
|
32
|
+
@transport.get("/transferrecipient/#{code}")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# List Transfer Recipients
|
|
37
|
+
# GET /transferrecipient
|
|
38
|
+
def transferrecipient_list(query = {})
|
|
39
|
+
@transport.get("/transferrecipient", query: query)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# Update Transfer Recipient
|
|
44
|
+
# PUT /transferrecipient/{code}
|
|
45
|
+
def transferrecipient_update(code, body = {})
|
|
46
|
+
@transport.put("/transferrecipient/#{code}", body: body)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by weaver ruby-sdk generator — do not edit manually
|
|
3
|
+
|
|
4
|
+
module Paystack
|
|
5
|
+
module Resources
|
|
6
|
+
class VirtualTerminal < BaseResource
|
|
7
|
+
|
|
8
|
+
# Add Split Code to Virtual Terminal
|
|
9
|
+
# PUT /virtual_terminal/{code}/split_code
|
|
10
|
+
def add_split_code(code, body = {})
|
|
11
|
+
@transport.put("/virtual_terminal/#{code}/split_code", body: body)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Create Virtual Terminal
|
|
16
|
+
# POST /virtual_terminal
|
|
17
|
+
def create(body = {})
|
|
18
|
+
@transport.post("/virtual_terminal", body: body)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Deactivate Virtual Terminal
|
|
23
|
+
# PUT /virtual_terminal/{code}/deactivate
|
|
24
|
+
def deactivate(code)
|
|
25
|
+
@transport.put("/virtual_terminal/#{code}/deactivate")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Remove Split Code from Virtual Terminal
|
|
30
|
+
# DELETE /virtual_terminal/{code}/split_code
|
|
31
|
+
def delete_split_code(code, body = {})
|
|
32
|
+
@transport.delete("/virtual_terminal/#{code}/split_code", body: body)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# Assign Destination to Virtual Terminal
|
|
37
|
+
# POST /virtual_terminal/{code}/destination/assign
|
|
38
|
+
def destination_assign(code, body = {})
|
|
39
|
+
@transport.post("/virtual_terminal/#{code}/destination/assign", body: body)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# Unassign Destination from Virtual Terminal
|
|
44
|
+
# POST /virtual_terminal/{code}/destination/unassign
|
|
45
|
+
def destination_unassign(code, body = {})
|
|
46
|
+
@transport.post("/virtual_terminal/#{code}/destination/unassign", body: body)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# Fetch Virtual Terminal
|
|
51
|
+
# GET /virtual_terminal/{code}
|
|
52
|
+
def fetch(code)
|
|
53
|
+
@transport.get("/virtual_terminal/#{code}")
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# List Virtual Terminals
|
|
58
|
+
# GET /virtual_terminal
|
|
59
|
+
def list(query = {})
|
|
60
|
+
@transport.get("/virtual_terminal", query: query)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# Update Virtual Terminal
|
|
65
|
+
# PUT /virtual_terminal/{code}
|
|
66
|
+
def update(code, body = {})
|
|
67
|
+
@transport.put("/virtual_terminal/#{code}", body: body)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|