Class: Mailosaur::Models::SearchCriteria

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/Mailosaur/models/search_criteria.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_json

Constructor Details

#initialize(data = {}) ⇒ SearchCriteria

Returns a new instance of SearchCriteria.



4
5
6
7
8
9
10
# File 'lib/Mailosaur/models/search_criteria.rb', line 4

def initialize(data = {})
  @sent_from = data['sentFrom']
  @sent_to = data['sentTo']
  @subject = data['subject']
  @body = data['body']
  @match = data['match'] || 'ALL'
end

Instance Attribute Details

#bodyString

text body.

Returns:

  • (String)

    The value to seek within the target email’s HTML or



26
27
28
# File 'lib/Mailosaur/models/search_criteria.rb', line 26

def body
  @body
end

#matchString

specified criteria will be returned. If set to ANY, results that match any of the specified criteria will be returned.

Returns:

  • (String)

    If set to ALL (default), then only results that match all



31
32
33
# File 'lib/Mailosaur/models/search_criteria.rb', line 31

def match
  @match
end

#sent_fromString

sent.

Returns:

  • (String)

    The full email address from which the target email was



14
15
16
# File 'lib/Mailosaur/models/search_criteria.rb', line 14

def sent_from
  @sent_from
end

#sent_toString

sent.

Returns:

  • (String)

    The full email address to which the target email was



18
19
20
# File 'lib/Mailosaur/models/search_criteria.rb', line 18

def sent_to
  @sent_to
end

#subjectString

line.

Returns:

  • (String)

    The value to seek within the target email’s subject



22
23
24
# File 'lib/Mailosaur/models/search_criteria.rb', line 22

def subject
  @subject
end