/// <summary> /// Returns true if PaymentResponse instances are equal /// </summary> /// <param name="other">Instance of PaymentResponse to be compared</param> /// <returns>Boolean</returns> public bool Equals(PaymentResponse other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( ActionId == other.ActionId || ActionId != null && ActionId.Equals(other.ActionId) ) && ( Amount == other.Amount || Amount != null && Amount.Equals(other.Amount) ) && ( Currency == other.Currency || Currency != null && Currency.Equals(other.Currency) ) && ( Approved == other.Approved || Approved != null && Approved.Equals(other.Approved) ) && ( Status == other.Status || Status != null && Status.Equals(other.Status) ) && ( AuthCode == other.AuthCode || AuthCode != null && AuthCode.Equals(other.AuthCode) ) && ( ResponseCode == other.ResponseCode || ResponseCode != null && ResponseCode.Equals(other.ResponseCode) ) && ( ResponseSummary == other.ResponseSummary || ResponseSummary != null && ResponseSummary.Equals(other.ResponseSummary) ) && ( ThreeDS == other.ThreeDS || ThreeDS != null && ThreeDS.Equals(other.ThreeDS) ) && ( Risk == other.Risk || Risk != null && Risk.Equals(other.Risk) ) && ( Source == other.Source || Source != null && Source.Equals(other.Source) ) && ( Customer == other.Customer || Customer != null && Customer.Equals(other.Customer) ) && ( ProcessedOn == other.ProcessedOn || ProcessedOn != null && ProcessedOn.Equals(other.ProcessedOn) ) && ( Reference == other.Reference || Reference != null && Reference.Equals(other.Reference) ) && ( Eci == other.Eci || Eci != null && Eci.Equals(other.Eci) ) && ( SchemeId == other.SchemeId || SchemeId != null && SchemeId.Equals(other.SchemeId) ) && ( Links == other.Links || Links != null && Links.Equals(other.Links) )); }
public override bool Equals(object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } var alertToComplete = (Alert)obj; if (AlertMessage == null) { if (alertToComplete.AlertMessage != null) { return(false); } } else if (!AlertMessage.Equals(alertToComplete.AlertMessage)) { return(false); } if (!Risk.Equals(alertToComplete.Risk)) { return(false); } if (!Confidence.Equals(alertToComplete.Confidence)) { return(false); } if (Url == null) { if (alertToComplete.Url != null) { return(false); } } else if (!Url.Equals(alertToComplete.Url)) { return(false); } if (Other == null) { if (alertToComplete.Other != null) { return(false); } } else if (!Other.Equals(alertToComplete.Other)) { return(false); } if (Parameter == null) { if (alertToComplete.Parameter != null) { return(false); } } else if (!Parameter.Equals(alertToComplete.Parameter)) { return(false); } if (Attack == null) { if (alertToComplete.Attack != null) { return(false); } } else if (!Attack.Equals(alertToComplete.Attack)) { return(false); } if (Evidence == null) { if (alertToComplete.Evidence != null) { return(false); } } else if (!Evidence.Equals(alertToComplete.Evidence)) { return(false); } if (Description == null) { if (alertToComplete.Description != null) { return(false); } } else if (!Description.Equals(alertToComplete.Description)) { return(false); } if (Reference == null) { if (alertToComplete.Reference != null) { return(false); } } else if (!Reference.Equals(alertToComplete.Reference)) { return(false); } if (Solution == null) { if (alertToComplete.Solution != null) { return(false); } } else if (!Solution.Equals(alertToComplete.Solution)) { return(false); } if (CweId != alertToComplete.CweId) { return(false); } if (WascId != alertToComplete.WascId) { return(false); } return(true); }
/// <summary> /// Returns true if Payment instances are equal /// </summary> /// <param name="other">Instance of Payment to be compared</param> /// <returns>Boolean</returns> public bool Equals(PaymentDetails other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( RequestedOn == other.RequestedOn || RequestedOn != null && RequestedOn.Equals(other.RequestedOn) ) && ( Source == other.Source || Source != null && Source.Equals(other.Source) ) && ( Destination == other.Destination || Destination != null && Destination.Equals(other.Destination) ) && ( Amount == other.Amount || Amount != null && Amount.Equals(other.Amount) ) && ( Currency == other.Currency || Currency != null && Currency.Equals(other.Currency) ) && ( PaymentType == other.PaymentType || PaymentType != null && PaymentType.Equals(other.PaymentType) ) && ( Reference == other.Reference || Reference != null && Reference.Equals(other.Reference) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( Approved == other.Approved || Approved != null && Approved.Equals(other.Approved) ) && ( Status == other.Status || Status != null && Status.Equals(other.Status) ) && ( ThreeDS == other.ThreeDS || ThreeDS != null && ThreeDS.Equals(other.ThreeDS) ) && ( Risk == other.Risk || Risk != null && Risk.Equals(other.Risk) ) && ( Customer == other.Customer || Customer != null && Customer.Equals(other.Customer) ) && ( BillingDescriptor == other.BillingDescriptor || BillingDescriptor != null && BillingDescriptor.Equals(other.BillingDescriptor) ) && ( Shipping == other.Shipping || Shipping != null && Shipping.Equals(other.Shipping) ) && ( PaymentIp == other.PaymentIp || PaymentIp != null && PaymentIp.Equals(other.PaymentIp) ) && ( Eci == other.Eci || Eci != null && Eci.Equals(other.Eci) ) && ( SchemeId == other.SchemeId || SchemeId != null && SchemeId.Equals(other.SchemeId) ) && ( Links == other.Links || Links != null && Links.Equals(other.Links) )); }
/// <summary> /// Returns true if PaymentRequest instances are equal /// </summary> /// <param name="other">Instance of PaymentRequest to be compared</param> /// <returns>Boolean</returns> public bool Equals(PaymentRequest <TPaymentSource> other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Source == other.Source || Source != null && Source.Equals(other.Source) ) && ( Amount == other.Amount || Amount != null && Amount.Equals(other.Amount) ) && ( Currency == other.Currency || Currency != null && Currency.Equals(other.Currency) ) && ( PaymentType == other.PaymentType || PaymentType != null && PaymentType.Equals(other.PaymentType) ) && ( Reference == other.Reference || Reference != null && Reference.Equals(other.Reference) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( Customer == other.Customer || Customer != null && Customer.Equals(other.Customer) ) && ( BillingDescriptor == other.BillingDescriptor || BillingDescriptor != null && BillingDescriptor.Equals(other.BillingDescriptor) ) && ( Shipping == other.Shipping || Shipping != null && Shipping.Equals(other.Shipping) ) && ( ThreeDS == other.ThreeDS || ThreeDS != null && ThreeDS.Equals(other.ThreeDS) ) && ( PreviousPaymentId == other.PreviousPaymentId || PreviousPaymentId != null && PreviousPaymentId.Equals(other.PreviousPaymentId) ) && ( Risk == other.Risk || Risk != null && Risk.Equals(other.Risk) ) && ( SuccessUrl == other.SuccessUrl || SuccessUrl != null && SuccessUrl.Equals(other.SuccessUrl) ) && ( FailureUrl == other.FailureUrl || FailureUrl != null && FailureUrl.Equals(other.FailureUrl) ) && ( PaymentIp == other.PaymentIp || PaymentIp != null && PaymentIp.Equals(other.PaymentIp) )); }