Rewards
Handles Rewards related requests with IMS web services.
Last updated
Handles Rewards related requests with IMS web services.
Last updated
The SDK allows for the host application to retrieve a token, which in turn can be used by the host application to fetch data from the Rewards system (see documentation for the Rewards). In order to fetch that token, the application must have a valid user (represented by the Identity). That user must be active.
To fetch the token, the following API can be used.
let rewards = RewardsService()
rewards.fetchToken(then: { result in
let token = result.value.token
guard !token.isEmpty else {
// failure
return
}
completionHandler(.success(token))
})