コード例 #1
0
        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);
        }
コード例 #2
0
        public override void LoadRewards(IBranchRewardsInterface callback)
        {
            BranchRewardsListener obj = new BranchRewardsListener(callback);

            callbacksList.Add(obj as Object);

            NativeBranch.LoadRewardsWithCallback(obj.LoadRewardsCallback);
        }
コード例 #3
0
        public override void LoadRewards(IBranchRewardsInterface callback)
        {
            BranchRewardsListener obj = new BranchRewardsListener(callback);

            obj.onResponseRewards = obj.LoadRewardsCallback;
            callbacksList.Add(obj as Object);

            NativeBranch.LoadRewards(obj);
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
 /// <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);
コード例 #6
0
 /// <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");
コード例 #7
0
 /// <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);
コード例 #8
0
 public BranchRewardsListener(IBranchRewardsInterface callback)
 {
     this.callback = callback;
 }