iOS
10. Redeem MyReward
This function Goodie.voucherUsage() is used to redeem your voucher (You can get voucher from redeeming your points).
Here is example:
1. GoodieCore.voucherUsage(authToken: "authToken", deviceUniqueId: "deviceUniqueId", memberId: "memberId", merchantId: "merchantId", voucherBalanceId: "voucherBalanceId", storeId: "storeId", completion: { (VoucherUsageResponse) in 2. if VoucherUsageResponse.abstractResponse?.responseStatus == "INQ001" { 3. //success, do something 4. }else{ 5. //failed 6. } 7. }) { (Error) in 8. //error 9. }
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) |
storeId | String | storeId is an unique id to identify specific store |
Response Redeem MyReward :
1. { 2. "memberId": "D0A57818-1351-463D-9AD0-8A593250A68F", 3. "merchantId": "5F773EA1-1E66-4F9E-B9C8-E1FA8156AD20", 4. "abstractResponse": { 5. "responseStatus": "INQ001", 6. "responseMessage": "Redeem success" 7. } 8. }