/// <summary> /// Initializes a new instance of the <see cref="TransactionRequest" /> class. /// </summary> /// <param name="transactionId">The unique identifier for the transaction. (required).</param> /// <param name="type">The type of the transaction e.g. 'Buy', 'Sell'. The transaction type should have been pre-configured via the System Configuration API endpoint. If it hasn't been pre-configured the transaction will still be updated or inserted however you will be unable to generate the resultant holdings for the portfolio that contains this transaction as LUSID does not know how to process it. (required).</param> /// <param name="instrumentIdentifiers">A set of instrument identifiers to use to 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 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. 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 store with the transaction. Each property must be from the 'Transaction' 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> 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)) { // to ensure "transactionId" is required (not null) if (transactionId == null) { throw new InvalidDataException("transactionId is a required property for TransactionRequest and cannot be null"); } else { this.TransactionId = transactionId; } // to ensure "type" is required (not null) if (type == null) { throw new InvalidDataException("type is a required property for TransactionRequest and cannot be null"); } else { this.Type = type; } // to ensure "instrumentIdentifiers" is required (not null) if (instrumentIdentifiers == null) { throw new InvalidDataException("instrumentIdentifiers is a required property for TransactionRequest and cannot be null"); } else { this.InstrumentIdentifiers = instrumentIdentifiers; } // to ensure "transactionDate" is required (not null) if (transactionDate == null) { throw new InvalidDataException("transactionDate is a required property for TransactionRequest and cannot be null"); } else { this.TransactionDate = transactionDate; } // to ensure "settlementDate" is required (not null) if (settlementDate == null) { throw new InvalidDataException("settlementDate is a required property for TransactionRequest and cannot be null"); } else { this.SettlementDate = settlementDate; } // to ensure "units" is required (not null) if (units == null) { throw new InvalidDataException("units is a required property for TransactionRequest and cannot be null"); } else { this.Units = units; } // to ensure "totalConsideration" is required (not null) if (totalConsideration == null) { throw new InvalidDataException("totalConsideration is a required property for TransactionRequest and cannot be null"); } else { this.TotalConsideration = totalConsideration; } this.ExchangeRate = exchangeRate; this.TransactionCurrency = transactionCurrency; this.Properties = properties; this.CounterpartyId = counterpartyId; this.Source = source; this.TransactionPrice = transactionPrice; this.ExchangeRate = exchangeRate; this.TransactionCurrency = transactionCurrency; this.Properties = properties; this.CounterpartyId = counterpartyId; this.Source = source; }
/// <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 'Buy' or 'Sell'. 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 'Transaction' 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; }
/// <summary> /// Initializes a new instance of the <see cref="OutputTransaction" /> class. /// </summary> /// <param name="instrumentIdentifiers">The set of instrument identifiers that can be used to resolve the transaction to a unique instrument..</param> /// <param name="transactionPrice">transactionPrice.</param> /// <param name="totalConsideration">totalConsideration.</param> public OutputTransaction(Dictionary <string, string> instrumentIdentifiers = default(Dictionary <string, string>), TransactionPrice transactionPrice = default(TransactionPrice), CurrencyAndAmount totalConsideration = default(CurrencyAndAmount)) { this.InstrumentIdentifiers = instrumentIdentifiers; this.TransactionPrice = transactionPrice; this.TotalConsideration = totalConsideration; }
/// <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. 'Buy', 'Sell'. 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'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 'Transaction' 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; }
/// <summary> /// Initializes a new instance of the <see cref="OutputTransaction" /> class. /// </summary> /// <param name="transactionId">The unique identifier for the transaction. (required).</param> /// <param name="type">The type of the transaction e.g. 'Buy', 'Sell'. The transaction type should have been pre-configured via the System Configuration API endpoint. (required).</param> /// <param name="description">The description of the transaction. This only exists on transactions generated by LUSID e.g. a holdings adjustment transaction..</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 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="transactionAmount">The total value of the transaction in the transaction currency..</param> /// <param name="transactionPrice">transactionPrice.</param> /// <param name="totalConsideration">totalConsideration.</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="transactionToPortfolioRate">The exchange rate between the transaction and portfolio currency. For example if the transaction currency is in USD and the portfolio 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 'Transaction' 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="transactionStatus">The status of the transaction. The available values are: Active, Amended, Cancelled.</param> /// <param name="entryDateTime">The asAt datetime that the transaction was added to LUSID..</param> /// <param name="cancelDateTime">If the transaction has been cancelled, the asAt datetime that the transaction was cancelled..</param> /// <param name="realisedGainLoss">The collection of realised gains or losses resulting from relevant transactions e.g. a sale transaction. The cost used in calculating the realised gain or loss is determined by the accounting method defined when the transaction portfolio is created..</param> public OutputTransaction(string transactionId = default(string), string type = default(string), string description = 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), decimal transactionAmount = default(decimal), TransactionPrice transactionPrice = default(TransactionPrice), CurrencyAndAmount totalConsideration = default(CurrencyAndAmount), decimal exchangeRate = default(decimal), decimal?transactionToPortfolioRate = default(decimal?), string transactionCurrency = default(string), Dictionary <string, PerpetualProperty> properties = default(Dictionary <string, PerpetualProperty>), string counterpartyId = default(string), string source = default(string), TransactionStatusEnum?transactionStatus = default(TransactionStatusEnum?), DateTimeOffset entryDateTime = default(DateTimeOffset), DateTimeOffset?cancelDateTime = default(DateTimeOffset?), List <RealisedGainLoss> realisedGainLoss = default(List <RealisedGainLoss>)) { // to ensure "transactionId" is required (not null) this.TransactionId = transactionId ?? throw new ArgumentNullException("transactionId is a required property for OutputTransaction and cannot be null"); // to ensure "type" is required (not null) this.Type = type ?? throw new ArgumentNullException("type is a required property for OutputTransaction and cannot be null"); // to ensure "instrumentUid" is required (not null) this.InstrumentUid = instrumentUid ?? throw new ArgumentNullException("instrumentUid is a required property for OutputTransaction and cannot be null"); this.TransactionDate = transactionDate; this.SettlementDate = settlementDate; this.Units = units; this.Description = description; this.InstrumentIdentifiers = instrumentIdentifiers; this.InstrumentScope = instrumentScope; this.TransactionAmount = transactionAmount; this.TransactionPrice = transactionPrice; this.TotalConsideration = totalConsideration; this.ExchangeRate = exchangeRate; this.TransactionToPortfolioRate = transactionToPortfolioRate; this.TransactionCurrency = transactionCurrency; this.Properties = properties; this.CounterpartyId = counterpartyId; this.Source = source; this.TransactionStatus = transactionStatus; this.EntryDateTime = entryDateTime; this.CancelDateTime = cancelDateTime; this.RealisedGainLoss = realisedGainLoss; }