コード例 #1
0
        /// <summary>
        /// GetValuationOfWeightedInstruments: Perform valuation for an inlined portfolio Perform valuation on the portfolio that is defined by the weighted set of instruments passed to the request.
        /// </summary>
        /// <exception cref="Lusid.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineValuationRequest">The request specifying the set of portfolios and dates on which to calculate a set of valuation metrics (optional)</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ListAggregationResponse</returns>
        public async System.Threading.Tasks.Task <ListAggregationResponse> GetValuationOfWeightedInstrumentsAsync(InlineValuationRequest inlineValuationRequest = default(InlineValuationRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Lusid.Sdk.Client.ApiResponse <ListAggregationResponse> localVarResponse = await GetValuationOfWeightedInstrumentsWithHttpInfoAsync(inlineValuationRequest, cancellationToken).ConfigureAwait(false);

            return(localVarResponse.Data);
        }
コード例 #2
0
        /// <summary>
        /// GetValuationOfWeightedInstruments: Perform valuation for an inlined portfolio Perform valuation on the portfolio that is defined by the weighted set of instruments passed to the request.
        /// </summary>
        /// <exception cref="Lusid.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineValuationRequest">The request specifying the set of portfolios and dates on which to calculate a set of valuation metrics (optional)</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (ListAggregationResponse)</returns>
        public async System.Threading.Tasks.Task <Lusid.Sdk.Client.ApiResponse <ListAggregationResponse> > GetValuationOfWeightedInstrumentsWithHttpInfoAsync(InlineValuationRequest inlineValuationRequest = default(InlineValuationRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Lusid.Sdk.Client.RequestOptions localVarRequestOptions = new Lusid.Sdk.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json-patch+json",
                "application/json",
                "text/json",
                "application/_*+json"
            };

            // 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.Data = inlineValuationRequest;

            // 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.PostAsync <ListAggregationResponse>("/api/aggregation/$valuationinlined", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

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

            return(localVarResponse);
        }
コード例 #3
0
 /// <summary>
 /// GetValuationOfWeightedInstruments: Perform valuation for an inlined portfolio Perform valuation on the portfolio that is defined by the weighted set of instruments passed to the request.
 /// </summary>
 /// <exception cref="Lusid.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="inlineValuationRequest">The request specifying the set of portfolios and dates on which to calculate a set of valuation metrics (optional)</param>
 /// <returns>ListAggregationResponse</returns>
 public ListAggregationResponse GetValuationOfWeightedInstruments(InlineValuationRequest inlineValuationRequest = default(InlineValuationRequest))
 {
     Lusid.Sdk.Client.ApiResponse <ListAggregationResponse> localVarResponse = GetValuationOfWeightedInstrumentsWithHttpInfo(inlineValuationRequest);
     return(localVarResponse.Data);
 }