Пример #1
0
        public MemberAchievement AddAchievementForMember(long memberId, AchievementInput achievement)
        {
            var client  = GetClient();
            var request = new RestRequest("members/" + memberId + "/achievements", Method.POST);

            request.RequestFormat = DataFormat.Json;
            request.AddBody(achievement);
            var response = client.Execute <MemberAchievement>(request);

            if (response.StatusCode != System.Net.HttpStatusCode.OK)
            {
                throw new EncentivizeException(response.Content);
            }
            return(response.Data);
        }
Пример #2
0
 public MemberAchievement AddAchievementForMember(Member member, AchievementInput achievement)
 {
     return(AddAchievementForMember(member.MemberId, achievement));
 }