Caplin FXIntegrationAPI Documentation - Version 8.5.0

Message Builder Example - SalesQuote

package com.caplin.examples.fxapi.generated.motif.mm.rates.QuoteTypesDef; 

import java.math.BigInteger;
import static com.caplin.motif.fx.config.DefaultDisplayFields.addDefaultSalesAllocationDetailsUpdateFields;

import com.caplin.generated.motif.mm.rates.QuotePartsDef;
import com.caplin.generated.motif.mm.rates.QuoteTypesDef;

public class SalesQuoteExample {
    public static void main(String[] args) {
                    		
		QuoteTypesDef.SalesQuote salesQuote =
		QuoteTypesDef.SalesQuote
			.newBuilder()
			.setQuote(
			QuoteTypesDef.Quote
				.newBuilder()
				.setCommonFields(
				QuotePartsDef.CommonFields
					.newBuilder()
					.setDepositClientInterestRate(BigDecimal.valueOf(0.0))
					.setDepositInterestAmount("")
					.setDepositInterestRate(BigDecimal.valueOf(0.0))
					.setDepositPrincipalPlusInterest(BigDecimal.valueOf(0.0))
					.setDepositQuoteID("")
					.setInterestRateDPS("")
					.setLoanInterestAmount(BigDecimal.valueOf(0.0))
					.setLoanInterestRate("")
					.setLoanPrincipalPlusInterest("")
					.setLoanQuoteID("")
					.setOverallTimeout(0)
					.setRemainingTimeOutMillis("")
					.build())
				.build())
			.setSalesCommonFields(
			QuotePartsDef.SalesCommonFields
				.newBuilder()
				.setDisplayFields(addDefaultSalesAllocationDetailsUpdateFields(/* See DefaultDisplayFields javadoc for parameters and available builder methods. */))
				.setInterestMargin("")
				.setIsShariaTrade("")
				.setProfitCurrency("USD")
				.setProfitCurrencyDPS("5")
				.setProfitIsHouse("")
				.setProfitRate("1.091790")
				.setReasons("")
				.setTraderInterestRate("")
				.build())
			.build();
            
    }
}