/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (CardRefundMethodSpecificOutput != null) { hashCode = hashCode * 59 + CardRefundMethodSpecificOutput.GetHashCode(); } if (MobileRefundMethodSpecificOutput != null) { hashCode = hashCode * 59 + MobileRefundMethodSpecificOutput.GetHashCode(); } if (EWalletRefundMethodSpecificOutput != null) { hashCode = hashCode * 59 + EWalletRefundMethodSpecificOutput.GetHashCode(); } if (PaymentMethod != null) { hashCode = hashCode * 59 + PaymentMethod.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if RefundOutput instances are equal /// </summary> /// <param name="other">Instance of RefundOutput to be compared</param> /// <returns>Boolean</returns> public bool Equals(RefundOutput other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( CardRefundMethodSpecificOutput == other.CardRefundMethodSpecificOutput || CardRefundMethodSpecificOutput != null && CardRefundMethodSpecificOutput.Equals(other.CardRefundMethodSpecificOutput) ) && ( MobileRefundMethodSpecificOutput == other.MobileRefundMethodSpecificOutput || MobileRefundMethodSpecificOutput != null && MobileRefundMethodSpecificOutput.Equals(other.MobileRefundMethodSpecificOutput) ) && ( EWalletRefundMethodSpecificOutput == other.EWalletRefundMethodSpecificOutput || EWalletRefundMethodSpecificOutput != null && EWalletRefundMethodSpecificOutput.Equals(other.EWalletRefundMethodSpecificOutput) ) && ( PaymentMethod == other.PaymentMethod || PaymentMethod != null && PaymentMethod.Equals(other.PaymentMethod) )); }