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