Class: Increase::Resources::Lockboxes
- Inherits:
-
Object
- Object
- Increase::Resources::Lockboxes
- Defined in:
- lib/increase/resources/lockboxes.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Increase::Models::Lockbox
Create a Lockbox.
-
#initialize(client:) ⇒ Lockboxes
constructor
A new instance of Lockboxes.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::Lockbox>
List Lockboxes.
-
#retrieve(lockbox_id, opts = {}) ⇒ Increase::Models::Lockbox
Retrieve a Lockbox.
-
#update(lockbox_id, params = {}, opts = {}) ⇒ Increase::Models::Lockbox
Update a Lockbox.
Constructor Details
#initialize(client:) ⇒ Lockboxes
Returns a new instance of Lockboxes.
6 7 8 |
# File 'lib/increase/resources/lockboxes.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ Increase::Models::Lockbox
Create a Lockbox
19 20 21 22 23 24 25 26 |
# File 'lib/increase/resources/lockboxes.rb', line 19 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/lockboxes" req[:body] = params req[:model] = Increase::Models::Lockbox @client.request(req, opts) end |
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::Lockbox>
List Lockboxes
78 79 80 81 82 83 84 85 86 |
# File 'lib/increase/resources/lockboxes.rb', line 78 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/lockboxes" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::Lockbox @client.request(req, opts) end |
#retrieve(lockbox_id, opts = {}) ⇒ Increase::Models::Lockbox
Retrieve a Lockbox
34 35 36 37 38 39 40 |
# File 'lib/increase/resources/lockboxes.rb', line 34 def retrieve(lockbox_id, opts = {}) req = {} req[:method] = :get req[:path] = "/lockboxes/#{lockbox_id}" req[:model] = Increase::Models::Lockbox @client.request(req, opts) end |
#update(lockbox_id, params = {}, opts = {}) ⇒ Increase::Models::Lockbox
Update a Lockbox
53 54 55 56 57 58 59 60 |
# File 'lib/increase/resources/lockboxes.rb', line 53 def update(lockbox_id, params = {}, opts = {}) req = {} req[:method] = :patch req[:path] = "/lockboxes/#{lockbox_id}" req[:body] = params req[:model] = Increase::Models::Lockbox @client.request(req, opts) end |