module BillsPayment::Actions::Post::ClassMethods
Public Instance Methods
do_payment(payment_data)
click to toggle source
params - id, customerRef, billerId, narration, accountNumber, paymentDate
# File lib/bills-payment/actions/post.rb, line 21 def do_payment(payment_data) api_url = "#{self.api_url}/dopayment" # response = BillsPayment.request(api_url, :post, payment_data) response = RestClient.post "http://14.98.171.134:9090/billspayment/bill/dopayment", payment_data response = JSON.parse(response.body) end
load_billers(id)
click to toggle source
# File lib/bills-payment/actions/post.rb, line 13 def load_billers(id) api_url = "#{api_url}/getbillers/#{id}" # response = BillsPayment.request(api_url, :post) response = RestClient.post "http://14.98.171.134:9090/billspayment/bill/getbillers/#{id}", {} response = JSON.parse(response.body) end
load_category()
click to toggle source
# File lib/bills-payment/actions/post.rb, line 6 def load_category api_url = "#{api_url}/categories" # response = BillsPayment.request(api_url, :post) response = RestClient.post 'http://14.98.171.134:9090/billspayment/bill/categories', {} response = JSON.parse(response.body) end