/// <summary>
        /// Initializes a new instance of the <see cref="TransactionQueryParameters" /> class.
        /// </summary>
        /// <param name="startDate">The lower bound effective datetime or cut label (inclusive) from which to build the transactions. (required).</param>
        /// <param name="endDate">The upper bound effective datetime or cut label (inclusive) from which to retrieve transactions. (required).</param>
        /// <param name="queryMode">The date to compare against the upper and lower bounds for the effective datetime or cut label. Defaults to &#39;TradeDate&#39; if not specified..</param>
        /// <param name="showCancelledTransactions">Option to specify whether or not to include cancelled transactions in the output. Defaults to False if not specified..</param>
        public TransactionQueryParameters(DateTimeOrCutLabel startDate = default(DateTimeOrCutLabel), DateTimeOrCutLabel endDate = default(DateTimeOrCutLabel), QueryModeEnum?queryMode = default(QueryModeEnum?), bool?showCancelledTransactions = default(bool?))
        {
            // to ensure "startDate" is required (not null)
            if (startDate == null)
            {
                throw new InvalidDataException("startDate is a required property for TransactionQueryParameters and cannot be null");
            }
            else
            {
                this.StartDate = startDate;
            }

            // to ensure "endDate" is required (not null)
            if (endDate == null)
            {
                throw new InvalidDataException("endDate is a required property for TransactionQueryParameters and cannot be null");
            }
            else
            {
                this.EndDate = endDate;
            }

            this.QueryMode = queryMode;
            this.ShowCancelledTransactions = showCancelledTransactions;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuoteId" /> class.
 /// </summary>
 /// <param name="quoteSeriesId">quoteSeriesId (required).</param>
 /// <param name="effectiveAt">The effective datetime or cut label at which the quote is valid from. (required).</param>
 public QuoteId(QuoteSeriesId quoteSeriesId = default(QuoteSeriesId), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel))
 {
     // to ensure "quoteSeriesId" is required (not null)
     this.QuoteSeriesId = quoteSeriesId ?? throw new ArgumentNullException("quoteSeriesId is a required property for QuoteId and cannot be null");
     // to ensure "effectiveAt" is required (not null)
     this.EffectiveAt = effectiveAt ?? throw new ArgumentNullException("effectiveAt is a required property for QuoteId and cannot be null");
 }
        public void Create_DateOrCutLabel_From_Cut_Label_Definition_Succeeds()
        {
            var testDate = new DateTimeOffset(2018, 3, 28, 0, 0, 0, 0, TimeSpan.Zero);

            var parameter = new DateTimeOrCutLabel(testDate, "ExampleCutLabel");

            Assert.That(parameter.Parameter, Is.EqualTo("2018-03-28NExampleCutLabel"));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="TransactionQueryParameters" /> class.
 /// </summary>
 /// <param name="startDate">The lower bound effective datetime or cut label (inclusive) from which to build the transactions. (required).</param>
 /// <param name="endDate">The upper bound effective datetime or cut label (inclusive) from which to retrieve transactions. (required).</param>
 /// <param name="queryMode">The date to compare against the upper and lower bounds for the effective datetime or cut label. Defaults to &#39;TradeDate&#39; if not specified. The available values are: TradeDate, SettleDate.</param>
 /// <param name="showCancelledTransactions">Option to specify whether or not to include cancelled transactions in the output. Defaults to False if not specified..</param>
 public TransactionQueryParameters(DateTimeOrCutLabel startDate = default(DateTimeOrCutLabel), DateTimeOrCutLabel endDate = default(DateTimeOrCutLabel), QueryModeEnum?queryMode = default(QueryModeEnum?), bool showCancelledTransactions = default(bool))
 {
     // to ensure "startDate" is required (not null)
     this.StartDate = startDate ?? throw new ArgumentNullException("startDate is a required property for TransactionQueryParameters and cannot be null");
     // to ensure "endDate" is required (not null)
     this.EndDate   = endDate ?? throw new ArgumentNullException("endDate is a required property for TransactionQueryParameters and cannot be null");
     this.QueryMode = queryMode;
     this.ShowCancelledTransactions = showCancelledTransactions;
 }
        public void Create_DateOrCutLabel_From_Date_Succeeds()
        {
            var testDateTime = new DateTimeOffset(2018, 3, 28, 12, 1, 2, 3, TimeSpan.Zero);

            var parameterUsingConstructor = new DateTimeOrCutLabel(testDateTime);
            var parameterUsingConversion  = (DateTimeOrCutLabel)testDateTime;

            Assert.That(parameterUsingConstructor.Parameter, Is.EqualTo("2018-03-28T12:01:02.0030000+00:00"));
            Assert.That(parameterUsingConversion.Parameter, Is.EqualTo("2018-03-28T12:01:02.0030000+00:00"));
        }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValuationSchedule" /> class.
 /// </summary>
 /// <param name="effectiveFrom">If present, the EffectiveFrom and EffectiveAt dates are interpreted as a range of dates for which to perform a valuation.  In this case, valuation is calculated for the portfolio(s) for each business day in the given range..</param>
 /// <param name="effectiveAt">The market data time, i.e. the time to run the valuation request effective of. (required).</param>
 /// <param name="tenor">Tenor, e.g \&quot;1D\&quot;, \&quot;1M\&quot; to be used in generating the date schedule when effectiveFrom and effectiveAt are both given and are not the same..</param>
 /// <param name="rollConvention">When Tenor is given and is not equal to \&quot;1D\&quot;, there may be cases where \&quot;date + tenor\&quot; land on non-business days around month end.  In that case, the RollConvention, e.g. modified following \&quot;MF\&quot; would be applied to determine the next GBD..</param>
 /// <param name="holidayCalendars">The holiday calendar(s) that should be used in determining the date schedule.  Holiday calendar(s) are supplied by their names, for example, \&quot;CoppClarke\&quot;.   Note that when the calendars are not available (e.g. when the user has insufficient permissions),   a recipe setting will be used to determine whether the whole batch should then fail or whether the calendar not being available should simply be ignored..</param>
 /// <param name="valuationDateTimes">If given, this is the exact set of dates on which to perform a valuation. This will replace/override all other specified values if given..</param>
 public ValuationSchedule(DateTimeOrCutLabel effectiveFrom = default(DateTimeOrCutLabel), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel), string tenor = default(string), string rollConvention = default(string), List <string> holidayCalendars = default(List <string>), List <string> valuationDateTimes = default(List <string>))
 {
     // to ensure "effectiveAt" is required (not null)
     this.EffectiveAt        = effectiveAt ?? throw new ArgumentNullException("effectiveAt is a required property for ValuationSchedule and cannot be null");
     this.EffectiveFrom      = effectiveFrom;
     this.Tenor              = tenor;
     this.RollConvention     = rollConvention;
     this.HolidayCalendars   = holidayCalendars;
     this.ValuationDateTimes = valuationDateTimes;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UpsertReferencePortfolioConstituentsRequest" /> class.
 /// </summary>
 /// <param name="effectiveFrom">The first date from which the weights will apply (required).</param>
 /// <param name="weightType">The available values are: Static, Floating, Periodical (required).</param>
 /// <param name="periodType">The available values are: Daily, Weekly, Monthly, Quarterly, Annually.</param>
 /// <param name="periodCount">periodCount.</param>
 /// <param name="constituents">Set of constituents (instrument/weight pairings) (required).</param>
 public UpsertReferencePortfolioConstituentsRequest(DateTimeOrCutLabel effectiveFrom = default(DateTimeOrCutLabel), WeightTypeEnum weightType = default(WeightTypeEnum), PeriodTypeEnum?periodType = default(PeriodTypeEnum?), int?periodCount = default(int?), List <ReferencePortfolioConstituentRequest> constituents = default(List <ReferencePortfolioConstituentRequest>))
 {
     // to ensure "effectiveFrom" is required (not null)
     this.EffectiveFrom = effectiveFrom ?? throw new ArgumentNullException("effectiveFrom is a required property for UpsertReferencePortfolioConstituentsRequest and cannot be null");
     this.WeightType    = weightType;
     // to ensure "constituents" is required (not null)
     this.Constituents = constituents ?? throw new ArgumentNullException("constituents is a required property for UpsertReferencePortfolioConstituentsRequest and cannot be null");
     this.PeriodType   = periodType;
     this.PeriodCount  = periodCount;
 }
Exemplo n.º 8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QuoteId" /> class.
        /// </summary>
        /// <param name="quoteSeriesId">quoteSeriesId (required).</param>
        /// <param name="effectiveAt">The effective datetime or cut label at which the quote is valid from. (required).</param>
        public QuoteId(QuoteSeriesId quoteSeriesId = default(QuoteSeriesId), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel))
        {
            // to ensure "quoteSeriesId" is required (not null)
            if (quoteSeriesId == null)
            {
                throw new InvalidDataException("quoteSeriesId is a required property for QuoteId and cannot be null");
            }
            else
            {
                this.QuoteSeriesId = quoteSeriesId;
            }

            // to ensure "effectiveAt" is required (not null)
            if (effectiveAt == null)
            {
                throw new InvalidDataException("effectiveAt is a required property for QuoteId and cannot be null");
            }
            else
            {
                this.EffectiveAt = effectiveAt;
            }
        }
        public void Compare_DateOrCutLabels()
        {
            // GIVEN some example DateTimeOrCutLabels which share values
            var testDate         = new DateTimeOffset(2018, 3, 28, 0, 0, 0, 0, TimeSpan.Zero);
            var testDateWithTime = new DateTimeOffset(2018, 3, 28, 12, 1, 2, 3, TimeSpan.Zero);
            var testCutLabel     = "TEST_CUTLABEL";

            DateTimeOrCutLabel a = new DateTimeOrCutLabel(testDate, testCutLabel);
            DateTimeOrCutLabel b = new DateTimeOrCutLabel(testDate, testCutLabel);
            DateTimeOrCutLabel c = new DateTimeOrCutLabel(testDateWithTime);
            DateTimeOrCutLabel d = new DateTimeOrCutLabel(testDateWithTime);

            // WHEN they are compared
            // THEN the expected results are returned
            Assert.That(a, Is.Not.SameAs(b));
            Assert.That(a, Is.EqualTo(b));

            Assert.That(a, Is.Not.EqualTo(c));

            Assert.That(c, Is.Not.SameAs(d));
            Assert.That(c, Is.EqualTo(d));
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UpsertReferencePortfolioConstituentsRequest" /> class.
        /// </summary>
        /// <param name="effectiveFrom">The first date from which the weights will apply (required).</param>
        /// <param name="weightType">The available values are: Static, Floating, Periodical (required).</param>
        /// <param name="periodType">The available values are: Daily, Weekly, Monthly, Quarterly, Annually.</param>
        /// <param name="periodCount">periodCount.</param>
        /// <param name="constituents">Set of constituents (instrument/weight pairings) (required).</param>
        public UpsertReferencePortfolioConstituentsRequest(DateTimeOrCutLabel effectiveFrom = default(DateTimeOrCutLabel), WeightTypeEnum weightType = default(WeightTypeEnum), PeriodTypeEnum?periodType = default(PeriodTypeEnum?), int?periodCount = default(int?), List <ReferencePortfolioConstituentRequest> constituents = default(List <ReferencePortfolioConstituentRequest>))
        {
            // to ensure "effectiveFrom" is required (not null)
            if (effectiveFrom == null)
            {
                throw new InvalidDataException("effectiveFrom is a required property for UpsertReferencePortfolioConstituentsRequest and cannot be null");
            }
            else
            {
                this.EffectiveFrom = effectiveFrom;
            }

            // to ensure "weightType" is required (not null)
            if (weightType == null)
            {
                throw new InvalidDataException("weightType is a required property for UpsertReferencePortfolioConstituentsRequest and cannot be null");
            }
            else
            {
                this.WeightType = weightType;
            }

            this.PeriodType  = periodType;
            this.PeriodCount = periodCount;
            // to ensure "constituents" is required (not null)
            if (constituents == null)
            {
                throw new InvalidDataException("constituents is a required property for UpsertReferencePortfolioConstituentsRequest and cannot be null");
            }
            else
            {
                this.Constituents = constituents;
            }

            this.PeriodType  = periodType;
            this.PeriodCount = periodCount;
        }
Exemplo n.º 11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StructuredMarketDataId" /> class.
        /// </summary>
        /// <param name="provider">The platform or vendor that provided the structured market data, e.g. &#39;DataScope&#39;, &#39;LUSID&#39;, &#39;ISDA&#39; etc. (required).</param>
        /// <param name="priceSource">The source or originator of the structured market data, e.g. a bank or financial institution..</param>
        /// <param name="lineage">Description of the structured market data&#39;s lineage e.g. &#39;FundAccountant_GreenQuality&#39;..</param>
        /// <param name="effectiveAt">The effectiveAt or cut label that this item of structured market data is/was updated/inserted with..</param>
        /// <param name="marketElementType">The type of the market element that the market entity represents, e.g. a vol surface or credit curve.</param>
        /// <param name="marketAsset">The name of the market entity that the document represents.</param>
        public StructuredMarketDataId(string provider = default(string), string priceSource = default(string), string lineage = default(string), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel), string marketElementType = default(string), string marketAsset = default(string))
        {
            // to ensure "provider" is required (not null)
            if (provider == null)
            {
                throw new InvalidDataException("provider is a required property for StructuredMarketDataId and cannot be null");
            }
            else
            {
                this.Provider = provider;
            }

            this.PriceSource       = priceSource;
            this.Lineage           = lineage;
            this.EffectiveAt       = effectiveAt;
            this.MarketElementType = marketElementType;
            this.MarketAsset       = marketAsset;
            this.PriceSource       = priceSource;
            this.Lineage           = lineage;
            this.EffectiveAt       = effectiveAt;
            this.MarketElementType = marketElementType;
            this.MarketAsset       = marketAsset;
        }
