Module: BillsPayment::Actions::Post::ClassMethods
- Defined in:
- lib/bills-payment/actions/post.rb
Instance Method Summary collapse
-
#do_payment(payment_data) ⇒ Object
params - id, customerRef, billerId, narration, accountNumber, paymentDate.
- #load_billers(id) ⇒ Object
- #load_category ⇒ Object
Instance Method Details
#do_payment(payment_data) ⇒ Object
params - id, customerRef, billerId, narration, accountNumber, paymentDate
21 22 23 24 25 26 |
# 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) ⇒ Object
13 14 15 16 17 18 |
# 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 ⇒ Object
6 7 8 9 10 11 |
# 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 |