Class: Increase::Resources::LockboxAddresses

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ LockboxAddresses

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 LockboxAddresses.

Parameters:



110
111
112
# File 'lib/increase/resources/lockbox_addresses.rb', line 110

def initialize(client:)
  @client = client
end

Instance Method Details

#create(description: nil, request_options: {}) ⇒ Increase::Models::LockboxAddress

Create a Lockbox Address

Parameters:

  • description (String)

    The description you choose for the Lockbox Address.

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

Returns:

See Also:



17
18
19
20
21
22
23
24
25
26
# File 'lib/increase/resources/lockbox_addresses.rb', line 17

def create(params = {})
  parsed, options = Increase::LockboxAddressCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "lockbox_addresses",
    body: parsed,
    model: Increase::LockboxAddress,
    options: options
  )
end

#list(created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::LockboxAddress>

Some parameter documentations has been truncated, see Models::LockboxAddressListParams for more details.

List Lockbox Addresses

Parameters:

  • created_at (Increase::Models::LockboxAddressListParams::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:



94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/increase/resources/lockbox_addresses.rb', line 94

def list(params = {})
  parsed, options = Increase::LockboxAddressListParams.dump_request(params)
  query = Increase::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "lockbox_addresses",
    query: query,
    page: Increase::Internal::Page,
    model: Increase::LockboxAddress,
    options: options
  )
end

#retrieve(lockbox_address_id, request_options: {}) ⇒ Increase::Models::LockboxAddress

Retrieve a Lockbox Address

Parameters:

  • lockbox_address_id (String)

    The identifier of the Lockbox Address to retrieve.

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

Returns:

See Also:



39
40
41
42
43
44
45
46
# File 'lib/increase/resources/lockbox_addresses.rb', line 39

def retrieve(lockbox_address_id, params = {})
  @client.request(
    method: :get,
    path: ["lockbox_addresses/%1$s", lockbox_address_id],
    model: Increase::LockboxAddress,
    options: params[:request_options]
  )
end

#update(lockbox_address_id, description: nil, status: nil, request_options: {}) ⇒ Increase::Models::LockboxAddress

Update a Lockbox Address

Parameters:

Returns:

See Also:



63
64
65
66
67
68
69
70
71
72
# File 'lib/increase/resources/lockbox_addresses.rb', line 63

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