Exemplo n.º 12
0
        /// <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. &#39;Buy&#39;, &#39;Sell&#39;. The transaction type should have been pre-configured via the System Configuration API endpoint. If it hasn&#39;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 &#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>
        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="PortfolioReconciliationRequest" /> class.
        /// </summary>
        /// <param name="portfolioId">portfolioId (required).</param>
        /// <param name="effectiveAt">The effective date of the portfolio (required).</param>
        /// <param name="asAt">Optional. The AsAt date of the portfolio.</param>
        public PortfolioReconciliationRequest(ResourceId portfolioId = default(ResourceId), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel), DateTimeOffset?asAt = default(DateTimeOffset?))
        {
            // to ensure "portfolioId" is required (not null)
            if (portfolioId == null)
            {
                throw new InvalidDataException("portfolioId is a required property for PortfolioReconciliationRequest and cannot be null");
            }
            else
            {
                this.PortfolioId = portfolioId;
            }

            // to ensure "effectiveAt" is required (not null)
            if (effectiveAt == null)
            {
                throw new InvalidDataException("effectiveAt is a required property for PortfolioReconciliationRequest and cannot be null");
            }
            else
            {
                this.EffectiveAt = effectiveAt;
            }

            this.AsAt = asAt;
            this.AsAt = asAt;
        }
