getBestPaymentInstrument(final long, final PaymentInstrument.Class, final Set< PaymentInstrument.Type >, final Currency, final boolean) method

Similar to the getPaymentInstruments but only returns the first element in the list and has a slightly different approach (no joined fetching) to enhance performance.

Syntax

PaymentInstrument getBestPaymentInstrument ( final long customerId , final PaymentInstrument.Class clazz , final Set< PaymentInstrument.Type > types , final Currency currency , final boolean credit )

Parameters

Returns

the best payment instrument given the provided filters or null

Usage

the best payment instrument given the provided filters or null