Class: Increase::Resources::Documents
- Inherits:
-
Object
- Object
- Increase::Resources::Documents
- Defined in:
- lib/increase/resources/documents.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Documents
constructor
A new instance of Documents.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::Document>
List Documents.
-
#retrieve(document_id, opts = {}) ⇒ Increase::Models::Document
Retrieve a Document.
Constructor Details
#initialize(client:) ⇒ Documents
Returns a new instance of Documents.
6 7 8 |
# File 'lib/increase/resources/documents.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::Document>
List Documents
37 38 39 40 41 42 43 44 45 |
# File 'lib/increase/resources/documents.rb', line 37 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/documents" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::Document @client.request(req, opts) end |
#retrieve(document_id, opts = {}) ⇒ Increase::Models::Document
Retrieve a Document
16 17 18 19 20 21 22 |
# File 'lib/increase/resources/documents.rb', line 16 def retrieve(document_id, opts = {}) req = {} req[:method] = :get req[:path] = "/documents/#{document_id}" req[:model] = Increase::Models::Document @client.request(req, opts) end |