/// <summary>
 /// Creates a new <see cref="OrderCharge"/> object.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="amount"></param>
 /// <param name="baseChargeName"></param>
 public OrderCharge(
     ChargeName name,
     Price amount,
     ChargeName baseChargeName,
     bool inputCharge = false)
 {
     ChargeName     = name;
     ChargeAmount   = amount;
     BaseChargeName = baseChargeName;
     InputCharge    = inputCharge;
 }
 public ReverseRate(ChargeName name, ChargeName parentChargeName, Rate rate)
 {
     ChargeName     = name;
     BaseChargeName = parentChargeName;
     Rate           = rate;
 }
Beispiel #3
0
 /// <summary>
 /// Generates a charge name from another charge name. For example, VatOnFee.
 /// </summary>
 /// <param name="chargeName"></param>
 /// <param name="baseChargeName"></param>
 /// <returns></returns>
 public static ChargeName FromBaseChargeName(ChargeName chargeName, ChargeName baseChargeName)
 => new ChargeName($"{chargeName}On{baseChargeName}");