Class: MasspayRubySdk::PayoutService
- Inherits:
-
Object
- Object
- MasspayRubySdk::PayoutService
- Defined in:
- lib/masspay_ruby_sdk/api/payout_service.rb
Instance Method Summary collapse
-
#commit_payout_txn(user_token, payout_token) ⇒ Object
Commit payout transaction PUT /payout/user_token/payout_token.
-
#get_payout_status(user_token, payout_token, query_params = {}) ⇒ Object
Get status of a payout by payout token GET /payout/user_token/payout_token.
-
#get_transaction_confirmation_details(user_token, payout_token) ⇒ Object
Get transaction confirmation details PATCH /payout/user_token/payout_token.
-
#get_user_payouts_by_token(user_token, query_params = {}) ⇒ Object
Get history of payouts by user token GET /payout/user_token.
-
#initialize(client) ⇒ PayoutService
constructor
A new instance of PayoutService.
-
#initiate_payout(user_token, body, query_params = {}) ⇒ Object
Initiate a payout transaction POST /payout/user_token.
Constructor Details
#initialize(client) ⇒ PayoutService
Returns a new instance of PayoutService.
15 16 17 |
# File 'lib/masspay_ruby_sdk/api/payout_service.rb', line 15 def initialize(client) @client = client ||= Client.new end |
Instance Method Details
#commit_payout_txn(user_token, payout_token) ⇒ Object
Commit payout transaction PUT /payout/user_token/payout_token
41 42 43 |
# File 'lib/masspay_ruby_sdk/api/payout_service.rb', line 41 def commit_payout_txn user_token, payout_token @client.put("payout/#{user_token}/#{payout_token}") end |
#get_payout_status(user_token, payout_token, query_params = {}) ⇒ Object
Get status of a payout by payout token GET /payout/user_token/payout_token
48 49 50 51 52 |
# File 'lib/masspay_ruby_sdk/api/payout_service.rb', line 48 def get_payout_status user_token, payout_token, query_params={} @client.get("payout/#{user_token}/#{payout_token}") do |req| req.params = query_params end end |
#get_transaction_confirmation_details(user_token, payout_token) ⇒ Object
Get transaction confirmation details PATCH /payout/user_token/payout_token
56 57 58 |
# File 'lib/masspay_ruby_sdk/api/payout_service.rb', line 56 def get_transaction_confirmation_details user_token, payout_token @client.patch("payout/#{user_token}/#{payout_token}") end |
#get_user_payouts_by_token(user_token, query_params = {}) ⇒ Object
Get history of payouts by user token GET /payout/user_token
33 34 35 36 37 |
# File 'lib/masspay_ruby_sdk/api/payout_service.rb', line 33 def get_user_payouts_by_token user_token, query_params={} @client.get("payout/#{user_token}") do |req| req.params = query_params end end |
#initiate_payout(user_token, body, query_params = {}) ⇒ Object
Initiate a payout transaction POST /payout/user_token
23 24 25 26 27 28 |
# File 'lib/masspay_ruby_sdk/api/payout_service.rb', line 23 def initiate_payout user_token, body, query_params={} @client.post("payout/#{user_token}") do |req| req.body = body req.params = query_params end end |