Class: Hws::Connectors::Hypto::Payout
- Inherits:
-
Hws::Connectors::Hypto
- Object
- Hws::Connectors
- Hws::Connectors::Hypto
- Hws::Connectors::Hypto::Payout
- Defined in:
- lib/hws-connectors/hypto/payout/base.rb
Constant Summary collapse
- META_RESPONSES =
%w(id txn_time created_at txn_type charges_gst settled_amount closing_balance connected_banking transfer_udf1 transfer_udf2 transfer_udf3 transfer_initiated_account_ifsc)
Constants inherited from Hws::Connectors::Hypto
Constants inherited from Hws::Connectors
Actions collapse
- #send_to_bank_account(request:) ⇒ Dto::PayoutResponse
- #send_to_upi_id(request:) ⇒ Dto::PayoutResponse
- #status(reference_number:) ⇒ Dto::PayoutResponse
Methods inherited from Hws::Connectors::Hypto
Methods inherited from Hws::Connectors
Methods included from Hws::Connectors::Helper
Constructor Details
This class inherits a constructor from Hws::Connectors::Hypto
Instance Method Details
#send_to_bank_account(request:) ⇒ Dto::PayoutResponse
8 9 10 11 12 13 14 15 |
# File 'lib/hws-connectors/hypto/payout/base.rb', line 8 def send_to_bank_account(request:) beneficiary = request.beneficiary payload = { reference_number: request.reference_number, number: beneficiary.account_number, ifsc: beneficiary.account_ifsc, amount: request.amount, payment_type: request.payment_type, note: beneficiary.note, beneficiary_name: beneficiary.name, udf1: request.[:udf1], udf2: request.[:udf2], udf3: request.[:udf3] } resp = initiate_request(__method__, payload) to_response(resp['data'], resp['message']) end |
#send_to_upi_id(request:) ⇒ Dto::PayoutResponse
19 20 21 22 23 24 25 26 |
# File 'lib/hws-connectors/hypto/payout/base.rb', line 19 def send_to_upi_id(request:) beneficiary = request.beneficiary payload = { reference_number: request.reference_number, upi_id: beneficiary.upi_id, amount: request.amount, payment_type: 'UPI', note: beneficiary.note, beneficiary_name: beneficiary.name, udf1: request.[:udf1], udf2: request.[:udf2], udf3: request.[:udf3] } resp = initiate_request(__method__, payload) to_response(resp['data'], resp['message']) end |
#status(reference_number:) ⇒ Dto::PayoutResponse
30 31 32 33 34 |
# File 'lib/hws-connectors/hypto/payout/base.rb', line 30 def status(reference_number:) payload = { reference_number: reference_number } resp = initiate_request(__method__, payload) to_response(resp['data'], resp['message']) end |