/// <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 (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Currency != null) { hashCode = hashCode * 59 + Currency.GetHashCode(); } if (CurrencySign != null) { hashCode = hashCode * 59 + CurrencySign.GetHashCode(); } if (Config != null) { hashCode = hashCode * 59 + Config.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.currencyCode) { hashcode = (hashcode * 397) + CurrencyCode.GetHashCode(); } if (__isset.currencyName) { hashcode = (hashcode * 397) + CurrencyName.GetHashCode(); } if (__isset.currencySign) { hashcode = (hashcode * 397) + CurrencySign.GetHashCode(); } if (__isset.preferred) { hashcode = (hashcode * 397) + Preferred.GetHashCode(); } if (__isset.coinRate) { hashcode = (hashcode * 397) + CoinRate.GetHashCode(); } if (__isset.creditRate) { hashcode = (hashcode * 397) + CreditRate.GetHashCode(); } } return(hashcode); }
public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.payDate) { hashcode = (hashcode * 397) + PayDate.GetHashCode(); } if (__isset.coinBalance) { hashcode = (hashcode * 397) + CoinBalance.GetHashCode(); } if (__isset.coin) { hashcode = (hashcode * 397) + Coin.GetHashCode(); } if (__isset.price) { hashcode = (hashcode * 397) + Price.GetHashCode(); } if (__isset.title) { hashcode = (hashcode * 397) + Title.GetHashCode(); } if (__isset.refund) { hashcode = (hashcode * 397) + Refund.GetHashCode(); } if (__isset.paySeq) { hashcode = (hashcode * 397) + PaySeq.GetHashCode(); } if (__isset.currency) { hashcode = (hashcode * 397) + Currency.GetHashCode(); } if (__isset.currencySign) { hashcode = (hashcode * 397) + CurrencySign.GetHashCode(); } if (__isset.displayPrice) { hashcode = (hashcode * 397) + DisplayPrice.GetHashCode(); } if (__isset.payload) { hashcode = (hashcode * 397) + Payload.GetHashCode(); } if (__isset.channelId) { hashcode = (hashcode * 397) + ChannelId.GetHashCode(); } } return(hashcode); }
public HttpResponseMessage Post(CurrencySign currencySign) { if (ModelState.IsValid) { service.Insert(currencySign); return(new HttpResponseMessage(HttpStatusCode.OK)); } else { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } }
/// <summary> /// Returns true if Account instances are equal /// </summary> /// <param name="other">Instance of Account to be compared</param> /// <returns>Boolean</returns> public bool Equals(Account other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Currency == other.Currency || Currency != null && Currency.Equals(other.Currency) ) && ( CurrencySign == other.CurrencySign || CurrencySign != null && CurrencySign.Equals(other.CurrencySign) ) && ( Config == other.Config || Config != null && Config.Equals(other.Config) )); }
public override string ToString() { var sb = new StringBuilder("CoinHistory("); bool __first = true; if (__isset.payDate) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PayDate: "); PayDate.ToString(sb); } if (__isset.coinBalance) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CoinBalance: "); CoinBalance.ToString(sb); } if (__isset.coin) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Coin: "); Coin.ToString(sb); } if (Price != null && __isset.price) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Price: "); Price.ToString(sb); } if (Title != null && __isset.title) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Title: "); Title.ToString(sb); } if (__isset.refund) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Refund: "); Refund.ToString(sb); } if (PaySeq != null && __isset.paySeq) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PaySeq: "); PaySeq.ToString(sb); } if (Currency != null && __isset.currency) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Currency: "); Currency.ToString(sb); } if (CurrencySign != null && __isset.currencySign) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CurrencySign: "); CurrencySign.ToString(sb); } if (DisplayPrice != null && __isset.displayPrice) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("DisplayPrice: "); DisplayPrice.ToString(sb); } if (Payload != null && __isset.payload) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Payload: "); Payload.ToString(sb); } if (ChannelId != null && __isset.channelId) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("ChannelId: "); ChannelId.ToString(sb); } sb.Append(")"); return(sb.ToString()); }
public override string ToString() { var sb = new StringBuilder("PaidCallCurrencyExchangeRate("); bool __first = true; if (CurrencyCode != null && __isset.currencyCode) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CurrencyCode: "); CurrencyCode.ToString(sb); } if (CurrencyName != null && __isset.currencyName) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CurrencyName: "); CurrencyName.ToString(sb); } if (CurrencySign != null && __isset.currencySign) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CurrencySign: "); CurrencySign.ToString(sb); } if (__isset.preferred) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Preferred: "); Preferred.ToString(sb); } if (CoinRate != null && __isset.coinRate) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CoinRate: "); CoinRate.ToString(sb); } if (CreditRate != null && __isset.creditRate) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CreditRate: "); CreditRate.ToString(sb); } sb.Append(")"); return(sb.ToString()); }