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

Returns a new instance of InboundMailItems.



6
7
8
# File 'lib/increase/resources/inbound_mail_items.rb', line 6

def initialize(client:)
  @client = client
end

Instance Method Details

#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::InboundMailItem>

List Inbound Mail Items

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :created_at (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 objects.

  • :lockbox_id (String)

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

Returns:



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

def list(params = {}, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/inbound_mail_items"
  req[:query] = params
  req[:page] = Increase::Page
  req[:model] = Increase::Models::InboundMailItem
  @client.request(req, opts)
end

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

Retrieve an Inbound Mail Item

Parameters:

  • inbound_mail_item_id (String)

    The identifier of the Inbound Mail Item to retrieve.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



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

def retrieve(inbound_mail_item_id, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/inbound_mail_items/#{inbound_mail_item_id}"
  req[:model] = Increase::Models::InboundMailItem
  @client.request(req, opts)
end