public override void RedeemRewards(IBranchRewardsInterface callback, int amount, string bucket = "default") { BranchRewardsListener obj = new BranchRewardsListener(callback); callbacksList.Add(obj as Object); NativeBranch.RedeemRewards(amount, bucket, obj.RedeemRewardsCallback); }
public override void LoadRewards(IBranchRewardsInterface callback) { BranchRewardsListener obj = new BranchRewardsListener(callback); callbacksList.Add(obj as Object); NativeBranch.LoadRewardsWithCallback(obj.LoadRewardsCallback); }
public override void LoadRewards(IBranchRewardsInterface callback) { BranchRewardsListener obj = new BranchRewardsListener(callback); obj.onResponseRewards = obj.LoadRewardsCallback; callbacksList.Add(obj as Object); NativeBranch.LoadRewards(obj); }
public override void GetCreditHistory(IBranchRewardsInterface callback, string bucket = "", string afterId = "", int length = 100, bool mostRecentFirst = true) { BranchRewardsListener obj = new BranchRewardsListener(callback); callbacksList.Add(obj as Object); if (mostRecentFirst) { NativeBranch.GetCreditHistory(bucket, afterId, length, AndroidNativeBranch.CreditHistoryOrder.KMostRecentFirst, obj); } else { NativeBranch.GetCreditHistory(bucket, afterId, length, AndroidNativeBranch.CreditHistoryOrder.KLeastRecentFirst, obj); } }
/// <summary> /// Gets the credit history. /// </summary> /// <param name="callback">The callback that is called once the request has completed.</param> /// <param name="bucket">The bucket to get transaction history for.</param> /// <param name="afterId">The ID of the transaction to start from.</param> /// <param name="length">The number of transactions to pull.</param> /// <param name="mostRecentFirst">he direction to order transactions in the callback list. /// Least recent first means oldest items will be in the front of the response array, /// most recent means newest items will be front.</param> abstract public void GetCreditHistory(IBranchRewardsInterface callback, string bucket = "", string afterId = "", int length = 100, bool mostRecentFirst = true);
/// <summary> /// Redeem credits from the specified bucket. /// </summary> /// <param name="callback">The callback that is called once the request has completed.</param> /// <param name="amount">The number of credits to redeem.</param> /// <param name="bucket">The bucket to redeem credits from.</param> abstract public void RedeemRewards(IBranchRewardsInterface callback, int amount, string bucket = "default");
/// <summary> /// Loads credit totals from the server. /// </summary> /// <param name="callback">The callback that is called once the request has completed.</param> abstract public void LoadRewards(IBranchRewardsInterface callback);
public BranchRewardsListener(IBranchRewardsInterface callback) { this.callback = callback; }