Пример #1
0
        /// <summary>
        /// Returns true if CancelPaymentResponse instances are equal
        /// </summary>
        /// <param name="other">Instance of CancelPaymentResponse to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CancelPaymentResponse other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     CardPaymentMethodSpecificOutput == other.CardPaymentMethodSpecificOutput ||
                     CardPaymentMethodSpecificOutput != null &&
                     CardPaymentMethodSpecificOutput.Equals(other.CardPaymentMethodSpecificOutput)
                     ) &&
                 (
                     MobilePaymentMethodSpecificOutput == other.MobilePaymentMethodSpecificOutput ||
                     MobilePaymentMethodSpecificOutput != null &&
                     MobilePaymentMethodSpecificOutput.Equals(other.MobilePaymentMethodSpecificOutput)
                 ) &&
                 (
                     Payment == other.Payment ||
                     Payment != null &&
                     Payment.Equals(other.Payment)
                 ));
        }
Пример #2
0
        /// <summary>
        /// Returns true if CaptureOutput instances are equal
        /// </summary>
        /// <param name="other">Instance of CaptureOutput to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CaptureOutput other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     CardPaymentMethodSpecificOutput == other.CardPaymentMethodSpecificOutput ||
                     CardPaymentMethodSpecificOutput != null &&
                     CardPaymentMethodSpecificOutput.Equals(other.CardPaymentMethodSpecificOutput)
                     ) &&
                 (
                     MobilePaymentMethodSpecificOutput == other.MobilePaymentMethodSpecificOutput ||
                     MobilePaymentMethodSpecificOutput != null &&
                     MobilePaymentMethodSpecificOutput.Equals(other.MobilePaymentMethodSpecificOutput)
                 ) &&
                 (
                     PaymentMethod == other.PaymentMethod ||
                     PaymentMethod != null &&
                     PaymentMethod.Equals(other.PaymentMethod)
                 ) &&
                 (
                     RedirectPaymentMethodSpecificOutput == other.RedirectPaymentMethodSpecificOutput ||
                     RedirectPaymentMethodSpecificOutput != null &&
                     RedirectPaymentMethodSpecificOutput.Equals(other.RedirectPaymentMethodSpecificOutput)
                 ));
        }