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

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

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:



48
49
50
# File 'lib/increase/resources/simulations/inbound_mail_items.rb', line 48

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

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 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 will be used.

  • lockbox_address_id (String)

    The identifier of the Lockbox Address to simulate inbound mail to. Exactly one lockbox identifier parameter must be provided.

  • lockbox_recipient_id (String)

    The identifier of the Lockbox Recipient to simulate inbound mail to. Exactly one lockbox identifier parameter must be provided.

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

Returns:

See Also:



34
35
36
37
38
39
40
41
42
43
# File 'lib/increase/resources/simulations/inbound_mail_items.rb', line 34

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