Caplin FXIntegrationAPI Documentation - Version 8.2.0

Message Builder Example - InterventionBlotterRecord

package com.caplin.examples.fxapi.generated.motif.mm.blotter.BlotterTypesDef; 

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

import com.caplin.generated.motif.mm.blotter.BlotterPartsDef;
import com.caplin.generated.motif.mm.blotter.BlotterTypesDef;
import com.caplin.generated.motif.mm.settlementinstructions.SettlementInstructionsPartsDef;
import com.caplin.generated.motif.mm.tradeconfirmation.TradeConfPartsDef;
import com.caplin.generated.motif.mm.tradeconfirmation.TradeConfTypesDef;

public class InterventionBlotterRecordExample {
    public static void main(String[] args) {
                    		
		BlotterTypesDef.InterventionBlotterRecord interventionBlotterRecord =
		BlotterTypesDef.InterventionBlotterRecord
			.newBuilder()
			.setInterventionBlotterFields(
			BlotterPartsDef.InterventionBlotterFields
				.newBuilder()
				.setCompetition("")
				.setDealable("")
				.setIntervenerUsername("head_trader@novobank.co.za")
				.setSource("WMR 8am London Time")
				.setTradeStatus("AWAITING-PRICE")
				.build())
			.setTradeConfirmation(
			TradeConfTypesDef.TradeConfirmation
				.newBuilder()
				.addSettlementTradeFields(
				SettlementInstructionsPartsDef.SettlementTradeFields
					.newBuilder()
					.setCanAffirm("")
					.setIsReceiveInterestSplit("")
					.setPay(
					SettlementInstructionsPartsDef.SettlementFields
						.newBuilder()
						.setIsDefaultSettlementInstruction("")
						.setSettlementDisplayName("[CCY] Account 1")
						.setSettlementId("")
						.setSettlementInstructionType("EXISTING")
						.setSettlementRemarks("")
						.setSettlementType("")
						.build())
					.setReceive(
					SettlementInstructionsPartsDef.SettlementFields
						.newBuilder()
						.build())
					.build())
				.setCommonFields(
				TradeConfPartsDef.CommonTradeConfirmationFields
					.newBuilder()
					.setAccount("Garfields|GARF")
					.setAction("")
					.setAllocationMode("")
					.setCallAccount("")
					.setCanAffirm("")
					.setCanCapitalIncrease(true)
					.setCanChangeSSI(true)
					.setCanConfirm(true)
					.setCanGiveNotice("")
					.setConfirmedBy("")
					.setConfirmedDateTime(Instant.now())
					.setCurrency("USD")
					.setDisplayFields(addDefaultSalesAllocationDetailsUpdateFields(/* See DefaultDisplayFields javadoc for parameters and available builder methods. */))
					.setEntityDescription("Customer 1")
					.setEntityId("CUSTONE")
					.setExecutionDateTime("20160322123621")
					.setIndicativeProfitRate("")
					.setInterestAmount(BigDecimal.valueOf(0.0))
					.setInterestRate("")
					.setInterestRateDPS(BigDecimal.valueOf(0.0))
					.setIsShariaTrade("")
					.setMaturityDate("")
					.setMaturityTenor("")
					.setNoticePeriod("")
					.setNoticePeriodDescription("")
					.setNumberOfDays("")
					.setPaymentFrequency("")
					.setPrincipalAmount("")
					.setPrincipalPlusInterest("")
					.setQuoteDateTime("")
					.setQuoteID("")
					.setStartDate("20150620")
					.setStartTenor("1W")
					.setTOBOUser("client@customer.co.za")
					.setTradeDate("20160314")
					.setTradeID("00001561")
					.setTraderUsername("sales_trader@novobank.co.za")
					.setTradingType("")
					.build())
				.setSettlementTradeFields(
				SettlementInstructionsPartsDef.SettlementTradeFields
					.newBuilder()
					.build(), 0)
				.build())
			.build();
            
    }
}