class Sagekit::AP::InvoiceBatchesResource

Public Instance Methods

create(company, **attributes) click to toggle source
# File lib/sagekit/resources/AP/invoice_batches.rb, line 12
def create(company, **attributes)
  InvoiceBatch.new post_request("#{company}/AP/APInvoiceBatches", body: attributes).body
end
list(company, **params) click to toggle source
# File lib/sagekit/resources/AP/invoice_batches.rb, line 4
def list(company, **params)
  Collection.from_response get_request("#{company}/AP/APInvoiceBatches", params: params), type: InvoiceBatch
end
retreive(company, batch_number, **params) click to toggle source
# File lib/sagekit/resources/AP/invoice_batches.rb, line 8
def retreive(company, batch_number, **params)
  InvoiceBatch.new get_request("#{company}/AP/APInvoiceBatches('#{batch_number}')", params: params).body
end
update(company, batch_number, **attributes) click to toggle source
# File lib/sagekit/resources/AP/invoice_batches.rb, line 16
def update(company, batch_number, **attributes)
  patch_request("#{company}/AP/APInvoiceBatches(#{batch_number})", body: attributes)
  true
end
update_json(company, batch_number, options={}) click to toggle source
# File lib/sagekit/resources/AP/invoice_batches.rb, line 21
def update_json(company, batch_number, options={})
  patch_request("#{company}/AP/APInvoiceBatches(#{batch_number})", body: options)
  true
end