getCustomerBestRewardToShow

Retrieve an upcoming reward for a customer or if they have already achieved all rewards, show their best reward.

RivoJS.getCustomerBestRewardToShow().then(function(resp){
  console.log(resp)
});

Sample response

{
    "success": true,
    "reward": {
        "id": 3,
        "name": "$20 off coupon",
        "enabled": true,
        "points_amount": 2000,
        "points_type": "fixed",
        "reward_type": "fixed_amount",
        "source": "points",
        "pretty_display_rewards": "$20 off coupon (2000 points required)",
        "icon_url": null,
        "terms_of_service": {
            "reward_type": "fixed_amount",
            "applies_to": "entire",
            "expiry_months": 2,
            "show_tos": true
        }
    }
}