Class: Increase::Resources::Lockboxes

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/lockboxes.rb

Instance Method Summary collapse

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.

Parameters:



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

Parameters:

  • account_id (String)

    The Account checks sent to this Lockbox should be deposited into.

  • description (String)

    The description you choose for the Lockbox, for display purposes.

  • recipient_name (String)

    The name of the recipient that will receive mail at this location.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



21
22
23
24
25
26
27
28
29
30
# File 'lib/increase/resources/lockboxes.rb', line 21

def create(params)
  parsed, options = Increase::LockboxCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "lockboxes",
    body: parsed,
    model: Increase::Lockbox,
    options: 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

Parameters:

  • account_id (String)

    Filter Lockboxes to those associated with the provided Account.

  • created_at (Increase::Models::LockboxListParams::CreatedAt)
  • cursor (String)

    Return the page of entries after this one.

  • idempotency_key (String)

    Filter records to the one with the specified ‘idempotency_key` you chose for tha

  • limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 ob

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



102
103
104
105
106
107
108
109
110
111
112
# File 'lib/increase/resources/lockboxes.rb', line 102

def list(params = {})
  parsed, options = Increase::LockboxListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "lockboxes",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::Lockbox,
    options: options
  )
end

#retrieve(lockbox_id, request_options: {}) ⇒ Increase::Models::Lockbox

Retrieve a Lockbox

Parameters:

  • lockbox_id (String)

    The identifier of the Lockbox to retrieve.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



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

Parameters:

  • lockbox_id (String)

    The identifier of the Lockbox.

  • check_deposit_behavior (Symbol, Increase::Models::LockboxUpdateParams::CheckDepositBehavior)

    This indicates if checks mailed to this lockbox will be deposited.

  • description (String)

    The description you choose for the Lockbox.

  • recipient_name (String)

    The recipient name you choose for the Lockbox.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



69
70
71
72
73
74
75
76
77
78
# File 'lib/increase/resources/lockboxes.rb', line 69

def update(lockbox_id, params = {})
  parsed, options = Increase::LockboxUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["lockboxes/%1$s", lockbox_id],
    body: parsed,
    model: Increase::Lockbox,
    options: options
  )
end