private void OnGetUserNotificationInfoResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling GetUserNotificationInfo: " + response.Error);
            }

            GetUserNotificationInfoData = (NotificationUserTypeResource)KnetikClient.Deserialize(response.Content, typeof(NotificationUserTypeResource), response.Headers);
            KnetikLogger.LogResponse(mGetUserNotificationInfoStartTime, "GetUserNotificationInfo", string.Format("Response received successfully:\n{0}", GetUserNotificationInfoData));

            if (GetUserNotificationInfoComplete != null)
            {
                GetUserNotificationInfoComplete(response.ResponseCode, GetUserNotificationInfoData);
            }
        }
Ejemplo n.º 2
0
        private void OnCreatePayPalExpressCheckoutResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling CreatePayPalExpressCheckout: " + response.Error);
            }

            CreatePayPalExpressCheckoutData = (string)KnetikClient.Deserialize(response.Content, typeof(string), response.Headers);
            KnetikLogger.LogResponse(mCreatePayPalExpressCheckoutStartTime, "CreatePayPalExpressCheckout", string.Format("Response received successfully:\n{0}", CreatePayPalExpressCheckoutData));

            if (CreatePayPalExpressCheckoutComplete != null)
            {
                CreatePayPalExpressCheckoutComplete(response.ResponseCode, CreatePayPalExpressCheckoutData);
            }
        }
        private void OnCompileMessageTemplateResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling CompileMessageTemplate: " + response.Error);
            }

            CompileMessageTemplateData = (Dictionary <string, string>)KnetikClient.Deserialize(response.Content, typeof(Dictionary <string, string>), response.Headers);
            KnetikLogger.LogResponse(mCompileMessageTemplateStartTime, "CompileMessageTemplate", string.Format("Response received successfully:\n{0}", CompileMessageTemplateData));

            if (CompileMessageTemplateComplete != null)
            {
                CompileMessageTemplateComplete(response.ResponseCode, CompileMessageTemplateData);
            }
        }
Ejemplo n.º 4
0
        private void OnGetSignedS3URLResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling GetSignedS3URL: " + response.Error);
            }

            GetSignedS3URLData = (AmazonS3Activity)KnetikClient.Deserialize(response.Content, typeof(AmazonS3Activity), response.Headers);
            KnetikLogger.LogResponse(mGetSignedS3URLStartTime, "GetSignedS3URL", string.Format("Response received successfully:\n{0}", GetSignedS3URLData));

            if (GetSignedS3URLComplete != null)
            {
                GetSignedS3URLComplete(response.ResponseCode, GetSignedS3URLData);
            }
        }
        private void OnGetBRERulesResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling GetBRERules: " + response.Error);
            }

            GetBRERulesData = (PageResourceBreRule)KnetikClient.Deserialize(response.Content, typeof(PageResourceBreRule), response.Headers);
            KnetikLogger.LogResponse(mGetBRERulesStartTime, "GetBRERules", string.Format("Response received successfully:\n{0}", GetBRERulesData));

            if (GetBRERulesComplete != null)
            {
                GetBRERulesComplete(response.ResponseCode, GetBRERulesData);
            }
        }
        private void OnCreateShippingTemplateResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling CreateShippingTemplate: " + response.Error);
            }

            CreateShippingTemplateData = (ItemTemplateResource)KnetikClient.Deserialize(response.Content, typeof(ItemTemplateResource), response.Headers);
            KnetikLogger.LogResponse(mCreateShippingTemplateStartTime, "CreateShippingTemplate", string.Format("Response received successfully:\n{0}", CreateShippingTemplateData));

            if (CreateShippingTemplateComplete != null)
            {
                CreateShippingTemplateComplete(response.ResponseCode, CreateShippingTemplateData);
            }
        }
        private void OnGetShippingItemResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling GetShippingItem: " + response.Error);
            }

            GetShippingItemData = (ShippingItem)KnetikClient.Deserialize(response.Content, typeof(ShippingItem), response.Headers);
            KnetikLogger.LogResponse(mGetShippingItemStartTime, "GetShippingItem", string.Format("Response received successfully:\n{0}", GetShippingItemData));

            if (GetShippingItemComplete != null)
            {
                GetShippingItemComplete(response.ResponseCode, GetShippingItemData);
            }
        }
        private void OnHandleGooglePaymentResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling HandleGooglePayment: " + response.Error);
            }

            HandleGooglePaymentData = (int?)KnetikClient.Deserialize(response.Content, typeof(int?), response.Headers);
            KnetikLogger.LogResponse(mHandleGooglePaymentStartTime, "HandleGooglePayment", string.Format("Response received successfully:\n{0}", HandleGooglePaymentData));

            if (HandleGooglePaymentComplete != null)
            {
                HandleGooglePaymentComplete(response.ResponseCode, HandleGooglePaymentData);
            }
        }
        private void OnPaymentAuthorizationResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling PaymentAuthorization: " + response.Error);
            }

            PaymentAuthorizationData = (PaymentAuthorizationResource)KnetikClient.Deserialize(response.Content, typeof(PaymentAuthorizationResource), response.Headers);
            KnetikLogger.LogResponse(mPaymentAuthorizationStartTime, "PaymentAuthorization", string.Format("Response received successfully:\n{0}", PaymentAuthorizationData));

            if (PaymentAuthorizationComplete != null)
            {
                PaymentAuthorizationComplete(response.ResponseCode, PaymentAuthorizationData);
            }
        }
        private void OnCreateOrUpdateFattMerchantPaymentMethodResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling CreateOrUpdateFattMerchantPaymentMethod: " + response.Error);
            }

            CreateOrUpdateFattMerchantPaymentMethodData = (PaymentMethodResource)KnetikClient.Deserialize(response.Content, typeof(PaymentMethodResource), response.Headers);
            KnetikLogger.LogResponse(mCreateOrUpdateFattMerchantPaymentMethodStartTime, "CreateOrUpdateFattMerchantPaymentMethod", string.Format("Response received successfully:\n{0}", CreateOrUpdateFattMerchantPaymentMethodData));

            if (CreateOrUpdateFattMerchantPaymentMethodComplete != null)
            {
                CreateOrUpdateFattMerchantPaymentMethodComplete(response.ResponseCode, CreateOrUpdateFattMerchantPaymentMethodData);
            }
        }
