Example #1
0
        private void CheckAttributionI(ResponseData responseData)
        {
            if (responseData.JsonResponse == null)
            {
                return;
            }

            var askInMilliseconds = Util.GetDictionaryInt(responseData.JsonResponse, "ask_in");

            // with ask_in
            if (askInMilliseconds.HasValue)
            {
                _activityHandler.SetAskingAttribution(true);

                GetAttributionI(TimeSpan.FromMilliseconds(askInMilliseconds.Value));
                return;
            }

            // without ask_in
            _activityHandler.SetAskingAttribution(false);

            var attributionString = Util.GetDictionaryString(responseData.JsonResponse, "attribution");

            responseData.Attribution = AdjustAttribution.FromJsonString(attributionString, responseData.Adid);
        }