C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
FixedExpense.cs
Go to the documentation of this file.
1using System;
2using System.Runtime.Serialization;
4
5namespace AnalyzeRe.Fees
6{
8 public class FixedExpense : Fee, IEquatable<FixedExpense>
9 {
11 [DataMember(Order = 20)]
12 [NotNull]
13 public MonetaryUnit amount { get; set; }
14
15 #region Equality Overrides
17 public bool Equals(FixedExpense other) => ReferenceEquals(this, other) ||
18 other != null &&
19 base.Equals((Fee)other) &&
20 amount.Equals(other.amount);
21
23 public override bool Equals(object obj) =>
24 obj is FixedExpense fixedExpense && Equals(fixedExpense);
25
27 public override int GetHashCode()
28 {
29 return base.GetHashCode() + 23 * amount.GetHashCode();
30 }
31 #endregion Equality Overrides
32 }
33}
Abstract representation of a fee. This resource type cannot be instantiated instead derived resource ...
Definition Fee.cs:14
The Fixed Expense Fee applies the payout amount to all trials.
override bool Equals(object obj)
MonetaryUnit amount
The expense amount.
bool Equals(FixedExpense other)
Representation of a monetary value with a currency.
bool Equals(MonetaryUnit other)
Determine if this MonetaryUnit is equivalent to another.
override int GetHashCode()
Get the HashCode for this MonetaryUnit.