Module: Hws::Connectors::Hypto::VirtualAccount::Transaction
- Included in:
- Hws::Connectors::Hypto::VirtualAccount
- Defined in:
- lib/hws-connectors/hypto/virtual_account/transaction.rb
Constant Summary collapse
- TXN_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 hypto_va_id va_closing_balance va_wallet_amount)
Instance Method Summary collapse
- #send_to_bank_account(request:) ⇒ Dto::PayoutResponse
- #send_to_upi_id(request:) ⇒ Dto::PayoutResponse
- #status(reference_number:, va_id: nil) ⇒ Dto::PayoutResponse
Instance Method Details
#send_to_bank_account(request:) ⇒ Dto::PayoutResponse
6 7 8 9 10 11 12 13 |
# File 'lib/hws-connectors/hypto/virtual_account/transaction.rb', line 6 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], id: request.[:va_id] } resp = initiate_request(__method__, payload) to_txn_response(resp['data'], resp['message']) end |
#send_to_upi_id(request:) ⇒ Dto::PayoutResponse
17 18 19 20 21 22 23 24 |
# File 'lib/hws-connectors/hypto/virtual_account/transaction.rb', line 17 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], id: request.[:va_id] } resp = initiate_request(__method__, payload) to_txn_response(resp['data'], resp['message']) end |
#status(reference_number:, va_id: nil) ⇒ Dto::PayoutResponse
28 29 30 31 32 |
# File 'lib/hws-connectors/hypto/virtual_account/transaction.rb', line 28 def status(reference_number:, va_id: nil) payload = { reference_number: reference_number, id: va_id } resp = initiate_request(__method__, payload) to_txn_response(resp['data'], resp['message']) end |