public class VoucherModule.ExtAsync
extends pl.rspective.voucherify.client.module.AbsModule.Async
| Constructor and Description |
|---|
ExtAsync() |
| Modifier and Type | Method and Description |
|---|---|
void |
createVoucher(Voucher voucher,
VoucherifyCallback<Voucher> callback)
Create a voucher.
|
void |
disableVoucher(java.lang.String code,
VoucherifyCallback<java.lang.Void> callback)
Disable a voucher.
|
void |
enableVoucher(java.lang.String code,
VoucherifyCallback<java.lang.Void> callback)
Enable a voucher.
|
void |
fetchVoucher(java.lang.String identifier,
VoucherifyCallback<Voucher> callback)
Fetch a single resource with an identifier.
|
void |
listRedemptions(RedemptionsFilter filter,
VoucherifyCallback<java.util.List<RedemptionDetails>> callback)
List redemptions across all vouchers.
|
void |
listVouchers(VouchersFilter filter,
VoucherifyCallback<java.util.List<Voucher>> callback)
Fetch user's list of vouchers which meet provided filters.
|
void |
redeem(java.lang.String identifier,
java.lang.String trackingId,
VoucherifyCallback<VoucherRedemptionResult> callback)
Redeem a voucher by his identifier
|
void |
redeem(java.lang.String identifier,
VoucherRedemptionContext redemptionContext,
VoucherifyCallback<VoucherRedemptionResult> callback)
Redeem a voucher by his identifier
|
void |
redemption(java.lang.String identifier,
VoucherifyCallback<VoucherRedemption> callback)
Fetch information about voucher redemption
|
void |
rollbackRedemption(java.lang.String redemptionId,
java.lang.String trackingId,
java.lang.String reason,
VoucherifyCallback<VoucherRedemptionResult> callback)
Redemption rollback reverts a redemption.
|
public void listVouchers(VouchersFilter filter, VoucherifyCallback<java.util.List<Voucher>> callback)
filter - a set of conditions to narrow down the resultpublic void fetchVoucher(java.lang.String identifier,
VoucherifyCallback<Voucher> callback)
identifier - resource idpublic void createVoucher(Voucher voucher, VoucherifyCallback<Voucher> callback)
voucher - voucher to be createdpublic void disableVoucher(java.lang.String code,
VoucherifyCallback<java.lang.Void> callback)
code - code of a voucher that should be disabledpublic void enableVoucher(java.lang.String code,
VoucherifyCallback<java.lang.Void> callback)
code - code of a voucher that should be enabledpublic void redeem(java.lang.String identifier,
java.lang.String trackingId,
VoucherifyCallback<VoucherRedemptionResult> callback)
identifier - of the voucherpublic void redeem(java.lang.String identifier,
VoucherRedemptionContext redemptionContext,
VoucherifyCallback<VoucherRedemptionResult> callback)
identifier - of the voucherpublic void redemption(java.lang.String identifier,
VoucherifyCallback<VoucherRedemption> callback)
identifier - of the voucher for which we fetch the redemption detailspublic void listRedemptions(RedemptionsFilter filter, VoucherifyCallback<java.util.List<RedemptionDetails>> callback)
filter - a set of conditions to narrow down the resultpublic void rollbackRedemption(java.lang.String redemptionId,
java.lang.String trackingId,
java.lang.String reason,
VoucherifyCallback<VoucherRedemptionResult> callback)
redemptionId - (required)
id of a redemptiontrackingId - (optional)
id of a customerreason - (optional)