Class: Increase::Resources::Lockboxes
- Inherits:
-
Object
- Object
- Increase::Resources::Lockboxes
- Defined in:
- lib/increase/resources/lockboxes.rb
Instance Method Summary collapse
-
#create(account_id: , description: nil, recipient_name: nil, request_options: {}) ⇒ Increase::Models::Lockbox
Create a Lockbox.
-
#initialize(client:) ⇒ Lockboxes
constructor
private
A new instance of Lockboxes.
-
#list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Lockbox>
Some parameter documentations has been truncated, see Models::LockboxListParams for more details.
-
#retrieve(lockbox_id, request_options: {}) ⇒ Increase::Models::Lockbox
Retrieve a Lockbox.
-
#update(lockbox_id, check_deposit_behavior: nil, description: nil, recipient_name: nil, request_options: {}) ⇒ Increase::Models::Lockbox
Update a Lockbox.
Constructor Details
#initialize(client:) ⇒ Lockboxes
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Lockboxes.
117 118 119 |
# File 'lib/increase/resources/lockboxes.rb', line 117 def initialize(client:) @client = client end |
Instance Method Details
#create(account_id: , description: nil, recipient_name: nil, request_options: {}) ⇒ Increase::Models::Lockbox
Create a Lockbox
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/increase/resources/lockboxes.rb', line 21 def create(params) parsed, = Increase::LockboxCreateParams.dump_request(params) @client.request( method: :post, path: "lockboxes", body: parsed, model: Increase::Lockbox, options: ) end |
#list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::Lockbox>
Some parameter documentations has been truncated, see Models::LockboxListParams for more details.
List Lockboxes
102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/increase/resources/lockboxes.rb', line 102 def list(params = {}) parsed, = Increase::LockboxListParams.dump_request(params) @client.request( method: :get, path: "lockboxes", query: parsed, page: Increase::Internal::Page, model: Increase::Lockbox, options: ) end |
#retrieve(lockbox_id, request_options: {}) ⇒ Increase::Models::Lockbox
Retrieve a Lockbox
43 44 45 46 47 48 49 50 |
# File 'lib/increase/resources/lockboxes.rb', line 43 def retrieve(lockbox_id, params = {}) @client.request( method: :get, path: ["lockboxes/%1$s", lockbox_id], model: Increase::Lockbox, options: params[:request_options] ) end |
#update(lockbox_id, check_deposit_behavior: nil, description: nil, recipient_name: nil, request_options: {}) ⇒ Increase::Models::Lockbox
Update a Lockbox
69 70 71 72 73 74 75 76 77 78 |
# File 'lib/increase/resources/lockboxes.rb', line 69 def update(lockbox_id, params = {}) parsed, = Increase::LockboxUpdateParams.dump_request(params) @client.request( method: :patch, path: ["lockboxes/%1$s", lockbox_id], body: parsed, model: Increase::Lockbox, options: ) end |