Esempio n. 1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is Merchant other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((BusinessName == null && other.BusinessName == null) || (BusinessName?.Equals(other.BusinessName) == true)) &&
                   ((Country == null && other.Country == null) || (Country?.Equals(other.Country) == true)) &&
                   ((LanguageCode == null && other.LanguageCode == null) || (LanguageCode?.Equals(other.LanguageCode) == true)) &&
                   ((Currency == null && other.Currency == null) || (Currency?.Equals(other.Currency) == true)) &&
                   ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) &&
                   ((MainLocationId == null && other.MainLocationId == null) || (MainLocationId?.Equals(other.MainLocationId) == true)));
        }
Esempio n. 2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is Location other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((Address == null && other.Address == null) || (Address?.Equals(other.Address) == true)) &&
                   ((Timezone == null && other.Timezone == null) || (Timezone?.Equals(other.Timezone) == true)) &&
                   ((Capabilities == null && other.Capabilities == null) || (Capabilities?.Equals(other.Capabilities) == true)) &&
                   ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((MerchantId == null && other.MerchantId == null) || (MerchantId?.Equals(other.MerchantId) == true)) &&
                   ((Country == null && other.Country == null) || (Country?.Equals(other.Country) == true)) &&
                   ((LanguageCode == null && other.LanguageCode == null) || (LanguageCode?.Equals(other.LanguageCode) == true)) &&
                   ((Currency == null && other.Currency == null) || (Currency?.Equals(other.Currency) == true)) &&
                   ((PhoneNumber == null && other.PhoneNumber == null) || (PhoneNumber?.Equals(other.PhoneNumber) == true)) &&
                   ((BusinessName == null && other.BusinessName == null) || (BusinessName?.Equals(other.BusinessName) == true)) &&
                   ((Type == null && other.Type == null) || (Type?.Equals(other.Type) == true)) &&
                   ((WebsiteUrl == null && other.WebsiteUrl == null) || (WebsiteUrl?.Equals(other.WebsiteUrl) == true)) &&
                   ((BusinessHours == null && other.BusinessHours == null) || (BusinessHours?.Equals(other.BusinessHours) == true)) &&
                   ((BusinessEmail == null && other.BusinessEmail == null) || (BusinessEmail?.Equals(other.BusinessEmail) == true)) &&
                   ((Description == null && other.Description == null) || (Description?.Equals(other.Description) == true)) &&
                   ((TwitterUsername == null && other.TwitterUsername == null) || (TwitterUsername?.Equals(other.TwitterUsername) == true)) &&
                   ((InstagramUsername == null && other.InstagramUsername == null) || (InstagramUsername?.Equals(other.InstagramUsername) == true)) &&
                   ((FacebookUrl == null && other.FacebookUrl == null) || (FacebookUrl?.Equals(other.FacebookUrl) == true)) &&
                   ((Coordinates == null && other.Coordinates == null) || (Coordinates?.Equals(other.Coordinates) == true)) &&
                   ((LogoUrl == null && other.LogoUrl == null) || (LogoUrl?.Equals(other.LogoUrl) == true)) &&
                   ((PosBackgroundUrl == null && other.PosBackgroundUrl == null) || (PosBackgroundUrl?.Equals(other.PosBackgroundUrl) == true)) &&
                   ((Mcc == null && other.Mcc == null) || (Mcc?.Equals(other.Mcc) == true)) &&
                   ((FullFormatLogoUrl == null && other.FullFormatLogoUrl == null) || (FullFormatLogoUrl?.Equals(other.FullFormatLogoUrl) == true)));
        }
        /// <summary>
        /// Returns true if CommonOrganisation instances are equal
        /// </summary>
        /// <param name="other">Instance of CommonOrganisation to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CommonOrganisation other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     LastUpdateTime == other.LastUpdateTime ||
                     LastUpdateTime != null &&
                     LastUpdateTime.Equals(other.LastUpdateTime)
                     ) &&
                 (
                     AgentFirstName == other.AgentFirstName ||
                     AgentFirstName != null &&
                     AgentFirstName.Equals(other.AgentFirstName)
                 ) &&
                 (
                     AgentLastName == other.AgentLastName ||
                     AgentLastName != null &&
                     AgentLastName.Equals(other.AgentLastName)
                 ) &&
                 (
                     AgentRole == other.AgentRole ||
                     AgentRole != null &&
                     AgentRole.Equals(other.AgentRole)
                 ) &&
                 (
                     BusinessName == other.BusinessName ||
                     BusinessName != null &&
                     BusinessName.Equals(other.BusinessName)
                 ) &&
                 (
                     LegalName == other.LegalName ||
                     LegalName != null &&
                     LegalName.Equals(other.LegalName)
                 ) &&
                 (
                     ShortName == other.ShortName ||
                     ShortName != null &&
                     ShortName.Equals(other.ShortName)
                 ) &&
                 (
                     Abn == other.Abn ||
                     Abn != null &&
                     Abn.Equals(other.Abn)
                 ) &&
                 (
                     Acn == other.Acn ||
                     Acn != null &&
                     Acn.Equals(other.Acn)
                 ) &&
                 (
                     IsACNCRegistered == other.IsACNCRegistered ||
                     IsACNCRegistered != null &&
                     IsACNCRegistered.Equals(other.IsACNCRegistered)
                 ) &&
                 (
                     IndustryCode == other.IndustryCode ||
                     IndustryCode != null &&
                     IndustryCode.Equals(other.IndustryCode)
                 ) &&
                 (
                     OrganisationType == other.OrganisationType ||
                     OrganisationType != null &&
                     OrganisationType.Equals(other.OrganisationType)
                 ) &&
                 (
                     RegisteredCountry == other.RegisteredCountry ||
                     RegisteredCountry != null &&
                     RegisteredCountry.Equals(other.RegisteredCountry)
                 ) &&
                 (
                     EstablishmentDate == other.EstablishmentDate ||
                     EstablishmentDate != null &&
                     EstablishmentDate.Equals(other.EstablishmentDate)
                 ));
        }