Class: Increase::Resources::LockboxRecipients

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ LockboxRecipients

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

Parameters:



125
126
127
# File 'lib/increase/resources/lockbox_recipients.rb', line 125

def initialize(client:)
  @client = client
end

Instance Method Details

#create(account_id:, lockbox_address_id:, description: nil, recipient_name: nil, request_options: {}) ⇒ Increase::Models::LockboxRecipient

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

Create a Lockbox Recipient

Parameters:

  • account_id (String)

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

  • lockbox_address_id (String)

    The Lockbox Address where this Lockbox Recipient may receive mail.

  • description (String)

    The description you choose for the Lockbox Recipient.

  • recipient_name (String)

    The name of the Lockbox Recipient

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

Returns:

See Also:



26
27
28
29
30
31
32
33
34
35
# File 'lib/increase/resources/lockbox_recipients.rb', line 26

def create(params)
  parsed, options = Increase::LockboxRecipientCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "lockbox_recipients",
    body: parsed,
    model: Increase::LockboxRecipient,
    options: options
  )
end

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

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

List Lockbox Recipients

Parameters:

  • account_id (String)

    Filter Lockbox Recipients to those associated with the provided Account.

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

  • lockbox_address_id (String)

    Filter Lockbox Recipients to those associated with the provided Lockbox Address.

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

Returns:

See Also:



109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/increase/resources/lockbox_recipients.rb', line 109

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

#retrieve(lockbox_recipient_id, request_options: {}) ⇒ Increase::Models::LockboxRecipient

Retrieve a Lockbox Recipient

Parameters:

  • lockbox_recipient_id (String)

    The identifier of the Lockbox Recipient to retrieve.

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

Returns:

See Also:



48
49
50
51
52
53
54
55
# File 'lib/increase/resources/lockbox_recipients.rb', line 48

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

#update(lockbox_recipient_id, description: nil, recipient_name: nil, status: nil, request_options: {}) ⇒ Increase::Models::LockboxRecipient

Update a Lockbox Recipient

Parameters:

  • lockbox_recipient_id (String)

    The identifier of the Lockbox Recipient.

  • description (String)

    The description you choose for the Lockbox Recipient.

  • recipient_name (String)

    The name of the Lockbox Recipient.

  • status (Symbol, Increase::Models::LockboxRecipientUpdateParams::Status)

    The status of the Lockbox Recipient.

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

Returns:

See Also:



74
75
76
77
78
79
80
81
82
83
# File 'lib/increase/resources/lockbox_recipients.rb', line 74

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