Mark Prize As Fulfilled
Mark a prize as fulfilled for the authenticated player.
Android
/**
* @property prize: A Challenges' Prize
* @return VsLiveData with PrizeFulfilledSuccessfully status
*/
fun fulfill(prize: Prize): VsLiveData<PrizeFulfilledSuccessfully>
val prize: Prize // Can be obtained from getAvailablePrizes
SDK.Prizing.fulfill(prize)
.observe(object : VsObserver<PrizeRedeemedSuccessfully>() {
override fun onError(error: Throwable) {}
override fun onChanged(t: PrizeRedeemedSuccessfully) {}
})
iOS
/// - Parameters:
/// - prizeId: The UUID of a prize instance
/// - completionHandler: Closure which returns a single Prize
fulfillPrize(prizeId: String, completionHandler: @escaping VersusApiResponse<Prize>)
VersusSDK?.fulfillPrize(prizeId: prizeId, completionHandler: { (prize, error) in
if error != nil {
// error occurred
} else {
// Successfully fulfilled the returned `prize`
}
})
Updated over 2 years ago