Android


8. Reward Redeem

This function Goodie.reedemReward() is used for exchange points into rewards.

Here is example:

Goodie.setRewardRedeem(authToken,deviceUniqueId, memberId, merchantId,
    List<RewardsReq> listReward)
    .redeemRewardGoodie(this, new SetRewardRedeemptionListener() {

        @Override

            public void onSuccess(RewardRedemptionResponse res) {

                if(res.getAbstractResponse().getResponseStatus().equals("RWRED000")) {

            //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
listReward ArrayList listReward is an ArrayList which is contains quantity and rewardId, (Build construct ArrayList to declare the reward and it can be redeemed more than one reward)

Response Redeem Reward :
{
    "rewardRedemptionResponse": {

        "detailResponses": [
            {
                "detailResponseId": "RRDTL000",
                "detailResponseMessage": "Reward has been successfully redeem     					
                "rewardId": "472C55A7-270D-4474-B5A6-736593AD92BC",
                "rewardCode": "UMBR001",
                "rewardName": "Sedia Payung Sebelum Hujan",
                "pointUsed": 5,
                    "productType": "0",
                "producTypeDescription": "Item",
                "voucher": []
            }
            ],
            "totalPointUsed": 5,
            "currentBalance": 955,
            "transactionIdReference": "245C2A09-9BF0-4818-8E22-B5B4756E487A"
        },

            "abstractResponse": {
            "responseStatus": "RWRED000",
            "responseMessage": "Reward Redemption Successful"
        }
}