Caplin FXIntegrationAPI Documentation - Version 3.56.0

Message Builder Example - NettedLegTradeDetailsFields

package com.caplin.examples.fxapi.generated.motif.fx.tradedetails.TradeDetailsTypesDef; 

import java.math.BigInteger;

import com.caplin.generated.motif.fx.tradedetails.TradeDetailsPartsDef;
import com.caplin.generated.motif.fx.tradedetails.TradeDetailsTypesDef;

public class NettedLegTradeDetailsFieldsExample {
    public static void main(String[] args) {
                    		
		TradeDetailsTypesDef.NettedLegTradeDetailsFields nettedLegTradeDetailsFields =
		TradeDetailsTypesDef.NettedLegTradeDetailsFields
			.newBuilder()
			.addInputLegSwapPartnerTradeDetails(
			TradeDetailsPartsDef.SwapPartnerLegTradeDetailsFields
				.newBuilder()
				.setSwapPartnerInputLegID(0)
				.setSwapPartnerNettedLegID(0)
				.build())
			.addInputLegTradeDetails(
			TradeDetailsPartsDef.LegTradeDetailsFields
				.newBuilder()
				.setAccount("Garfields|GARF")
				.setAmount(BigDecimal.valueOf(0))
				.setBuySell("")
				.setSettlementDate("")
				.setTenor("1M")
				.build())
			.addInterventionInputLegTradeDetails(
			TradeDetailsPartsDef.InterventionLegTradeDetailsFields
				.newBuilder()
				.setWarningMessage("You do not have sufficient credit for EUR")
				.build())
			.setNettedLegTradeDetails(
			TradeDetailsPartsDef.LegTradeDetailsFields
				.newBuilder()
				.build())
			.build();
            
    }
}