class Rubill::Query
Attributes
options[RW]
url[RW]
Public Class Methods
create(entity, object={})
click to toggle source
# File lib/rubill/query.rb, line 24 def self.create(entity, object={}) execute("/Crud/Create/#{entity}.json", obj: object) end
delete(entity, id)
click to toggle source
# File lib/rubill/query.rb, line 32 def self.delete(entity, id) execute("/Crud/Delete/#{entity}.json", id: id) end
execute(url, options)
click to toggle source
# File lib/rubill/query.rb, line 72 def self.execute(url, options) new(url, options).execute end
get_check_image_data(id)
click to toggle source
# File lib/rubill/query.rb, line 64 def self.get_check_image_data(id) execute("/GetCheckImageData.json", sentPayId: id) end
get_disbursement_data(id)
click to toggle source
# File lib/rubill/query.rb, line 60 def self.get_disbursement_data(id) execute("/GetDisbursementData.json", sentPayId: id) end
list(entity, start=0, step=999, filters=[])
click to toggle source
# File lib/rubill/query.rb, line 11 def self.list(entity, start=0, step=999, filters=[]) execute( "/List/#{entity}.json", start: start, max: step, filters: filters.map(&:to_hash), ) end
new(url, opts={})
click to toggle source
# File lib/rubill/query.rb, line 6 def initialize(url, opts={}) self.url = url self.options = opts end
pay_bills(opts={})
click to toggle source
# File lib/rubill/query.rb, line 36 def self.pay_bills(opts={}) execute("/PayBills.json", opts) end
read(entity, id)
click to toggle source
# File lib/rubill/query.rb, line 20 def self.read(entity, id) execute("/Crud/Read/#{entity}.json", id: id) end
receive_payment(opts={})
click to toggle source
# File lib/rubill/query.rb, line 40 def self.receive_payment(opts={}) execute("/RecordARPayment.json", opts) end
send_payment(opts={})
click to toggle source
# File lib/rubill/query.rb, line 44 def self.send_payment(opts={}) execute("/RecordAPPayment.json", opts) end
send_vendor_invite(vendorId, email)
click to toggle source
# File lib/rubill/query.rb, line 56 def self.send_vendor_invite(vendorId, email) execute("/SendVendorInvite.json", vendorId: vendorId, email: email) end
update(entity, object={})
click to toggle source
# File lib/rubill/query.rb, line 28 def self.update(entity, object={}) execute("/Crud/Update/#{entity}.json", obj: object) end
void_received_payment(id)
click to toggle source
# File lib/rubill/query.rb, line 52 def self.void_received_payment(id) execute("/VoidARPayment.json", id: id) end
void_sent_payment(id)
click to toggle source
# File lib/rubill/query.rb, line 48 def self.void_sent_payment(id) execute("/VoidAPPayment.json", sentPayId: id) end
Public Instance Methods
execute()
click to toggle source
# File lib/rubill/query.rb, line 68 def execute Session.instance.execute(self) end