iOS
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 example:
1. orderBy : 2. 1 = ascending 3. 2 = descending 4. 5. orderType : 6. 1 = reward 7. 2 = product 8. 3 = point 9. 4 = expired date 10. 11. nRecord = number of records 12. 13. GoodieCore.voucherBalance(authToken: "authToken", deviceUniqueId: "deviceUniqueId", voucherBalanceId: "voucherBalanceId", memberId: "memberId", merchantId: "merchantId", orderBy: "1", orderType: "1", nRecords: "10", page: "0", completion: { (VoucherBalanceResponse) in 14. if VoucherBalanceResponse.abstractResponse?.responseStatus == "INQ000" { 15. //success, do something 16. }else{ 17. //failed 18. } 19. }) { (Error) in 20. //error 21. }
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 :
1. { 2. "listVoucherBalance": [ 3. { 4. "voucherBalanceId": "EAA13699-1F64-49C6-A893-0FDF35661FDF", 5. "productName": "Voucher Digital Alfamart Rp 50.000", 6. "productImage": "https://dev.goodie.id/ViewImage?fileName=Alfamart_Logo.png", 7. "voucherId": "ALD50-20190528-0145", 8. "voucherCode": "cTEyMzU4OQ==", 9. "amountValue": 50000, 10. "percentageValue": null, 11. "expiredDate": "2020-01-01", 12. "redeemDate": "-", 13. "redeemStore": "", 14. "status": "Active", 15. "url": "https://dev.uvcr.me/91eeebc220455f3ba68304336aa3b50d/1561101013" 16. }, 17. { 18. "voucherBalanceId": "346F53F4-7BC9-4F55-9425-DA3187763093", 19. "productName": "Voucher Digital Alfamart Rp 50.000", 20. "productImage": "https://dev.goodie.id/ViewImage?fileName=Alfamart_Logo.png", 21. "voucherId": "ALD50-20190528-0219", 22. "voucherCode": "cTEyMzY2Mw==", 23. "amountValue": 50000, 24. "percentageValue": null, 25. "expiredDate": "2020-01-01", 26. "redeemDate": "-", 27. "redeemStore": "", 28. "status": "Active", 29. "url": "https://dev.uvcr.me/b85a83b0399c54ba922a6d2c15d67f77/1561101013" 30. }, 31. { 32. "voucherBalanceId": "7F8096B0-53F5-4A85-9A0C-D1F50C540239", 33. "productName": "Voucher Digital Alfamart Rp 50.000", 34. "productImage": "https://dev.goodie.id/ViewImage?fileName=Alfamart_Logo.png", 35. "voucherId": "ALD50-20190528-1080", 36. "voucherCode": "cTEyNDUyNA==", 37. "amountValue": 50000, 38. "percentageValue": null, 39. "expiredDate": "2020-01-01", 40. "redeemDate": "-", 41. "redeemStore": "", 42. "status": "Active", 43. "url": "https://dev.uvcr.me/fd5cd71d44185055a60f138ef171468f/1561101013" 44. }, 45. { 46. "voucherBalanceId": "980EC42B-C4E9-4E2A-A0E2-49E861574749", 47. "productName": "Voucher Digital Alfamart Rp 50.000", 48. "productImage": "https://dev.goodie.id/ViewImage?fileName=Alfamart_Logo.png", 49. "voucherId": "ALD50-20190528-1331", 50. "voucherCode": "cTEyNDc3NQ==", 51. "amountValue": 50000, 52. "percentageValue": null, 53. "expiredDate": "2020-01-01", 54. "redeemDate": "-", 55. "redeemStore": "", 56. "status": "Active", 57. "url": "https://dev.uvcr.me/3c5dcec69a4557a086e057816df9d5c7/1561101013" 58. }, 59. { 60. "voucherBalanceId": "54E5EEB8-A3B0-46C7-85C6-B44A4A3CFE24", 61. "productName": "Voucher Digital Alfamart Rp 50.000", 62. "productImage": "https://dev.goodie.id/ViewImage?fileName=Alfamart_Logo.png", 63. "voucherId": "ALD50-20190528-1593", 64. "voucherCode": "cTEyNTAzNw==", 65. "amountValue": 50000, 66. "percentageValue": null, 67. "expiredDate": "2020-01-01", 68. "redeemDate": "-", 69. "redeemStore": "", 70. "status": "Active", 71. "url": "https://dev.uvcr.me/d4951d2c216b50438bd9267bafdc2b12/1561101013" 72. }, 73. { 74. "voucherBalanceId": "A03A69AC-1E11-4781-9291-33F7CD9E24C1", 75. "productName": "Voucher Digital Alfamart Rp 50.000", 76. "productImage": "https://dev.goodie.id/ViewImage?fileName=Alfamart_Logo.png", 77. "voucherId": "ALD50-20190528-2000", 78. "voucherCode": "cTEyNTQ0NA==", 79. "amountValue": 50000, 80. "percentageValue": null, 81. "expiredDate": "2020-01-01", 82. "redeemDate": "-", 83. "redeemStore": "", 84. "status": "Active", 85. "url": "https://dev.uvcr.me/a4cfde5e5d2d5c2fa41baf69d8dfa069/1561101013" 86. }, 87. { 88. "voucherBalanceId": "1595A057-096D-4AED-84E0-D2CE4F2FB00C", 89. "productName": "Voucher Digital Alfamart Rp 50.000", 90. "productImage": "https://dev.goodie.id/ViewImage?fileName=Alfamart_Logo.png", 91. "voucherId": "ALD50-20190528-2058", 92. "voucherCode": "cTEyNTUwMg==", 93. "amountValue": 50000, 94. "percentageValue": null, 95. "expiredDate": "2020-01-01", 96. "redeemDate": "-", 97. "redeemStore": "", 98. "status": "Active", 99. "url": "https://dev.uvcr.me/841a9a9b27805009ab2e74e030c4489a/1561101013" 100. }, 101. { 102. "voucherBalanceId": "7FE8FE9B-B730-4A3A-BA9F-40434BAA82DA", 103. "productName": "Voucher Digital Alfamart Rp 50.000", 104. "productImage": "https://dev.goodie.id/ViewImage?fileName=Alfamart_Logo.png", 105. "voucherId": "ALD50-20190528-0881", 106. "voucherCode": "cTEyNDMyNQ==", 107. "amountValue": 50000, 108. "percentageValue": null, 109. "expiredDate": "2020-01-01", 110. "redeemDate": "-", 111. "redeemStore": "", 112. "status": "Active", 113. "url": "https://dev.uvcr.me/1c8b648a30ec586b8199a9af877fb84e/1561101066" 114. } 115. ], 116. "recordInfo": { 117. "totalRecords": 8, 118. "page": 0, 119. "nrecords": 10 120. }, 121. "abstractResponse": { 122. "responseStatus": "INQ000", 123. "responseMessage": "Inquiry success" 124. } 125. }