Exemplo n.º 14
0
        /// <summary>
        /// [EARLY ACCESS] GetPortfolioChanges: Get the next change to each portfolio in a scope. Gets the time of the next (earliest effective at) modification (correction and/or amendment) to each portfolio in a scope relative to a point in bitemporal time.  Includes changes from parent portfolios in different scopes.  Excludes changes from subcriptions (e.g corporate actions).
        /// </summary>
        /// <exception cref="Lusid.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="scope">The scope</param>
        /// <param name="effectiveAt">The effective date of the origin.</param>
        /// <param name="asAt">The as-at date of the origin. (optional)</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (ResourceListOfChange)</returns>
        public async System.Threading.Tasks.Task <Lusid.Sdk.Client.ApiResponse <ResourceListOfChange> > GetPortfolioChangesWithHttpInfoAsync(string scope, DateTimeOrCutLabel effectiveAt, DateTimeOffset?asAt = default(DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            // verify the required parameter 'scope' is set
            if (scope == null)
            {
                throw new Lusid.Sdk.Client.ApiException(400, "Missing required parameter 'scope' when calling EntitiesApi->GetPortfolioChanges");
            }

            // verify the required parameter 'effectiveAt' is set
            if (effectiveAt == null)
            {
                throw new Lusid.Sdk.Client.ApiException(400, "Missing required parameter 'effectiveAt' when calling EntitiesApi->GetPortfolioChanges");
            }


            Lusid.Sdk.Client.RequestOptions localVarRequestOptions = new Lusid.Sdk.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "text/plain",
                "application/json",
                "text/json"
            };


            var localVarContentType = Lusid.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Lusid.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.QueryParameters.Add(Lusid.Sdk.Client.ClientUtils.ParameterToMultiMap("", "scope", scope));
            localVarRequestOptions.QueryParameters.Add(Lusid.Sdk.Client.ClientUtils.ParameterToMultiMap("", "effectiveAt", effectiveAt));
            if (asAt != null)
            {
                localVarRequestOptions.QueryParameters.Add(Lusid.Sdk.Client.ClientUtils.ParameterToMultiMap("", "asAt", asAt));
            }

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            //  set the LUSID header
            localVarRequestOptions.HeaderParameters.Add("X-LUSID-Sdk-Language", "C#");
            localVarRequestOptions.HeaderParameters.Add("X-LUSID-Sdk-Version", "0.11.4385");

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <ResourceListOfChange>("/api/entities/changes/portfolios", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetPortfolioChanges", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 15
0
        /// <summary>
        /// [EARLY ACCESS] GetPortfolioChanges: Get the next change to each portfolio in a scope. Gets the time of the next (earliest effective at) modification (correction and/or amendment) to each portfolio in a scope relative to a point in bitemporal time.  Includes changes from parent portfolios in different scopes.  Excludes changes from subcriptions (e.g corporate actions).
        /// </summary>
        /// <exception cref="Lusid.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="scope">The scope</param>
        /// <param name="effectiveAt">The effective date of the origin.</param>
        /// <param name="asAt">The as-at date of the origin. (optional)</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ResourceListOfChange</returns>
        public async System.Threading.Tasks.Task <ResourceListOfChange> GetPortfolioChangesAsync(string scope, DateTimeOrCutLabel effectiveAt, DateTimeOffset?asAt = default(DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Lusid.Sdk.Client.ApiResponse <ResourceListOfChange> localVarResponse = await GetPortfolioChangesWithHttpInfoAsync(scope, effectiveAt, asAt, cancellationToken).ConfigureAwait(false);

            return(localVarResponse.Data);
        }
Exemplo n.º 16
0
 /// <summary>
 /// [EARLY ACCESS] GetPortfolioChanges: Get the next change to each portfolio in a scope. Gets the time of the next (earliest effective at) modification (correction and/or amendment) to each portfolio in a scope relative to a point in bitemporal time.  Includes changes from parent portfolios in different scopes.  Excludes changes from subcriptions (e.g corporate actions).
 /// </summary>
 /// <exception cref="Lusid.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="scope">The scope</param>
 /// <param name="effectiveAt">The effective date of the origin.</param>
 /// <param name="asAt">The as-at date of the origin. (optional)</param>
 /// <returns>ResourceListOfChange</returns>
 public ResourceListOfChange GetPortfolioChanges(string scope, DateTimeOrCutLabel effectiveAt, DateTimeOffset?asAt = default(DateTimeOffset?))
 {
     Lusid.Sdk.Client.ApiResponse <ResourceListOfChange> localVarResponse = GetPortfolioChangesWithHttpInfo(scope, effectiveAt, asAt);
     return(localVarResponse.Data);
 }
Exemplo n.º 17
0
        /// <summary>
        /// [EARLY ACCESS] Get the next change to each portfolio in a scope. Gets the time of the next (earliest effective at) modification (correction and/or amendment) to each portfolio in a scope relative to a point in bitemporal time.  Includes changes from parent portfolios in different scopes.  Excludes changes from subcriptions (e.g corporate actions).
        /// </summary>
        /// <exception cref="Lusid.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="scope">The scope</param>
        /// <param name="effectiveAt">The effective date of the origin.</param>
        /// <param name="asAt">The as-at date of the origin. (optional)</param>
        /// <returns>Task of ResourceListOfChange</returns>
        public async System.Threading.Tasks.Task <ResourceListOfChange> GetPortfolioChangesAsync(string scope, DateTimeOrCutLabel effectiveAt, DateTimeOffset?asAt = null)
        {
            ApiResponse <ResourceListOfChange> localVarResponse = await GetPortfolioChangesAsyncWithHttpInfo(scope, effectiveAt, asAt);

            return(localVarResponse.Data);
        }
Exemplo n.º 18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateRecipeRequest" /> class.
        /// </summary>
        /// <param name="recipeCreationMarketDataScopes">The scopes in which the recipe creation would look for quotes/data. (required).</param>
        /// <param name="recipeId">recipeId.</param>
        /// <param name="inlineRecipe">inlineRecipe.</param>
        /// <param name="asAt">The asAt date to use.</param>
        /// <param name="effectiveAt">The market data time, i.e. the recipe generated will look for rules with this effectiveAt. (required).</param>
        public CreateRecipeRequest(List <string> recipeCreationMarketDataScopes = default(List <string>), ResourceId recipeId = default(ResourceId), ConfigurationRecipe inlineRecipe = default(ConfigurationRecipe), DateTimeOffset?asAt = default(DateTimeOffset?), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel))
        {
            // to ensure "recipeCreationMarketDataScopes" is required (not null)
            if (recipeCreationMarketDataScopes == null)
            {
                throw new InvalidDataException("recipeCreationMarketDataScopes is a required property for CreateRecipeRequest and cannot be null");
            }
            else
            {
                this.RecipeCreationMarketDataScopes = recipeCreationMarketDataScopes;
            }

            this.AsAt = asAt;
            // to ensure "effectiveAt" is required (not null)
            if (effectiveAt == null)
            {
                throw new InvalidDataException("effectiveAt is a required property for CreateRecipeRequest and cannot be null");
            }
            else
            {
                this.EffectiveAt = effectiveAt;
            }

            this.RecipeId     = recipeId;
            this.InlineRecipe = inlineRecipe;
            this.AsAt         = asAt;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ComplexMarketDataId" /> class.
 /// </summary>
 /// <param name="provider">The platform or vendor that provided the complex market data, e.g. &#39;DataScope&#39;, &#39;LUSID&#39;, &#39;ISDA&#39; etc. (required).</param>
 /// <param name="priceSource">The source or originator of the complex market data, e.g. a bank or financial institution..</param>
 /// <param name="lineage">This is obsolete. It is not used, it will not be stored, and has no effects.  If you wish to attach a Lineage to your ComplexMarketData,  you should provide it in the optional Lineage field in the ComplexMarketData class..</param>
 /// <param name="effectiveAt">The effectiveAt or cut label that this item of complex market data is/was updated/inserted with..</param>
 /// <param name="marketAsset">The name of the market entity that the document represents.</param>
 public ComplexMarketDataId(string provider = default(string), string priceSource = default(string), string lineage = default(string), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel), string marketAsset = default(string))
 {
     // to ensure "provider" is required (not null)
     this.Provider    = provider ?? throw new ArgumentNullException("provider is a required property for ComplexMarketDataId and cannot be null");
     this.PriceSource = priceSource;
     this.Lineage     = lineage;
     this.EffectiveAt = effectiveAt;
     this.MarketAsset = marketAsset;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="StructuredResultDataId" /> class.
        /// </summary>
        /// <param name="source">The platform or vendor that provided the structured result data, e.g. &#39;client&#39;. This is primarily of interest when data could have been sourced from multiple sources (required).</param>
        /// <param name="code">The identifier for the entity that this id describes. It could be an index, instrument or other form of structured data.</param>
        /// <param name="effectiveAt">The effectiveAt or cut label that this item of structured market data is/was updated/inserted with..</param>
        /// <param name="resultType">An identifier that denotes the class of data that the id points to. This is not the same as the format, but a more generic identifier such as &#39;risk result&#39;, &#39;cashflow&#39;, &#39;index&#39; or similar..</param>
        public StructuredResultDataId(string source = default(string), string code = default(string), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel), string resultType = default(string))
        {
            // to ensure "source" is required (not null)
            if (source == null)
            {
                throw new InvalidDataException("source is a required property for StructuredResultDataId and cannot be null");
            }
            else
            {
                this.Source = source;
            }

            this.Code        = code;
            this.EffectiveAt = effectiveAt;
            this.ResultType  = resultType;
            this.Code        = code;
            this.EffectiveAt = effectiveAt;
            this.ResultType  = resultType;
        }
Exemplo n.º 21
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;
 }
Exemplo n.º 22
0
        /// <summary>
        /// [EARLY ACCESS] Get the next change to each portfolio in a scope. Gets the time of the next (earliest effective at) modification (correction and/or amendment) to each portfolio in a scope relative to a point in bitemporal time.  Includes changes from parent portfolios in different scopes.  Excludes changes from subcriptions (e.g corporate actions).
        /// </summary>
        /// <exception cref="Lusid.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="scope">The scope</param>
        /// <param name="effectiveAt">The effective date of the origin.</param>
        /// <param name="asAt">The as-at date of the origin. (optional)</param>
        /// <returns>Task of ApiResponse (ResourceListOfChange)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <ResourceListOfChange> > GetPortfolioChangesAsyncWithHttpInfo(string scope, DateTimeOrCutLabel effectiveAt, DateTimeOffset?asAt = null)
        {
            // verify the required parameter 'scope' is set
            if (scope == null)
            {
                throw new ApiException(400, "Missing required parameter 'scope' when calling EntitiesApi->GetPortfolioChanges");
            }
            // verify the required parameter 'effectiveAt' is set
            if (effectiveAt == null)
            {
                throw new ApiException(400, "Missing required parameter 'effectiveAt' when calling EntitiesApi->GetPortfolioChanges");
            }

            var    localVarPath         = "./api/entities/changes/portfolios";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType    = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "text/plain",
                "application/json",
                "text/json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (scope != null)
            {
                localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "scope", scope));                // query parameter
            }
            if (effectiveAt != null)
            {
                localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "effectiveAt", effectiveAt));                      // query parameter
            }
            if (asAt != null)
            {
                localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "asAt", asAt));               // query parameter
            }
            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            //  set the LUSID header
            localVarHeaderParams["X-LUSID-Sdk-Language"] = "C#";
            localVarHeaderParams["X-LUSID-Sdk-Version"]  = "0.11.2843";

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                            Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetPortfolioChanges", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <ResourceListOfChange>(localVarStatusCode,
                                                          localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)),
                                                          (ResourceListOfChange)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResourceListOfChange))));
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UpdateInstrumentIdentifierRequest" /> class.
        /// </summary>
        /// <param name="type">The allowable instrument identifier to update, insert or remove e.g. &#39;Figi&#39;. (required).</param>
        /// <param name="value">The new value of the allowable instrument identifier. If unspecified the identifier will be removed from the instrument..</param>
        /// <param name="effectiveAt">The effective datetime from which the identifier should be updated, inserted or removed. Defaults to the current LUSID system datetime if not specified..</param>
        public UpdateInstrumentIdentifierRequest(string type = default(string), string value = default(string), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel))
        {
            // to ensure "type" is required (not null)
            if (type == null)
            {
                throw new InvalidDataException("type is a required property for UpdateInstrumentIdentifierRequest and cannot be null");
            }
            else
            {
                this.Type = type;
            }

            this.Value       = value;
            this.EffectiveAt = effectiveAt;
        }
