Class: Increase::Resources::Simulations::InboundMailItems

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ InboundMailItems

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

Parameters:



45
46
47
# File 'lib/increase/resources/simulations/inbound_mail_items.rb', line 45

def initialize(client:)
  @client = client
end

Instance Method Details

#create(amount:, contents_file_id: nil, lockbox_address_id: nil, lockbox_recipient_id: nil, request_options: {}) ⇒ Increase::Models::InboundMailItem

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

Simulates an Inbound Mail Item to one of your Lockbox Addresses or Lockbox Recipients, as if someone had mailed a physical check. Increase automatically deposits a check mailed to a Lockbox Recipient into the recipient’s Account. A check mailed to a Lockbox Address must be deposited or ignored with the [Action an Inbound Mail Item](#inbound-mail-items) endpoint.

Parameters:

  • amount (Integer)

    The amount of the check to be simulated, in cents.

  • contents_file_id (String)

    The file containing the PDF contents. If not present, a default check image file

  • lockbox_address_id (String)

    The identifier of the Lockbox Address to simulate inbound mail to. Exactly one l

  • lockbox_recipient_id (String)

    The identifier of the Lockbox Recipient to simulate inbound mail to. Exactly one

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

Returns:

See Also:



31
32
33
34
35
36
37
38
39
40
# File 'lib/increase/resources/simulations/inbound_mail_items.rb', line 31

def create(params)
  parsed, options = Increase::Simulations::InboundMailItemCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "simulations/inbound_mail_items",
    body: parsed,
    model: Increase::InboundMailItem,
    options: options
  )
end