Ejemplo n.º 11
0
        private void OnAnswerPollResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling AnswerPoll: " + response.Error);
            }

            AnswerPollData = (PollResponseResource)KnetikClient.Deserialize(response.Content, typeof(PollResponseResource), response.Headers);
            KnetikLogger.LogResponse(mAnswerPollStartTime, "AnswerPoll", string.Format("Response received successfully:\n{0}", AnswerPollData));

            if (AnswerPollComplete != null)
            {
                AnswerPollComplete(response.ResponseCode, AnswerPollData);
            }
        }
Ejemplo n.º 12
0
        private void OnGetChatMessageBlacklistResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling GetChatMessageBlacklist: " + response.Error);
            }

            GetChatMessageBlacklistData = (List <ChatBlacklistResource>)KnetikClient.Deserialize(response.Content, typeof(List <ChatBlacklistResource>), response.Headers);
            KnetikLogger.LogResponse(mGetChatMessageBlacklistStartTime, "GetChatMessageBlacklist", string.Format("Response received successfully:\n{0}", GetChatMessageBlacklistData));

            if (GetChatMessageBlacklistComplete != null)
            {
                GetChatMessageBlacklistComplete(response.ResponseCode, GetChatMessageBlacklistData);
            }
        }
        private void OnSendBREEventResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling SendBREEvent: " + response.Error);
            }

            SendBREEventData = (string)KnetikClient.Deserialize(response.Content, typeof(string), response.Headers);
            KnetikLogger.LogResponse(mSendBREEventStartTime, "SendBREEvent", string.Format("Response received successfully:\n{0}", SendBREEventData));

            if (SendBREEventComplete != null)
            {
                SendBREEventComplete(response.ResponseCode, SendBREEventData);
            }
        }
Ejemplo n.º 14
0
        private void OnReactivateUserSubscriptionResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling ReactivateUserSubscription: " + response.Error);
            }

            ReactivateUserSubscriptionData = (InvoiceResource)KnetikClient.Deserialize(response.Content, typeof(InvoiceResource), response.Headers);
            KnetikLogger.LogResponse(mReactivateUserSubscriptionStartTime, "ReactivateUserSubscription", string.Format("Response received successfully:\n{0}", ReactivateUserSubscriptionData));

            if (ReactivateUserSubscriptionComplete != null)
            {
                ReactivateUserSubscriptionComplete(response.ResponseCode, ReactivateUserSubscriptionData);
            }
        }
Ejemplo n.º 15
0
        private void OnVerifyAppleReceiptResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling VerifyAppleReceipt: " + response.Error);
            }

            VerifyAppleReceiptData = (string)KnetikClient.Deserialize(response.Content, typeof(string), response.Headers);
            KnetikLogger.LogResponse(mVerifyAppleReceiptStartTime, "VerifyAppleReceipt", string.Format("Response received successfully:\n{0}", VerifyAppleReceiptData));

            if (VerifyAppleReceiptComplete != null)
            {
                VerifyAppleReceiptComplete(response.ResponseCode, VerifyAppleReceiptData);
            }
        }
