Package com.mailosaur.models
Class SearchCriteria
java.lang.Object
com.mailosaur.models.SearchCriteria
The criteria with which to find messages during a search.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value to seek within the body of the target message.withMatch(SearchMatchOperator match) If set to `ALL` (default), then only results that match all specified criteria will be returned.withSentFrom(String sentFrom) Sets the full email address (or phone number for SMS) from which the target message was sent.withSentTo(String sentTo) Sets the full email address (or phone number for SMS) to which the target message was sent.withSubject(String subject) Sets the value to seek within the subject line of a target email.
-
Constructor Details
-
SearchCriteria
public SearchCriteria()
-
-
Method Details
-
withSentFrom
Sets the full email address (or phone number for SMS) from which the target message was sent.- Parameters:
sentFrom- Email address (or phone number for SMS).- Returns:
- the SearchCriteria object itself.
-
withSentTo
Sets the full email address (or phone number for SMS) to which the target message was sent.- Parameters:
sentTo- Email address (or phone number for SMS).- Returns:
- the SearchCriteria object itself.
-
withSubject
Sets the value to seek within the subject line of a target email.- Parameters:
subject- The value to seek within the subject line of a target email.- Returns:
- the SearchCriteria object itself.
-
withBody
Sets the value to seek within the body of the target message.- Parameters:
body- The value to seek within the body of the target message.- Returns:
- the SearchCriteria object itself.
-
withMatch
If set to `ALL` (default), then only results that match all specified criteria will be returned. If set to `ANY`, results that match any of the specified criteria will be returned.- Parameters:
match- Match `ALL` or `ANY` of the specified criteria.- Returns:
- the SearchCriteria object itself.
-