private static PubCalculationParametersRoot GetPubCalculationParameters()
        {
            var pubAccountIdentifier = new PubIdentifier(PubAccountId);
            var pubDates             = new PubDateParameters(StartDate, EndDate);

            var pubCalculation = new PubCalculationParameters(PubDocument, pubAccountIdentifier, pubDates);

            var calculationParameters = new PubCalculationParametersRoot
            {
                Data = new Dictionary <string, PubCalculationParameters> {
                    { "1", pubCalculation }, { "2", pubCalculation }
                }
            };

            return(calculationParameters);
        }
Exemplo n.º 2
0
        private ApiResponse <object> RunCalculation()
        {
            var pubAccountIdentifier = new PubIdentifier(CommonParameters.PubAccountName);
            var pubDates             = new PubDateParameters(CommonParameters.PubStartDate, CommonParameters.PubEndDate);

            var pubCalculation = new PubCalculationParameters(CommonParameters.PubDocumentName, pubAccountIdentifier, pubDates);

            var calculationParameters = new PubCalculationParametersRoot
            {
                Data = new Dictionary <string, PubCalculationParameters> {
                    { "1", pubCalculation }, { "2", pubCalculation }
                }
            };

            var response = calculationsApi.PostAndCalculateWithHttpInfo(null, "max-stale=0", calculationParameters);

            return(response);
        }
Exemplo n.º 3
0
        private ApiResponse <object> RunCalculation()
        {
            var parameters = new Calculation();

            var pubAccountIdentifier = new PubIdentifier(CommonParameters.PubAccountName);
            var pubDateParameters    = new PubDateParameters(CommonParameters.PubStartDate, CommonParameters.PubEndDate);

            var pubCalculation = new PubCalculationParameters(CommonParameters.PubDocumentName, pubAccountIdentifier,
                                                              pubDateParameters);

            parameters.Pub = new Dictionary <string, PubCalculationParameters> {
                { "1", pubCalculation }
            };

            var response = _calculationsApi.RunCalculationWithHttpInfo(parameters);

            return(response);
        }