Ejemplo n.º 16
0
        private void OnGetUsersSubscriptionDetailsResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling GetUsersSubscriptionDetails: " + response.Error);
            }

            GetUsersSubscriptionDetailsData = (List <InventorySubscriptionResource>)KnetikClient.Deserialize(response.Content, typeof(List <InventorySubscriptionResource>), response.Headers);
            KnetikLogger.LogResponse(mGetUsersSubscriptionDetailsStartTime, "GetUsersSubscriptionDetails", string.Format("Response received successfully:\n{0}", GetUsersSubscriptionDetailsData));

            if (GetUsersSubscriptionDetailsComplete != null)
            {
                GetUsersSubscriptionDetailsComplete(response.ResponseCode, GetUsersSubscriptionDetailsData);
            }
        }
Ejemplo n.º 17
0
        private void OnGetLeaderboardRankResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling GetLeaderboardRank: " + response.Error);
            }

            GetLeaderboardRankData = (LeaderboardEntryResource)KnetikClient.Deserialize(response.Content, typeof(LeaderboardEntryResource), response.Headers);
            KnetikLogger.LogResponse(mGetLeaderboardRankStartTime, "GetLeaderboardRank", string.Format("Response received successfully:\n{0}", GetLeaderboardRankData));

            if (GetLeaderboardRankComplete != null)
            {
                GetLeaderboardRankComplete(response.ResponseCode, GetLeaderboardRankData);
            }
        }
        private void OnGetCountryByGeoLocationResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling GetCountryByGeoLocation: " + response.Error);
            }

            GetCountryByGeoLocationData = (string)KnetikClient.Deserialize(response.Content, typeof(string), response.Headers);
            KnetikLogger.LogResponse(mGetCountryByGeoLocationStartTime, "GetCountryByGeoLocation", string.Format("Response received successfully:\n{0}", GetCountryByGeoLocationData));

            if (GetCountryByGeoLocationComplete != null)
            {
                GetCountryByGeoLocationComplete(response.ResponseCode, GetCountryByGeoLocationData);
            }
        }
        private void OnUpdateBRERuleResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling UpdateBRERule: " + response.Error);
            }

            UpdateBRERuleData = (BreRule)KnetikClient.Deserialize(response.Content, typeof(BreRule), response.Headers);
            KnetikLogger.LogResponse(mUpdateBRERuleStartTime, "UpdateBRERule", string.Format("Response received successfully:\n{0}", UpdateBRERuleData));

            if (UpdateBRERuleComplete != null)
            {
                UpdateBRERuleComplete(response.ResponseCode, UpdateBRERuleData);
            }
        }
        private void OnGetSubscriptionRevenueResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling GetSubscriptionRevenue: " + response.Error);
            }

            GetSubscriptionRevenueData = (RevenueReportResource)KnetikClient.Deserialize(response.Content, typeof(RevenueReportResource), response.Headers);
            KnetikLogger.LogResponse(mGetSubscriptionRevenueStartTime, "GetSubscriptionRevenue", string.Format("Response received successfully:\n{0}", GetSubscriptionRevenueData));

            if (GetSubscriptionRevenueComplete != null)
            {
                GetSubscriptionRevenueComplete(response.ResponseCode, GetSubscriptionRevenueData);
            }
        }
Ejemplo n.º 21
0
        private void OnAddDeviceUsersResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling AddDeviceUsers: " + response.Error);
            }

            AddDeviceUsersData = (DeviceResource)KnetikClient.Deserialize(response.Content, typeof(DeviceResource), response.Headers);
            KnetikLogger.LogResponse(mAddDeviceUsersStartTime, "AddDeviceUsers", string.Format("Response received successfully:\n{0}", AddDeviceUsersData));

            if (AddDeviceUsersComplete != null)
            {
                AddDeviceUsersComplete(response.ResponseCode, AddDeviceUsersData);
            }
        }
        private void OnGetChallengeEventLeaderboardResponse(KnetikRestResponse response)
        {
            if (!string.IsNullOrEmpty(response.Error))
            {
                throw new KnetikException("Error calling GetChallengeEventLeaderboard: " + response.Error);
            }

            GetChallengeEventLeaderboardData = (PageResourceChallengeEventParticipantResource)KnetikClient.Deserialize(response.Content, typeof(PageResourceChallengeEventParticipantResource), response.Headers);
            KnetikLogger.LogResponse(mGetChallengeEventLeaderboardStartTime, "GetChallengeEventLeaderboard", string.Format("Response received successfully:\n{0}", GetChallengeEventLeaderboardData));

            if (GetChallengeEventLeaderboardComplete != null)
            {
                GetChallengeEventLeaderboardComplete(response.ResponseCode, GetChallengeEventLeaderboardData);
            }
        }