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:



40
41
42
# File 'lib/increase/resources/simulations/inbound_mail_items.rb', line 40

def initialize(client:)
  @client = client
end

Instance Method Details

#create(amount: , lockbox_id: , contents_file_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 your account, as if someone had mailed a physical check to one of your account’s Lockboxes.

Parameters:

  • amount (Integer)

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

  • lockbox_id (String)

    The identifier of the Lockbox to simulate inbound mail to.

  • contents_file_id (String)

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

  • 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/simulations/inbound_mail_items.rb', line 26

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