Module: FacturapiRuby::V2::Invoices
- Defined in:
- lib/facturapi_ruby/v2/invoices.rb
Class Method Summary collapse
- .cancel(invoice_id, motive, substitution = nil, options = {}) ⇒ Object
- .create(options) ⇒ Object
- .get(invoice_id, options = {}) ⇒ Object
Class Method Details
.cancel(invoice_id, motive, substitution = nil, options = {}) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/facturapi_ruby/v2/invoices.rb', line 16 def cancel(invoice_id, motive, substitution=nil, ={}) path = "/v2/invoices/#{invoice_id}?motive=#{motive}" path += "&substitution=#{substitution}" if substitution HttpClient.delete( endpoint: path, api_options: ) end |
.create(options) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/facturapi_ruby/v2/invoices.rb', line 9 def create() HttpClient.post( endpoint: '/v2/invoices', api_options: ) end |
.get(invoice_id, options = {}) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/facturapi_ruby/v2/invoices.rb', line 25 def get(invoice_id, ={}) HttpClient.get( endpoint: "/v2/invoices/#{invoice_id}", api_options: ) end |