public interface VoucherifyApi
| Modifier and Type | Method and Description |
|---|---|
Voucher |
fetch(java.lang.String code)
Fetch details for a specific voucher.
|
VoucherUsage |
usage(java.lang.String code)
Fetch information about voucher usage details
|
Voucher |
use(java.lang.String code,
java.lang.String trackingId)
Method used to consume a voucher identified by code
|
Voucher |
use(java.lang.String code,
VoucherUsageContext usageContext)
Method used to consume a voucher and provide a context information.
|
@GET(value="/vouchers/{code}")
Voucher fetch(@Path(value="code")
java.lang.String code)
code - code of the voucher@POST(value="/vouchers/{code}/usage")
Voucher use(@Path(value="code")
java.lang.String code,
@Query(value="tracking_id")
java.lang.String trackingId)
code - code of the vouchertrackingId - an id enabling you to correlate who has used the voucher@POST(value="/vouchers/{code}/usage")
Voucher use(@Path(value="code")
java.lang.String code,
@Body
VoucherUsageContext usageContext)
code - code of the voucherusageContext - a context in terms of which the voucher is being used (e.g. customer profile)@GET(value="/vouchers/{code}/usage")
VoucherUsage usage(@Path(value="code")
java.lang.String code)
code - of the voucher