class StarkitBanking::RBL::Payment::GetStatus
Private Instance Methods
credentials(payment)
click to toggle source
# File lib/starkit_banking/api/rbl/payment/get_status.rb, line 21 def credentials(payment) payment.payment_account.credentials end
invoke(env, req, callbacks)
click to toggle source
# File lib/starkit_banking/api/rbl/payment/get_status.rb, line 13 def invoke(env, req, callbacks) ApiBanking::GetPaymentStatus.get_status(env, req, callbacks) end
request(subscription, payment)
click to toggle source
# File lib/starkit_banking/api/rbl/payment/get_status.rb, line 25 def request(subscription, payment) header = ApiBanking::GetPaymentStatus::ReqHeader.new() reqBody = ApiBanking::GetPaymentStatus::ReqBody.new() request = ApiBanking::GetPaymentStatus::Request.new() header.corpID = subscription.app_id header.approverID = payment.created_by reqBody.referenceNo = payment.id.to_s request.header = header request.body = reqBody request end
response(res)
click to toggle source
# File lib/starkit_banking/api/rbl/payment/get_status.rb, line 17 def response(res) Transfer::Status.new(res.statusCode, res.bankReferenceNo, '') end
service_name()
click to toggle source
# File lib/starkit_banking/api/rbl/payment/get_status.rb, line 9 def service_name 'STATUS ENQUIRY' end
subscription(payment)
click to toggle source
# File lib/starkit_banking/api/rbl/payment/get_status.rb, line 42 def subscription(payment) payment.payment_account.service_subscriptions.find_by(service_name: service_name) end