Caplin FXIntegrationAPI Documentation - Version 3.68.0

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))
				.setDiscretionEditable()
				.setMargin("", true)
				.setMarginEditable()
				.setTraderRemarks("")
				.setTraderRemarksEditable()
				.build())
			.setOrderDetails(
			OrderDetailsTypesDef.OrderDetails
				.newBuilder()
				.addLegFields(
				OrderDetailsPartsDef.LegFields
					.newBuilder()
					.setAmount(BigDecimal.valueOf(0))
					.setAmountEditable()
					.setBenchmarkType("")
					.setBenchmarkTypeEditable()
					.setBuySell("", true)
					.setBuySellEditable()
					.setChildLegId("", true)
					.setChildLegIdEditable()
					.setChildRelationship("", true)
					.setChildRelationshipEditable()
					.setDealtCurrency("", true)
					.setDealtCurrencyEditable()
					.setEditable(true)
					.setExecutionType("")
					.setExecutionTypeEditable()
					.setFillRate("", true)
					.setFillRateEditable()
					.setFilled(BigDecimal.valueOf(0.0))
					.setLastActionBy("")
					.setLastActionDateTime(Instant.now())
					.setLimitPrice(BigDecimal.valueOf(0.0))
					.setLimitPriceEditable()
					.setLoopLegId(0)
					.setLoopLegIdEditable()
					.setMonitorSide("")
					.setMonitorSideEditable()
					.setOrderFixingDate("")
					.setOrderID("")
					.setOrderSettlementDate(LocalDate.now())
					.setOrderSettlementDateEditable()
					.setOrderStatus("")
					.setOrderTenor("", true)
					.setOrderTenorEditable()
					.setPartnerLegId(0, true)
					.setPartnerLegIdEditable()
					.setPartnerRelationship("")
					.setPartnerRelationshipEditable()
					.setRemaining(BigDecimal.valueOf(0.0))
					.setRemarks("", true)
					.setRemarksEditable()
					.setStatus("AWAITING-PRICE")
					.setSubmittedDateTime("")
					.build())
				.setAlertFields(
				OrderDetailsPartsDef.AlertFields
					.newBuilder()
					.setAlertEmailAddress1("")
					.setAlertEmailAddress10("", true)
					.setAlertEmailAddress10Editable()
					.setAlertEmailAddress1Editable()
					.setAlertEmailAddress2("", true)
					.setAlertEmailAddress2Editable()
					.setAlertEmailAddress3("")
					.setAlertEmailAddress3Editable()
					.setAlertEmailAddress4("", true)
					.setAlertEmailAddress4Editable()
					.setAlertEmailAddress5("", true)
					.setAlertEmailAddress5Editable()
					.setAlertEmailAddress6("", true)
					.setAlertEmailAddress6Editable()
					.setAlertEmailAddress7("")
					.setAlertEmailAddress7Editable()
					.setAlertEmailAddress8("", true)
					.setAlertEmailAddress8Editable()
					.setAlertEmailAddress9("")
					.setAlertEmailAddress9Editable()
					.setAlertPhoneNumber1("")
					.setAlertPhoneNumber10("", true)
					.setAlertPhoneNumber10Editable()
					.setAlertPhoneNumber1Editable()
					.setAlertPhoneNumber2("")
					.setAlertPhoneNumber2Editable()
					.setAlertPhoneNumber3("", true)
					.setAlertPhoneNumber3Editable()
					.setAlertPhoneNumber4("")
					.setAlertPhoneNumber4Editable()
					.setAlertPhoneNumber5("", true)
					.setAlertPhoneNumber5Editable()
					.setAlertPhoneNumber6("", true)
					.setAlertPhoneNumber6Editable()
					.setAlertPhoneNumber7("")
					.setAlertPhoneNumber7Editable()
					.setAlertPhoneNumber8("", true)
					.setAlertPhoneNumber8Editable()
					.setAlertPhoneNumber9("")
					.setAlertPhoneNumber9Editable()
					.build())
				.setCommonFields(
				OrderDetailsPartsDef.CommonFields
					.newBuilder()
					.setAccount("Garfields|GARF")
					.setAccountEditable()
					.setActivationDate("", true)
					.setActivationDateEditable()
					.setActivationDateTime(Instant.now())
					.setActivationDateTimeEditable()
					.setActivationDisplayTimeZone(ZoneId.systemDefault())
					.setActivationDisplayTimeZoneEditable()
					.setActivationLocation("", true)
					.setActivationLocationEditable()
					.setActivationTime("")
					.setActivationTimeEditable()
					.setActivationType("", true)
					.setActivationTypeEditable()
					.setActivationUTCOffset("")
					.setActivationUTCOffsetEditable()
					.setAlertType("")
					.setAlertTypeEditable()
					.setAllowedActions("")
					.setCurrencyPair("", true)
					.setCurrencyPairEditable()
					.setEntityDescription("Customer 1")
					.setExpirationDate("", true)
					.setExpirationDateEditable()
					.setExpirationDateTime(Instant.now(), true)
					.setExpirationDateTimeEditable()
					.setExpirationDisplayTimeZone("Europe/London")
					.setExpirationDisplayTimeZoneEditable()
					.setExpirationLocation("")
					.setExpirationLocationEditable()
					.setExpirationTime("", true)
					.setExpirationTimeEditable()
					.setExpirationType("")
					.setExpirationTypeEditable()
					.setExpirationUTCOffset("")
					.setExpirationUTCOffsetEditable()
					.setFullName("")
					.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();
            
    }
}