Android
9. List MyReward
This function Goodie.setVoucherBalance() is used for showing all reward that you have. After you exchange rewards with points, it will show in here.
Here is the example:
Goodie.setVoucherBalance(authToken, deviceUniqueId, voucherBalanceId, memberId, merchantId, orderBy, OrderType, nRecords, page) .voucherBalanceGoodie(this ,new SetVoucherBalanceListener() { @Override public void onSuccess(VoucherBalanceResponse resp) { if (resp.getAbstractResponse().getResponseStatus().equals("INQ000")) { // On Success } @Override public void onError(Throwable throwable) { // On Error } });
Where :
Param | Type | Description |
---|---|---|
authToken | String | authToken is used as for header authentication purpose |
deviceUniqueId | String | deviceUniqueId is identify android device |
memberId | String | memberId is identifier that will be used to identity a member |
merchantId | String | merchantId is identifier that will be used to identity a merchant |
voucherBalanceId | String | It is used for identified voucher (Voucher Unique Id) |
orderBy | integer | It used for filtering reward by name in alphabet. Sample : 1 = Ascending, 2 = Descending |
orderType | Integer | It used for filtering reward by type. Sample : 1 = reward, 2 = product, 3 = point, 4 = expired date |
nRecords | integer | It is used to limit data displayed in one page |
page | integer | It is used to pagination, starts from 0 |
Response List MyReward :
{ "listVoucherBalance": [ { "voucherBalanceId": "CE40579A-C697-41C7-AF3E-967F877482C2", "productName": "Voucher Invisee Rp 100.000", "productImage":"https://dev.goodie.id/ViewImage?fileName=uments%5CIndivara%5Cka%23pAVTLKJDuWCESpRTyzaWwSKYoV%24kM.jpg", "voucherId": "JK5ZUEIZ98", "voucherCode": "TU1UUkIzU1BOVVlN", "amountValue": 100000, "percentageValue": 0, "expiredDate": "2020-01-31", "redeemDate": "-", "redeemStore": "", "status": "Active" }], "recordInfo": { "totalRecords": 2, "page": 0, "nrecords": 10 }, "abstractResponse": { "responseStatus": "INQ000", "responseMessage": "Inquiry success" } }