Class TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder
java.lang.Object
com.caplin.generated.motif.mm.tradeconfirmation.TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder
- Enclosing class:
- TradeConfPartsDef.SalesCommonTradeConfirmationFields
public static final class TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder
extends Object
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
setDisplayFields
(@NotNull DisplayFields displayFields) setDisplayFields
(@NotNull String displayFields) setInterestMargin
(@NotNull String interestMargin) setInterestMargin
(@NotNull String interestMargin, boolean isEditable) setInterestMargin
(@NotNull BigDecimal interestMargin) setInterestMargin
(@NotNull BigDecimal interestMargin, boolean isEditable) setProfit
(@NotNull BigDecimal profit) setProfitCurrency
(@NotNull String profitCurrency) setProfitCurrencyDPS
(int profitCurrencyDPS) setProfitCurrencyDPS
(@NotNull String profitCurrencyDPS) setProfitIsHouse
(boolean profitIsHouse) setProfitIsHouse
(@NotNull String profitIsHouse) setProfitRate
(@NotNull String profitRate) setProfitRate
(@NotNull BigDecimal profitRate) setReasons
(@NotNull DisplayFields reasons) setReasons
(@NotNull String reasons) setStreamingMode
(@NotNull String streamingMode) setTraderInterestRate
(@NotNull String traderInterestRate) setTraderInterestRate
(@NotNull BigDecimal traderInterestRate) setTradeStatus
(@NotNull String tradeStatus) @NotNull String
toString()
-
Method Details
-
addField
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder addField(@NotNull @NotNull String key, @NotNull @NotNull String value) -
build
-
toString
-
setTraderInterestRate
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setTraderInterestRate(@NotNull @NotNull BigDecimal traderInterestRate) - Returns:
- Interest rate on the given PrincipalAmount with no client margin applied to it.
-
setTraderInterestRate
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setTraderInterestRate(@NotNull @NotNull String traderInterestRate) - Returns:
- Interest rate on the given PrincipalAmount with no client margin applied to it.
-
setInterestMargin
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setInterestMargin(@NotNull @NotNull BigDecimal interestMargin, boolean isEditable) - Returns:
- Interest margin on the given InterestRate.
-
setInterestMargin
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setInterestMargin(@NotNull @NotNull BigDecimal interestMargin) - Returns:
- Interest margin on the given InterestRate.
-
setInterestMargin
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setInterestMargin(@NotNull @NotNull String interestMargin, boolean isEditable) - Returns:
- Interest margin on the given InterestRate.
-
setInterestMargin
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setInterestMargin(@NotNull @NotNull String interestMargin) - Returns:
- Interest margin on the given InterestRate.
-
setInterestMarginEditable
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setInterestMarginEditable() -
setStreamingMode
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setStreamingMode(@NotNull @NotNull String streamingMode) - Parameters:
streamingMode
- e.g. MANUAL, STREAMING- Returns:
- Indicates whether the rates/margins of this trade have been manually set
-
setProfit
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setProfit(@NotNull @NotNull BigDecimal profit) - Returns:
- The sales profit in the specified currency.
-
setProfit
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setProfit(@NotNull @NotNull String profit) - Returns:
- The sales profit in the specified currency.
-
setProfitCurrency
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setProfitCurrency(@NotNull @NotNull String profitCurrency) - Parameters:
profitCurrency
- e.g. USD- Returns:
- The profit currency that the ProfitRate is being provided for.
-
setProfitCurrencyDPS
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setProfitCurrencyDPS(int profitCurrencyDPS) - Parameters:
profitCurrencyDPS
- e.g. 2- Returns:
- The number of decimal places that should be used for formatting the amount in profit currency field.
-
setProfitCurrencyDPS
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setProfitCurrencyDPS(@NotNull @NotNull String profitCurrencyDPS) - Parameters:
profitCurrencyDPS
- e.g. 2- Returns:
- The number of decimal places that should be used for formatting the amount in profit currency field.
-
setProfitIsHouse
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setProfitIsHouse(boolean profitIsHouse) - Returns:
- Whether the field ProfitCurrency is the system/house currency or not.
-
setProfitIsHouse
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setProfitIsHouse(@NotNull @NotNull String profitIsHouse) - Returns:
- Whether the field ProfitCurrency is the system/house currency or not.
-
setProfitRate
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setProfitRate(@NotNull @NotNull BigDecimal profitRate) - Returns:
- The conversion rate between the contra currency and the profit currency. This can be used for entering profit in an amount of settlement currency.
-
setProfitRate
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setProfitRate(@NotNull @NotNull String profitRate) - Returns:
- The conversion rate between the contra currency and the profit currency. This can be used for entering profit in an amount of settlement currency.
-
setTradeStatus
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setTradeStatus(@NotNull @NotNull String tradeStatus) - Parameters:
tradeStatus
- e.g. AWAITING-PRICE- Returns:
- The current status of the trade. Supported types are [AWAITING-TRADER, AWAITING-PRICE, PRICED, EXECUTING, CLOSED, REJECTED, ERRORED, COMPLETED]. CLOSED means the client cancelled the trade request, REJECTED indicates it was rejected by the dealer.
-
setReasons
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setReasons(@NotNull @NotNull String reasons) - Parameters:
reasons
- e.g. method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultReasonsHeaderDisplayFields','name':'addDefaultReasonsHeaderDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}- Returns:
- A JSON structure containing all the reasons and information about why the trade requires intervention. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.
-
setReasons
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setReasons(@NotNull @NotNull DisplayFields reasons) - Parameters:
reasons
- e.g. method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultReasonsHeaderDisplayFields','name':'addDefaultReasonsHeaderDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}- Returns:
- A JSON structure containing all the reasons and information about why the trade requires intervention. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.
-
setDisplayFields
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setDisplayFields(@NotNull @NotNull String displayFields) - Parameters:
displayFields
- e.g. method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultMMTermSummaryDisplayFields','name':'addDefaultMMTermSummaryDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}- Returns:
- Configuration for a frontend to display label-value pairs. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.
-
setDisplayFields
@NotNull public @NotNull TradeConfPartsDef.SalesCommonTradeConfirmationFields.Builder setDisplayFields(@NotNull @NotNull DisplayFields displayFields) - Parameters:
displayFields
- e.g. method={'import':'static com.caplin.motif.mm.config.DefaultDisplayFields.addDefaultMMTermSummaryDisplayFields','name':'addDefaultMMTermSummaryDisplayFields','comment':'See DefaultDisplayFields javadoc for parameters and available builder methods.'}- Returns:
- Configuration for a frontend to display label-value pairs. Use DefaultDisplayFields builders to provide Caplin default and/or custom fields.
-