public final class ValidationsModule
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
pl.rspective.voucherify.client.module.AbsModule.Async |
static class |
pl.rspective.voucherify.client.module.AbsModule.Rx |
class |
ValidationsModule.ExtAsync
Async extension.
|
class |
ValidationsModule.ExtRxJava
RxJava extension.
|
| Constructor and Description |
|---|
ValidationsModule(VoucherifyApi api,
java.util.concurrent.Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
ValidationsModule.ExtAsync |
async()
Returns the asynchronous extension of this module.
|
ValidationsModule.ExtRxJava |
rx()
Returns the RxJava extension of this module.
|
VoucherValidationResult |
validateVoucher(java.lang.String code,
VoucherValidationContext validityContext)
Validates given voucher code against the customer.
|
public ValidationsModule(VoucherifyApi api, java.util.concurrent.Executor executor)
api - describes Voucherify REST APIexecutor - of threads for current platformpublic VoucherValidationResult validateVoucher(java.lang.String code, VoucherValidationContext validityContext)
code - code of the vouchervalidityContext - a context in terms of which the voucher is being validated (e.g. customer profile)public ValidationsModule.ExtAsync async()
public ValidationsModule.ExtRxJava rx()