Class: Billplz::Bill
Instance Attribute Summary
Attributes inherited from Model
#endpoint, #payload, #response
Instance Method Summary collapse
Methods inherited from Model
#api_url, #initialize, #parsed_json, #request, #success?
Constructor Details
This class inherits a constructor from Billplz::Model
Instance Method Details
#create ⇒ Object
5 6 7 8 |
# File 'lib/billplz/bill.rb', line 5 def create requires!(@payload, :collection_id, :email, :name, :amount, :callback_url) request(:post, @payload) end |
#delete ⇒ Object
16 17 18 19 20 |
# File 'lib/billplz/bill.rb', line 16 def delete requires!(@payload, :bill_id) @api_url = "#{@api_url}/#{@payload[:bill_id]}" request(:delete, nil) end |
#get ⇒ Object
10 11 12 13 14 |
# File 'lib/billplz/bill.rb', line 10 def get requires!(@payload, :bill_id) @api_url = "#{@api_url}/#{@payload[:bill_id]}" request(:get, nil) end |