/// <summary>
        /// Check document redirection possibility
        /// </summary>
        /// <param name="checkRedirectionPossibilityRequest">Check document redirection request</param>
        /// <returns>Check document redirection possibility response</returns>
        public virtual IResponseEnvelope <CheckRedirectionPossibilityResponse.ResponseItem> CheckPossibilityForRedirecting(CheckRedirectionPossibilityRequest checkRedirectionPossibilityRequest)
        {
            var request = new RequestEnvelope <CheckRedirectionPossibilityRequest>(checkRedirectionPossibilityRequest)
            {
                CalledMethod = "checkPossibilityForRedirecting",
                ModelName    = MODEL
            };

            var response = _novaPoshtaGateway.CreateRequest <CheckRedirectionPossibilityRequest, CheckRedirectionPossibilityResponse>(request);

            return(response);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Represents 'save' method of 'ContactPerson' model.
        /// Documentation: https://devcenter.novaposhta.ua/docs/services/557eb8c8a0fe4f02fc455b2d/operations/55828c4ca0fe4f0adc08ef27
        /// </summary>
        /// <param name="createContactPersonRequest">Create contact person request</param>
        /// <returns>Created contact person</returns>
        public virtual IResponseEnvelope <CounterpartyContactPerson> Create(CreateContactPersonRequest createContactPersonRequest)
        {
            var request = new RequestEnvelope <CreateContactPersonRequest>(createContactPersonRequest)
            {
                CalledMethod = "save",
                ModelName    = MODEL
            };

            var response = _novaPoshtaGateway.CreateRequest <CreateContactPersonRequest, CreateContactPersonResponse>(request);

            return(response);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Get document changes availability state
        /// </summary>
        /// <param name="checkDocumentChangesAvailabilityRequest">Chec the document changes availability state request</param>
        /// <returns>Changes availability response</returns>
        public virtual IResponseEnvelope <CheckDocumentChangesAvailabilityResponse.ChangesAvailabilityItem> CheckPossibilityChangeEW(CheckDocumentChangesAvailabilityRequest checkDocumentChangesAvailabilityRequest)
        {
            var request = new RequestEnvelope <CheckDocumentChangesAvailabilityRequest>(checkDocumentChangesAvailabilityRequest)
            {
                ApiKey       = _novaPoshtaGateway.ApiKey,
                CalledMethod = "CheckPossibilityChangeEW",
                ModelName    = MODEL
            };

            var response = _novaPoshtaGateway.CreateRequest <CheckDocumentChangesAvailabilityRequest, CheckDocumentChangesAvailabilityResponse>(request);

            return(response);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Get all account scan sheets.
        /// Documentation: https://devcenter.novaposhta.ua/docs/services/55662bd3a0fe4f10086ec96e/operations/556c7734a0fe4f08e8f7ce31
        /// </summary>
        /// <returns></returns>
        public virtual IResponseEnvelope <GetScanSheetListResponse.ScanSheet> GetScanSheets()
        {
            var request = new RequestEnvelope <EmptyRequest>()
            {
                ApiKey       = _novaPoshtaGateway.ApiKey,
                CalledMethod = "getScanSheetList",
                ModelName    = MODEL
            };

            var response = _novaPoshtaGateway.CreateRequest <EmptyRequest, GetScanSheetListResponse>(request);

            return(response);
        }
        /// <summary>
        /// Get client documents list from 'Nova Poshta' service. Represents method 'getDocumentList' of 'InternalDocument' model.
        /// Documentation: https://devcenter.novaposhta.ua/docs/services/556eef34a0fe4f02049c664e/operations/557eb417a0fe4f02fc455b2c
        /// </summary>
        /// <param name="getDocumentsListRequest">Get documents list request</param>
        /// <returns>Documents list</returns>
        public virtual IResponseEnvelope <GetDocumentListResponse.Document> GetDocumentList(GetDocumentsListRequest getDocumentsListRequest)
        {
            var request = new RequestEnvelope <GetDocumentsListRequest>(getDocumentsListRequest)
            {
                ApiKey       = _novaPoshtaGateway.ApiKey,
                CalledMethod = "getDocumentList",
                ModelName    = MODEL
            };

            var response = _novaPoshtaGateway.CreateRequest <GetDocumentsListRequest, GetDocumentListResponse>(request);

            return(response);
        }
        /// <summary>
        /// Get counterparty addresses. Represents 'getCounterpartyAddresses' method of 'Counterparty' model.
        /// Documentation: https://devcenter.novaposhta.ua/docs/services/557eb8c8a0fe4f02fc455b2d/operations/557fdcb4a0fe4f105c087611
        /// </summary>
        /// <param name="getCounterpartyAddressesRequest">Get counterparty addresses request</param>
        /// <returns>Array of counterparty addresses</returns>
        public virtual IResponseEnvelope <GetCounterpartyAddressesResponse.CounterpartyAddress> GetCounterpartyAddresses(GetCounterpartyAddressesRequest getCounterpartyAddressesRequest)
        {
            var request = new RequestEnvelope <GetCounterpartyAddressesRequest>(getCounterpartyAddressesRequest)
            {
                CalledMethod = "getCounterpartyAddresses",
                ModelName    = MODEL
            };

            var response = _novaPoshtaGateway.CreateRequest <GetCounterpartyAddressesRequest, GetCounterpartyAddressesResponse>(request);

            return(response);
        }
Exemplo n.º 7
0
        /// <summary>
        /// Check document return possibility.
        /// Documentation: https://devcenter.novaposhta.ua/docs/services/58ad7185eea27006cc36d649/operations/58b6b830ff2c200cd80adb91
        /// </summary>
        /// <param name="checkReturnPossibilityRequest">Request body</param>
        /// <returns>List of documents</returns>
        public virtual IResponseEnvelope <CheckReturnPossibilityResponse.Document> CheckPossibilityCreateReturn(CheckReturnPossibilityRequest checkReturnPossibilityRequest)
        {
            var request = new RequestEnvelope <CheckReturnPossibilityRequest>(checkReturnPossibilityRequest)
            {
                CalledMethod = "CheckPossibilityCreateReturn",
                ModelName    = MODEL
            };

            var response = _novaPoshtaGateway.CreateRequest <CheckReturnPossibilityRequest, CheckReturnPossibilityResponse>(request);

            return(response);
        }
        /// <summary>
        /// Search settlements by name.
        /// Create request to 'SearchSettlements' Nova Poshta service method.
        /// Documentation: https://devcenter.novaposhta.ua/docs/services/556d7ccaa0fe4f08e8f7ce43/operations/58e5ebeceea27017bc851d67
        /// </summary>
        /// <param name="request">Search settlement request method properties</param>
        /// <returns>Settlements list</returns>
        public virtual IResponseEnvelope <SettlementsSearchResponse.ResponseItem> SearchSettlements(SettlementsSearchRequest request)
        {
            var fullRequestBody = new RequestEnvelope <SettlementsSearchRequest>()
            {
                ApiKey           = _novaPoshtaGateway.ApiKey,
                CalledMethod     = "searchSettlements",
                ModelName        = MODEL,
                MethodProperties = request
            };

            var response = _novaPoshtaGateway.CreateRequest <SettlementsSearchRequest, SettlementsSearchResponse>(fullRequestBody);

            return(response);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Get list of time intervals. Represents method 'getTimeIntervals' from 'Common' model.
        /// Documentation: https://devcenter.novaposhta.ua/docs/services/55702570a0fe4f0cf4fc53ed/operations/55702571a0fe4f0b6483890f
        /// </summary>
        /// <param name="request">Get time intervals request</param>
        /// <returns>Time intervals response</returns>
        public virtual IResponseEnvelope <GetTimeIntervalsResponse.TimeInterval> GetTimeIntervals(GetTimeIntervalsRequest request)
        {
            var fullRequest = new RequestEnvelope <GetTimeIntervalsRequest>(request)
            {
                ApiKey       = _novaPoshtaGateway.ApiKey,
                CalledMethod = "getTimeIntervals",
                ModelName    = MODEL,
            };

            var response = _novaPoshtaGateway.CreateRequest <GetTimeIntervalsRequest, GetTimeIntervalsResponse>(fullRequest);

            return(response);
        }