/// <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 (TotalAmountPaid != null) { hashCode = hashCode * 59 + TotalAmountPaid.GetHashCode(); } if (TotalAmountRefunded != null) { hashCode = hashCode * 59 + TotalAmountRefunded.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if RefundMethodSpecificOutput instances are equal /// </summary> /// <param name="other">Instance of RefundMethodSpecificOutput to be compared</param> /// <returns>Boolean</returns> public bool Equals(RefundMethodSpecificOutput other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( TotalAmountPaid == other.TotalAmountPaid || TotalAmountPaid != null && TotalAmountPaid.Equals(other.TotalAmountPaid) ) && ( TotalAmountRefunded == other.TotalAmountRefunded || TotalAmountRefunded != null && TotalAmountRefunded.Equals(other.TotalAmountRefunded) )); }