Class: Easybill::Api::Documents
- Inherits:
-
Base
- Object
- Base
- Easybill::Api::Documents
show all
- Defined in:
- lib/easybill/api/documents.rb
Constant Summary
Constants inherited
from Base
Base::HEADERS
Class Method Summary
collapse
Methods inherited from Base
authenticate, create, destroy, find, list, update
included
Class Method Details
.cancel(id) ⇒ Object
11
12
13
|
# File 'lib/easybill/api/documents.rb', line 11
def cancel(id)
custom method: :post, path: "#{resource_path}/#{id}/cancel"
end
|
.deliver(id, type, data) ⇒ Object
15
16
17
|
# File 'lib/easybill/api/documents.rb', line 15
def deliver(id, type, data)
custom method: :post, path: "#{resource_path}/#{id}/send/#{type}", data:
end
|
.done(id) ⇒ Object
7
8
9
|
# File 'lib/easybill/api/documents.rb', line 7
def done(id)
custom method: :put, path: "#{resource_path}/#{id}/done"
end
|
.pdf(id) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/easybill/api/documents.rb', line 19
def pdf(id)
custom(
method: :get,
path: "#{resource_path}/#{id}/pdf",
headers: {
'Content-Type' => 'application/pdf',
'Accept' => 'application/pdf'
},
format: :pdf
)
end
|