diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/DiscountSpec.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/DiscountSpec.java index a1b58e9cc..2d6865681 100644 --- a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/DiscountSpec.java +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/DiscountSpec.java @@ -6,6 +6,8 @@ public class DiscountSpec { private BigDecimal buyDiscount; private BigDecimal sellDiscount; + private BigDecimal buyFixedFeeDiscount; + private BigDecimal sellFixedFeeDiscount; private Date validityFrom; private Date validityTill; private Long maximumUsages; @@ -19,6 +21,60 @@ public class DiscountSpec { private String notes; /** + * Creates Discount Specification. + * + * @param buyDiscount + * @param sellDiscount + * @param buyFixedFeeDiscount The percentage discount applied to the fixed fee on purchase transactions + * A value of 10 would represent a 10% discount on the fixed fee for buying. + * @param sellFixedFeeDiscount The percentage discount applied to the fixed fee on sale transactions + * A value of 10 would represent a 10% discount on the fixed fee for selling. + * @param validityFrom + * @param validityTill + * @param maximumUsages + * @param maximumUsagesPerIdentity + * @param minimumTransactionAmount + * @param totalLimit + * @param fiatCurrency in which currency are limit amounts + * @param firstTransactionOnly + * @param code (Optional) Defined code to be used (upper-cased) or null for code to be generated. + * @param linkedIdentityPublicId (Optional) Public ID of an existing identity to be linked to the Discount. + * @param notes (Optional) Notes worth noting. + */ + public DiscountSpec(BigDecimal buyDiscount, + BigDecimal sellDiscount, + BigDecimal buyFixedFeeDiscount, + BigDecimal sellFixedFeeDiscount, + Date validityFrom, + Date validityTill, + Long maximumUsages, + Long maximumUsagesPerIdentity, + BigDecimal minimumTransactionAmount, + BigDecimal totalLimit, + String fiatCurrency, + boolean firstTransactionOnly, + String code, + String linkedIdentityPublicId, + String notes) { + this.buyDiscount = buyDiscount; + this.sellDiscount = sellDiscount; + this.buyFixedFeeDiscount = buyFixedFeeDiscount; + this.sellFixedFeeDiscount = sellFixedFeeDiscount; + this.validityFrom = validityFrom; + this.validityTill = validityTill; + this.maximumUsages = maximumUsages; + this.maximumUsagesPerIdentity = maximumUsagesPerIdentity; + this.minimumTransactionAmount = minimumTransactionAmount; + this.totalLimit = totalLimit; + this.fiatCurrency = fiatCurrency; + this.firstTransactionOnly = firstTransactionOnly; + this.code = code; + this.linkedIdentityPublicId = linkedIdentityPublicId; + this.notes = notes; + } + + /** + * @deprecated Use first constructor instead. * Creates Discount Specification. * * @param buyDiscount @@ -34,7 +90,9 @@ public class DiscountSpec { * @param code (Optional) Defined code to be used (upper-cased) or null for code to be generated. * @param linkedIdentityPublicId (Optional) Public ID of an existing identity to be linked to the Discount. * @param notes (Optional) Notes worth noting. + * */ + @Deprecated public DiscountSpec(BigDecimal buyDiscount, BigDecimal sellDiscount, Date validityFrom, Date validityTill, Long maximumUsages, Long maximumUsagesPerIdentity, BigDecimal minimumTransactionAmount, BigDecimal totalLimit, String fiatCurrency, boolean firstTransactionOnly, String code, String linkedIdentityPublicId, String notes) { this.buyDiscount = buyDiscount; this.sellDiscount = sellDiscount; @@ -67,6 +125,22 @@ public void setSellDiscount(BigDecimal sellDiscount) { this.sellDiscount = sellDiscount; } + public BigDecimal getBuyFixedFeeDiscount() { + return buyFixedFeeDiscount; + } + + public void setBuyFixedFeeDiscount(BigDecimal buyFixedFeeDiscount) { + this.buyFixedFeeDiscount = buyFixedFeeDiscount; + } + + public BigDecimal getSellFixedFeeDiscount() { + return sellFixedFeeDiscount; + } + + public void setSellFixedFeeDiscount(BigDecimal sellFixedFeeDiscount) { + this.sellFixedFeeDiscount = sellFixedFeeDiscount; + } + public Date getValidityFrom() { return validityFrom; }