Exemplo n.º 24
0
        /// <summary>
        /// [EARLY ACCESS] Get the next change to each portfolio in a scope. Gets the time of the next (earliest effective at) modification (correction and/or amendment) to each portfolio in a scope relative to a point in bitemporal time.  Includes changes from parent portfolios in different scopes.  Excludes changes from subcriptions (e.g corporate actions).
        /// </summary>
        /// <exception cref="Lusid.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="scope">The scope</param>
        /// <param name="effectiveAt">The effective date of the origin.</param>
        /// <param name="asAt">The as-at date of the origin. (optional)</param>
        /// <returns>ResourceListOfChange</returns>
        public ResourceListOfChange GetPortfolioChanges(string scope, DateTimeOrCutLabel effectiveAt, DateTimeOffset?asAt = null)
        {
            ApiResponse <ResourceListOfChange> localVarResponse = GetPortfolioChangesWithHttpInfo(scope, effectiveAt, asAt);

            return(localVarResponse.Data);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PortfolioReconciliationRequest" /> class.
 /// </summary>
 /// <param name="portfolioId">portfolioId (required).</param>
 /// <param name="effectiveAt">The effective date of the portfolio (required).</param>
 /// <param name="asAt">Optional. The AsAt date of the portfolio.</param>
 public PortfolioReconciliationRequest(ResourceId portfolioId = default(ResourceId), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel), DateTimeOffset?asAt = default(DateTimeOffset?))
 {
     // to ensure "portfolioId" is required (not null)
     this.PortfolioId = portfolioId ?? throw new ArgumentNullException("portfolioId is a required property for PortfolioReconciliationRequest and cannot be null");
     // to ensure "effectiveAt" is required (not null)
     this.EffectiveAt = effectiveAt ?? throw new ArgumentNullException("effectiveAt is a required property for PortfolioReconciliationRequest and cannot be null");
     this.AsAt        = asAt;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AggregationRequest" /> class.
        /// </summary>
        /// <param name="recipeId">recipeId.</param>
        /// <param name="inlineRecipe">inlineRecipe.</param>
        /// <param name="asAt">The asAt date to use.</param>
        /// <param name="effectiveFrom">If present, the EffectiveFrom and EffectiveAt dates are interpreted as a range of dates for which to perform a valuation.  In this case, valuation is calculated for the portfolio(s) for each date that is a business day in the given range..</param>
        /// <param name="effectiveAt">The market data time, i.e. the time to run the aggregation request effective of. (required).</param>
        /// <param name="metrics">The set of specifications for items to calculate or retrieve during the aggregation and present in the results.  This is logically equivalent to the set of operations in a Sql select statement  select [operation1(field1), operation2(field2), ... ] from results (required).</param>
        /// <param name="groupBy">The set of items by which to perform grouping. This primarily matters when one or more of the metric operators is a mapping  that reduces set size, e.g. sum or proportion. The group-by statement determines the set of keys by which to break the results out..</param>
        /// <param name="filters">A set of filters to use to reduce the data found in a request. Equivalent to the &#39;where ...&#39; part of a Sql select statement.  For example, filter a set of values within a given range or matching a particular value..</param>
        /// <param name="limit">limit the results to a particular number of values..</param>
        /// <param name="sort">A (possibly empty/null) set of specifications for how to order the results..</param>
        /// <param name="reportCcy">Three letter ISO currency string indicating what currency to report in for ReportCcy denominated queries.  If not present then the currency of the relevant portfolio will be used in its place where relevant..</param>
        /// <param name="portfolioIdentifierCode">String identifier for portfolio e.g. \&quot;SinglePortfolio\&quot; and \&quot;GroupPortfolio\&quot;.</param>
        public AggregationRequest(ResourceId recipeId = default(ResourceId), ConfigurationRecipe inlineRecipe = default(ConfigurationRecipe), DateTimeOffset?asAt = default(DateTimeOffset?), DateTimeOrCutLabel effectiveFrom = default(DateTimeOrCutLabel), DateTimeOrCutLabel effectiveAt = default(DateTimeOrCutLabel), List <AggregateSpec> metrics = default(List <AggregateSpec>), List <string> groupBy = default(List <string>), List <PropertyFilter> filters = default(List <PropertyFilter>), int?limit = default(int?), List <OrderBySpec> sort = default(List <OrderBySpec>), string reportCcy = default(string), string portfolioIdentifierCode = default(string))
        {
            this.AsAt          = asAt;
            this.EffectiveFrom = effectiveFrom;
            // to ensure "effectiveAt" is required (not null)
            if (effectiveAt == null)
            {
                throw new InvalidDataException("effectiveAt is a required property for AggregationRequest and cannot be null");
            }
            else
            {
                this.EffectiveAt = effectiveAt;
            }

            // to ensure "metrics" is required (not null)
            if (metrics == null)
            {
                throw new InvalidDataException("metrics is a required property for AggregationRequest and cannot be null");
            }
            else
            {
                this.Metrics = metrics;
            }

            this.GroupBy   = groupBy;
            this.Filters   = filters;
            this.Limit     = limit;
            this.Sort      = sort;
            this.ReportCcy = reportCcy;
            this.PortfolioIdentifierCode = portfolioIdentifierCode;
            this.RecipeId                = recipeId;
            this.InlineRecipe            = inlineRecipe;
            this.AsAt                    = asAt;
            this.EffectiveFrom           = effectiveFrom;
            this.GroupBy                 = groupBy;
            this.Filters                 = filters;
            this.Limit                   = limit;
            this.Sort                    = sort;
            this.ReportCcy               = reportCcy;
            this.PortfolioIdentifierCode = portfolioIdentifierCode;
        }