Caplin FXIntegrationAPI Documentation - Version 3.51.0-3064-772a4c6

Message Builder Example - OrderSalesDetails

package com.caplin.examples.fxapi.generated.motif.fx.orders.OrderDetailsTypesDef; 

import java.math.BigInteger;
import java.time.ZoneId;

import com.caplin.generated.motif.fx.orders.OrderDetailsPartsDef;
import com.caplin.generated.motif.fx.orders.OrderDetailsTypesDef;

public class OrderSalesDetailsExample {
    public static void main(String[] args) {
                    		
		OrderDetailsTypesDef.OrderSalesDetails orderSalesDetails =
		OrderDetailsTypesDef.OrderSalesDetails
			.newBuilder()
			.addSalesLegFields(
			OrderDetailsPartsDef.SalesLegFields
				.newBuilder()
				.setDiscretion(BigDecimal.valueOf(0.0), true)
				.setDiscretionEditable()
				.setMargin(BigDecimal.valueOf(0.0), true)
				.setMarginEditable()
				.setTraderRemarks("", true)
				.setTraderRemarksEditable()
				.build())
			.setOrderDetails(
			OrderDetailsTypesDef.OrderDetails
				.newBuilder()
				.addLegFields(
				OrderDetailsPartsDef.LegFields
					.newBuilder()
					.setAmount("", true)
					.setAmountEditable()
					.setBenchmarkType("", true)
					.setBenchmarkTypeEditable()
					.setBuySell("", true)
					.setBuySellEditable()
					.setChildLegId("", true)
					.setChildLegIdEditable()
					.setChildRelationship("", true)
					.setChildRelationshipEditable()
					.setDealtCurrency("", true)
					.setDealtCurrencyEditable()
					.setEditable("")
					.setExecutionType("", true)
					.setExecutionTypeEditable()
					.setFillRate("", true)
					.setFillRateEditable()
					.setFilled(BigDecimal.valueOf(0.0))
					.setLastActionBy("")
					.setLastActionDateTime(Instant.now())
					.setLimitPrice("", true)
					.setLimitPriceEditable()
					.setLoopLegId(0, true)
					.setLoopLegIdEditable()
					.setMonitorSide("", true)
					.setMonitorSideEditable()
					.setOrderFixingDate(LocalDate.now())
					.setOrderID("")
					.setOrderSettlementDate("", true)
					.setOrderSettlementDateEditable()
					.setOrderStatus("")
					.setOrderTenor("", true)
					.setOrderTenorEditable()
					.setPartnerLegId(0, true)
					.setPartnerLegIdEditable()
					.setPartnerRelationship("", true)
					.setPartnerRelationshipEditable()
					.setRemaining("")
					.setRemarks("", true)
					.setRemarksEditable()
					.setStatus("AWAITING-PRICE")
					.setSubmittedDateTime(Instant.now())
					.build())
				.setAlertFields(
				OrderDetailsPartsDef.AlertFields
					.newBuilder()
					.setAlertEmailAddress1("", true)
					.setAlertEmailAddress10("", true)
					.setAlertEmailAddress10Editable()
					.setAlertEmailAddress1Editable()
					.setAlertEmailAddress2("", true)
					.setAlertEmailAddress2Editable()
					.setAlertEmailAddress3("", true)
					.setAlertEmailAddress3Editable()
					.setAlertEmailAddress4("", true)
					.setAlertEmailAddress4Editable()
					.setAlertEmailAddress5("", true)
					.setAlertEmailAddress5Editable()
					.setAlertEmailAddress6("", true)
					.setAlertEmailAddress6Editable()
					.setAlertEmailAddress7("", true)
					.setAlertEmailAddress7Editable()
					.setAlertEmailAddress8("", true)
					.setAlertEmailAddress8Editable()
					.setAlertEmailAddress9("", true)
					.setAlertEmailAddress9Editable()
					.setAlertPhoneNumber1("", true)
					.setAlertPhoneNumber10("", true)
					.setAlertPhoneNumber10Editable()
					.setAlertPhoneNumber1Editable()
					.setAlertPhoneNumber2("", true)
					.setAlertPhoneNumber2Editable()
					.setAlertPhoneNumber3("", true)
					.setAlertPhoneNumber3Editable()
					.setAlertPhoneNumber4("", true)
					.setAlertPhoneNumber4Editable()
					.setAlertPhoneNumber5("", true)
					.setAlertPhoneNumber5Editable()
					.setAlertPhoneNumber6("", true)
					.setAlertPhoneNumber6Editable()
					.setAlertPhoneNumber7("", true)
					.setAlertPhoneNumber7Editable()
					.setAlertPhoneNumber8("", true)
					.setAlertPhoneNumber8Editable()
					.setAlertPhoneNumber9("", true)
					.setAlertPhoneNumber9Editable()
					.build())
				.setCommonFields(
				OrderDetailsPartsDef.CommonFields
					.newBuilder()
					.setAccount("", true)
					.setAccountEditable()
					.setActivationDate("", true)
					.setActivationDateEditable()
					.setActivationDateTime("", true)
					.setActivationDateTimeEditable()
					.setActivationDisplayTimeZone(ZoneId.systemDefault(), true)
					.setActivationDisplayTimeZoneEditable()
					.setActivationLocation("", true)
					.setActivationLocationEditable()
					.setActivationTime("", true)
					.setActivationTimeEditable()
					.setActivationType("", true)
					.setActivationTypeEditable()
					.setActivationUTCOffset("", true)
					.setActivationUTCOffsetEditable()
					.setAlertType("", true)
					.setAlertTypeEditable()
					.setAllowedActions("")
					.setCurrencyPair("", true)
					.setCurrencyPairEditable()
					.setExpirationDate("", true)
					.setExpirationDateEditable()
					.setExpirationDateTime("", true)
					.setExpirationDateTimeEditable()
					.setExpirationDisplayTimeZone("", true)
					.setExpirationDisplayTimeZoneEditable()
					.setExpirationLocation("", true)
					.setExpirationLocationEditable()
					.setExpirationTime("", true)
					.setExpirationTimeEditable()
					.setExpirationType("", true)
					.setExpirationTypeEditable()
					.setExpirationUTCOffset("", true)
					.setExpirationUTCOffsetEditable()
					.setOrderCount("")
					.setOrderID("")
					.setStrategyType("", true)
					.setStrategyTypeEditable()
					.setTOBOUser("client@customer.co.za")
					.setTemperature("2")
					.setTraderUsername("sales_trader@novobank.co.za")
					.build())
				.setLegFields(
				OrderDetailsPartsDef.LegFields
					.newBuilder()
					.build(), 0)
				.build())
			.setSalesLegFields(
			OrderDetailsPartsDef.SalesLegFields
				.newBuilder()
				.build(), 0)
			.build();
            
    }
}