/// <summary>
        /// Returns true if SessionResponse instances are equal
        /// </summary>
        /// <param name="other">Instance of SessionResponse to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SessionResponse other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     AssetUrl == other.AssetUrl ||
                     AssetUrl != null &&
                     AssetUrl.Equals(other.AssetUrl)
                     ) &&
                 (
                     ClientApiUrl == other.ClientApiUrl ||
                     ClientApiUrl != null &&
                     ClientApiUrl.Equals(other.ClientApiUrl)
                 ) &&
                 (
                     ClientSessionId == other.ClientSessionId ||
                     ClientSessionId != null &&
                     ClientSessionId.Equals(other.ClientSessionId)
                 ) &&
                 (
                     CustomerId == other.CustomerId ||
                     CustomerId != null &&
                     CustomerId.Equals(other.CustomerId)
                 ) &&
                 (
                     InvalidTokens == other.InvalidTokens ||
                     InvalidTokens != null &&
                     InvalidTokens.SequenceEqual(other.InvalidTokens)
                 ) &&
                 (
                     Region == other.Region ||
                     Region != null &&
                     Region.Equals(other.Region)
                 ));
        }
예제 #2
0
        /// <summary>
        /// Returns true if CreateHostedCheckoutResponse instances are equal
        /// </summary>
        /// <param name="other">Instance of CreateHostedCheckoutResponse to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CreateHostedCheckoutResponse other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Returnmac == other.Returnmac ||
                     Returnmac != null &&
                     Returnmac.Equals(other.Returnmac)
                     ) &&
                 (
                     HostedCheckoutId == other.HostedCheckoutId ||
                     HostedCheckoutId != null &&
                     HostedCheckoutId.Equals(other.HostedCheckoutId)
                 ) &&
                 (
                     InvalidTokens == other.InvalidTokens ||
                     InvalidTokens != null &&
                     InvalidTokens.SequenceEqual(other.InvalidTokens)
                 ) &&
                 (
                     MerchantReference == other.MerchantReference ||
                     MerchantReference != null &&
                     MerchantReference.Equals(other.MerchantReference)
                 ) &&
                 (
                     PartialRedirectUrl == other.PartialRedirectUrl ||
                     PartialRedirectUrl != null &&
                     PartialRedirectUrl.Equals(other.PartialRedirectUrl)
                 ));
        }