Module: PactasItero::Api::Invoices

Included in:
PactasItero::Api
Defined in:
lib/pactas_itero/api/invoices.rb

Instance Method Summary collapse

Instance Method Details

#invoice(invoice_id, options = {}) ⇒ Object



20
21
22
23
# File 'lib/pactas_itero/api/invoices.rb', line 20

def invoice(invoice_id, options = {})
  options = options.camelize_keys
  get "api/v1/invoices/#{invoice_id}", options
end

#invoice_download(invoice_id, options = {}) ⇒ Object



25
26
27
28
# File 'lib/pactas_itero/api/invoices.rb', line 25

def invoice_download(invoice_id, options = {})
  options = options.camelize_keys
  get "api/v1/invoices/#{invoice_id}/download", options
end

#invoices(options = {}) ⇒ Object



6
7
8
9
# File 'lib/pactas_itero/api/invoices.rb', line 6

def invoices(options = {})
  options = options.camelize_keys
  get "api/v1/invoices", options
end

#invoices_from(from_id = nil, options = {}) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/pactas_itero/api/invoices.rb', line 11

def invoices_from(from_id = nil, options = {})
  if from_id
    options = options.camelize_keys
    get "api/v1/invoices?from=#{from_id}", options
  else
    invoices(options)
  end
end