Searching
Search Fields
We support three types of search fields:
- Text fields
- Multiple value fields
- Range fields
Learn more about working with search results.
Text fields
Text Fields can be searched using 5 operators: is
, isNot
, startsWith
, endsWith
, and contains
. Each search Text Field can't exceed 255 characters. Here is an example searching for customer email on a transaction.
- Java
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
.customerEmail().is("john.smith@example.com");
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
.customerEmail().isNot("john.smith@example.com");
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
.customerEmail().startsWith("john.smith");
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
.customerEmail().endsWith("example.com");
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
.customerEmail().contains("smith");
Multiple value fields
Search fields that accept multiple values support two operators: is
and in
.
- java
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
.status().is(Transaction.Status.AUTHORIZED);
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
.status().in(Transaction.Status.AUTHORIZED,
Transaction.Status.SUBMITTED_FOR_SETTLEMENT);
Range fields
Ranges support four operators: is
, between
, greaterThanOrEqualTo
, and lessThanOrEqualTo
. between
is inclusive.
- Java
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
.amount().is(new BigDecimal("15.00"));
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
.amount().greaterThanOrEqualTo(new BigDecimal("10.00"));
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
.amount().lessThanOrEqualTo(new BigDecimal("20.00"));
TransactionSearchRequest searchRequest = new TransactionSearchRequest()
.amount().between(new BigDecimal("10.00"), new BigDecimal("20.00"));