Class: Increase::Resources::InboundMailItems

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/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:



85
86
87
# File 'lib/increase/resources/inbound_mail_items.rb', line 85

def initialize(client:)
  @client = client
end

Instance Method Details

#action(inbound_mail_item_id, checks: , request_options: {}) ⇒ Increase::Models::InboundMailItem

Action a Inbound Mail Item

Parameters:

Returns:

See Also:



71
72
73
74
75
76
77
78
79
80
# File 'lib/increase/resources/inbound_mail_items.rb', line 71

def action(inbound_mail_item_id, params)
  parsed, options = Increase::InboundMailItemActionParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["inbound_mail_items/%1$s/action", inbound_mail_item_id],
    body: parsed,
    model: Increase::InboundMailItem,
    options: options
  )
end

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

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

List Inbound Mail Items

Parameters:

  • created_at (Increase::Models::InboundMailItemListParams::CreatedAt)
  • cursor (String)

    Return the page of entries after this one.

  • limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 ob

  • lockbox_id (String)

    Filter Inbound Mail Items to ones sent to the provided Lockbox.

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

Returns:

See Also:



46
47
48
49
50
51
52
53
54
55
56
# File 'lib/increase/resources/inbound_mail_items.rb', line 46

def list(params = {})
  parsed, options = Increase::InboundMailItemListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "inbound_mail_items",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::InboundMailItem,
    options: options
  )
end

#retrieve(inbound_mail_item_id, request_options: {}) ⇒ Increase::Models::InboundMailItem

Retrieve an Inbound Mail Item

Parameters:

  • inbound_mail_item_id (String)

    The identifier of the Inbound Mail Item to retrieve.

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

Returns:

See Also:



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

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