public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is Customer other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)) &&
                   ((Cards == null && other.Cards == null) || (Cards?.Equals(other.Cards) == true)) &&
                   ((GivenName == null && other.GivenName == null) || (GivenName?.Equals(other.GivenName) == true)) &&
                   ((FamilyName == null && other.FamilyName == null) || (FamilyName?.Equals(other.FamilyName) == true)) &&
                   ((Nickname == null && other.Nickname == null) || (Nickname?.Equals(other.Nickname) == true)) &&
                   ((CompanyName == null && other.CompanyName == null) || (CompanyName?.Equals(other.CompanyName) == true)) &&
                   ((EmailAddress == null && other.EmailAddress == null) || (EmailAddress?.Equals(other.EmailAddress) == true)) &&
                   ((Address == null && other.Address == null) || (Address?.Equals(other.Address) == true)) &&
                   ((PhoneNumber == null && other.PhoneNumber == null) || (PhoneNumber?.Equals(other.PhoneNumber) == true)) &&
                   ((Birthday == null && other.Birthday == null) || (Birthday?.Equals(other.Birthday) == true)) &&
                   ((ReferenceId == null && other.ReferenceId == null) || (ReferenceId?.Equals(other.ReferenceId) == true)) &&
                   ((Note == null && other.Note == null) || (Note?.Equals(other.Note) == true)) &&
                   ((Preferences == null && other.Preferences == null) || (Preferences?.Equals(other.Preferences) == true)) &&
                   ((Groups == null && other.Groups == null) || (Groups?.Equals(other.Groups) == true)) &&
                   ((CreationSource == null && other.CreationSource == null) || (CreationSource?.Equals(other.CreationSource) == true)) &&
                   ((GroupIds == null && other.GroupIds == null) || (GroupIds?.Equals(other.GroupIds) == true)) &&
                   ((SegmentIds == null && other.SegmentIds == null) || (SegmentIds?.Equals(other.SegmentIds) == true)));
        }
 public async Task<PostsResponse> GetPostByIdsAsync(string[] ids, string scheme = "full")
 {
     var groupIds = new GroupIds()
     {
         ids = ids
     };
     var result = await _webManager.PostData(new Uri(Endpoints.GroupPost), null, new StringContent(JsonConvert.SerializeObject(groupIds), Encoding.UTF8, "application/json"));
     return JsonConvert.DeserializeObject<PostsResponse>(result.ResultJson);
 }
 protected void AddFaculty_Click(object sender, EventArgs e)
 {
     if (!FacultySelector.SelectedValue.Equals(String.Empty) && !GroupIds.Contains(Convert.ToInt32(FacultySelector.SelectedValue)))
     {
         FacultyListField.Value += (FacultyListField.Value.Length > 0 ? "," : "") + FacultySelector.SelectedValue;
     }
     LoadTable();
     FacultySelector.ClearSelection();
 }
        public async Task <PostsResponse> GetPostByIdsAsync(string[] ids, string scheme = "full")
        {
            var groupIds = new GroupIds()
            {
                ids = ids
            };
            var result = await _webManager.PostData(new Uri(Endpoints.GroupPost), null, new StringContent(JsonConvert.SerializeObject(groupIds), Encoding.UTF8, "application/json"));

            return(JsonConvert.DeserializeObject <PostsResponse>(result.ResultJson));
        }
Exemple #5
0
 /// <summary>
 /// Sets the GroupIds value.
 /// </summary>
 /// <param name="groupIds">List of the group ids of objects to retrieve.</param>
 public ApiSearchOptions SetGroupId(int groupId)
 {
     GroupIds.Add(groupId);
     return(this);
 }
Exemple #6
0
 /// <summary>
 /// Sets the GroupIds value.
 /// </summary>
 /// <param name="groupIds">List of the group ids of objects to retrieve.</param>
 public ApiSearchOptions SetGroupIds(IList <int> groupIds)
 {
     GroupIds.AddRange(groupIds);
     return(this);
 }
        public override int GetHashCode()
        {
            int hashCode = 749289117;

            if (Id != null)
            {
                hashCode += Id.GetHashCode();
            }

            if (CreatedAt != null)
            {
                hashCode += CreatedAt.GetHashCode();
            }

            if (UpdatedAt != null)
            {
                hashCode += UpdatedAt.GetHashCode();
            }

            if (Cards != null)
            {
                hashCode += Cards.GetHashCode();
            }

            if (GivenName != null)
            {
                hashCode += GivenName.GetHashCode();
            }

            if (FamilyName != null)
            {
                hashCode += FamilyName.GetHashCode();
            }

            if (Nickname != null)
            {
                hashCode += Nickname.GetHashCode();
            }

            if (CompanyName != null)
            {
                hashCode += CompanyName.GetHashCode();
            }

            if (EmailAddress != null)
            {
                hashCode += EmailAddress.GetHashCode();
            }

            if (Address != null)
            {
                hashCode += Address.GetHashCode();
            }

            if (PhoneNumber != null)
            {
                hashCode += PhoneNumber.GetHashCode();
            }

            if (Birthday != null)
            {
                hashCode += Birthday.GetHashCode();
            }

            if (ReferenceId != null)
            {
                hashCode += ReferenceId.GetHashCode();
            }

            if (Note != null)
            {
                hashCode += Note.GetHashCode();
            }

            if (Preferences != null)
            {
                hashCode += Preferences.GetHashCode();
            }

            if (Groups != null)
            {
                hashCode += Groups.GetHashCode();
            }

            if (CreationSource != null)
            {
                hashCode += CreationSource.GetHashCode();
            }

            if (GroupIds != null)
            {
                hashCode += GroupIds.GetHashCode();
            }

            if (SegmentIds != null)
            {
                hashCode += SegmentIds.GetHashCode();
            }

            return(hashCode);
        }
        public override Dictionary <string, string> AsDictionary()
        {
            var dictionary = new Dictionary <string, string>
            {
                { "fields", "taglist" }
            };

            var catArray = Categories?.ToArray();

            if ((catArray?.Length ?? 0) > 0)
            {
                dictionary.Add("category", string.Join(",", catArray));
            }

            if (!string.IsNullOrWhiteSpace(Country))
            {
                dictionary.Add("country", Country);
            }

            var groupIdArray = GroupIds?.ToArray();

            if ((groupIdArray?.Length ?? 0) > 0)
            {
                dictionary.Add("group_id", string.Join(",", groupIdArray));
            }

            var groupNameArray = GroupNames?.ToArray();

            if ((groupNameArray?.Length ?? 0) > 0)
            {
                dictionary.Add("group_urlname", string.Join(",", groupNameArray));
            }

            if (Latitude.HasValue)
            {
                dictionary.Add("lat", Latitude.ToString());
            }

            if (Longitude.HasValue)
            {
                dictionary.Add("lon", Longitude.ToString());
            }

            if (!string.IsNullOrWhiteSpace(Location))
            {
                dictionary.Add("location", Location);
            }

            if (MinimumGroups.HasValue)
            {
                dictionary.Add("min_groups", MinimumGroups.Value.ToString());
            }

            if (MilesRadius.HasValue)
            {
                dictionary.Add("radius", MilesRadius.ToString());
            }

            if (UsedBetween != null)
            {
                dictionary.Add("used_between", UsedBetween.ToUrl);
            }

            if (!string.IsNullOrWhiteSpace(Zip))
            {
                dictionary.Add("zip", Zip);
            }

            AddPagination(dictionary);

            return(dictionary);
        }