Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TransactionRequest" /> class.
 /// </summary>
 /// <param name="transactionId">The unique identifier of the transaction. (required).</param>
 /// <param name="type">The type of the transaction, for example &#39;Buy&#39; or &#39;Sell&#39;. The transaction type must have been pre-configured using the System Configuration API. If not, this operation will succeed but you are not able to calculate holdings for the portfolio that include this transaction. (required).</param>
 /// <param name="instrumentIdentifiers">A set of instrument identifiers that can resolve the transaction to a unique instrument. (required).</param>
 /// <param name="transactionDate">The date of the transaction. (required).</param>
 /// <param name="settlementDate">The settlement date of the transaction. (required).</param>
 /// <param name="units">The number of units of the transacted instrument. (required).</param>
 /// <param name="transactionPrice">transactionPrice.</param>
 /// <param name="totalConsideration">totalConsideration (required).</param>
 /// <param name="exchangeRate">The exchange rate between the transaction and settlement currency (settlement currency being represented by TotalConsideration.Currency). For example, if the transaction currency is USD and the settlement currency is GBP, this would be the appropriate USD/GBP rate..</param>
 /// <param name="transactionCurrency">The transaction currency..</param>
 /// <param name="properties">A list of unique transaction properties and associated values to store for the transaction. Each property must be from the &#39;Transaction&#39; domain..</param>
 /// <param name="counterpartyId">The identifier for the counterparty of the transaction..</param>
 /// <param name="source">The source of the transaction. This is used to look up the appropriate transaction group set in the transaction type configuration..</param>
 /// <param name="otcConfirmation">otcConfirmation.</param>
 public TransactionRequest(string transactionId = default(string), string type = default(string), Dictionary <string, string> instrumentIdentifiers = default(Dictionary <string, string>), DateTimeOrCutLabel transactionDate = default(DateTimeOrCutLabel), DateTimeOrCutLabel settlementDate = default(DateTimeOrCutLabel), decimal units = default(decimal), TransactionPrice transactionPrice = default(TransactionPrice), CurrencyAndAmount totalConsideration = default(CurrencyAndAmount), decimal?exchangeRate = default(decimal?), string transactionCurrency = default(string), Dictionary <string, PerpetualProperty> properties = default(Dictionary <string, PerpetualProperty>), string counterpartyId = default(string), string source = default(string), OtcConfirmation otcConfirmation = default(OtcConfirmation))
 {
     // to ensure "transactionId" is required (not null)
     this.TransactionId = transactionId ?? throw new ArgumentNullException("transactionId is a required property for TransactionRequest and cannot be null");
     // to ensure "type" is required (not null)
     this.Type = type ?? throw new ArgumentNullException("type is a required property for TransactionRequest and cannot be null");
     // to ensure "instrumentIdentifiers" is required (not null)
     this.InstrumentIdentifiers = instrumentIdentifiers ?? throw new ArgumentNullException("instrumentIdentifiers is a required property for TransactionRequest and cannot be null");
     // to ensure "transactionDate" is required (not null)
     this.TransactionDate = transactionDate ?? throw new ArgumentNullException("transactionDate is a required property for TransactionRequest and cannot be null");
     // to ensure "settlementDate" is required (not null)
     this.SettlementDate = settlementDate ?? throw new ArgumentNullException("settlementDate is a required property for TransactionRequest and cannot be null");
     this.Units          = units;
     // to ensure "totalConsideration" is required (not null)
     this.TotalConsideration  = totalConsideration ?? throw new ArgumentNullException("totalConsideration is a required property for TransactionRequest and cannot be null");
     this.TransactionPrice    = transactionPrice;
     this.ExchangeRate        = exchangeRate;
     this.TransactionCurrency = transactionCurrency;
     this.Properties          = properties;
     this.CounterpartyId      = counterpartyId;
     this.Source          = source;
     this.OtcConfirmation = otcConfirmation;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Transaction" /> class.
 /// </summary>
 /// <param name="transactionId">The unique identifier for the transaction. (required).</param>
 /// <param name="type">The type of the transaction e.g. &#39;Buy&#39;, &#39;Sell&#39;. The transaction type should have been pre-configured via the System Configuration API endpoint. (required).</param>
 /// <param name="instrumentIdentifiers">A set of instrument identifiers that can resolve the transaction to a unique instrument..</param>
 /// <param name="instrumentScope">The scope in which the transaction&#39;s instrument lies..</param>
 /// <param name="instrumentUid">The unqiue Lusid Instrument Id (LUID) of the instrument that the transaction is in. (required).</param>
 /// <param name="transactionDate">The date of the transaction. (required).</param>
 /// <param name="settlementDate">The settlement date of the transaction. (required).</param>
 /// <param name="units">The number of units transacted in the associated instrument. (required).</param>
 /// <param name="transactionPrice">transactionPrice.</param>
 /// <param name="totalConsideration">totalConsideration (required).</param>
 /// <param name="exchangeRate">The exchange rate between the transaction and settlement currency (settlement currency being represented by the TotalConsideration.Currency). For example if the transaction currency is in USD and the settlement currency is in GBP this this the USD/GBP rate..</param>
 /// <param name="transactionCurrency">The transaction currency..</param>
 /// <param name="properties">Set of unique transaction properties and associated values to stored with the transaction. Each property will be from the &#39;Transaction&#39; domain..</param>
 /// <param name="counterpartyId">The identifier for the counterparty of the transaction..</param>
 /// <param name="source">The source of the transaction. This is used to look up the appropriate transaction group set in the transaction type configuration..</param>
 /// <param name="entryDateTime">The asAt datetime that the transaction was added to LUSID..</param>
 /// <param name="otcConfirmation">otcConfirmation.</param>
 /// <param name="transactionStatus">The status of the transaction. The available values are: Active, Amended, Cancelled.</param>
 /// <param name="cancelDateTime">If the transaction has been cancelled, the asAt datetime that the transaction was cancelled..</param>
 public Transaction(string transactionId = default(string), string type = default(string), Dictionary <string, string> instrumentIdentifiers = default(Dictionary <string, string>), string instrumentScope = default(string), string instrumentUid = default(string), DateTimeOffset transactionDate = default(DateTimeOffset), DateTimeOffset settlementDate = default(DateTimeOffset), decimal units = default(decimal), TransactionPrice transactionPrice = default(TransactionPrice), CurrencyAndAmount totalConsideration = default(CurrencyAndAmount), decimal?exchangeRate = default(decimal?), string transactionCurrency = default(string), Dictionary <string, PerpetualProperty> properties = default(Dictionary <string, PerpetualProperty>), string counterpartyId = default(string), string source = default(string), DateTimeOffset entryDateTime = default(DateTimeOffset), OtcConfirmation otcConfirmation = default(OtcConfirmation), TransactionStatusEnum?transactionStatus = default(TransactionStatusEnum?), DateTimeOffset?cancelDateTime = default(DateTimeOffset?))
 {
     // to ensure "transactionId" is required (not null)
     this.TransactionId = transactionId ?? throw new ArgumentNullException("transactionId is a required property for Transaction and cannot be null");
     // to ensure "type" is required (not null)
     this.Type = type ?? throw new ArgumentNullException("type is a required property for Transaction and cannot be null");
     // to ensure "instrumentUid" is required (not null)
     this.InstrumentUid   = instrumentUid ?? throw new ArgumentNullException("instrumentUid is a required property for Transaction and cannot be null");
     this.TransactionDate = transactionDate;
     this.SettlementDate  = settlementDate;
     this.Units           = units;
     // to ensure "totalConsideration" is required (not null)
     this.TotalConsideration    = totalConsideration ?? throw new ArgumentNullException("totalConsideration is a required property for Transaction and cannot be null");
     this.InstrumentIdentifiers = instrumentIdentifiers;
     this.InstrumentScope       = instrumentScope;
     this.TransactionPrice      = transactionPrice;
     this.ExchangeRate          = exchangeRate;
     this.TransactionCurrency   = transactionCurrency;
     this.Properties            = properties;
     this.CounterpartyId        = counterpartyId;
     this.Source            = source;
     this.EntryDateTime     = entryDateTime;
     this.OtcConfirmation   = otcConfirmation;
     this.TransactionStatus = transactionStatus;
     this.CancelDateTime    = cancelDateTime;
 }