Class: Superfaktura::Invoices

Inherits:
BaseApi
  • Object
show all
Defined in:
lib/superfaktura/invoices.rb

Constant Summary

Constants inherited from BaseApi

BaseApi::SANDBOX_SUPERFAKTURA_URL, BaseApi::SUPERFAKTURA_URL

Class Method Summary collapse

Methods inherited from BaseApi

client, file, file_client, get, post, request, superfaktura_url

Class Method Details

.create(attributes) ⇒ Object



3
4
5
# File 'lib/superfaktura/invoices.rb', line 3

def self.create(attributes)
  post('/invoices/create', attributes)
end

.download(id, locale: :en) ⇒ Object



7
8
9
# File 'lib/superfaktura/invoices.rb', line 7

def self.download(id, locale: :en)
  file("/#{Superfaktura::Locales.iso2_to_iso3(locale)}/invoices/pdf/#{id}")
end