Beispiel #1
0
 public async Task <SuggestResponse <Party> > SuggestParty(SuggestPartyRequest request)
 {
     return(await
            ExecutePost <SuggestResponse <Party> >(
                method : SuggestionsMethod.Suggest,
                entity : SuggestionsEntity.Party, request : request));
 }
        public async Task <SuggestResponse <Party> > SuggestParty(string query, int count             = 5,
                                                                  CancellationToken cancellationToken = default)
        {
            var request = new SuggestPartyRequest(query, count);

            return(await SuggestParty(request, cancellationToken));
        }
        public async Task SuggestPartyStateCodeTest()
        {
            var request  = new SuggestPartyRequest("6102019481");
            var response = await api.SuggestParty(request);

            Assert.Equal("117", response.suggestions[0].data.state.code);
            Console.WriteLine(string.Join("\n", response.suggestions));
        }
        public void SuggestPartyTypeTest()
        {
            var query = new SuggestPartyRequest("лаукаитис витас");

            query.type = PartyType.INDIVIDUAL;
            var response = api.SuggestParty(query);

            Assert.AreEqual("773165008890", response.suggestions[0].data.inn);
            Console.WriteLine(string.Join("\n", response.suggestions));
        }
        public void SuggestPartyStatusTest()
        {
            var query = new SuggestPartyRequest("витас");

            query.status = new PartyStatus[] { PartyStatus.LIQUIDATED };
            var response = api.SuggestParty(query);

            Assert.AreEqual("4713008497", response.suggestions[0].data.inn);
            Console.WriteLine(string.Join("\n", response.suggestions));
        }
Beispiel #6
0
        public void Load()
        {
            var s = new SuggestPartyRequest("ПСИХОНЕВРОЛОГИЧЕСКИЙ ИНТЕРНАТ № 10")
            {
                count = 2000
            };

            s.type = PartyType.LEGAL;
            var response = Api.SuggestParty(s);
            var party    = response.suggestions[0];
        }
        public async Task SuggestPartyTypeTest()
        {
            var request = new SuggestPartyRequest("лаукаитис витас")
            {
                type = PartyType.INDIVIDUAL
            };
            var response = await api.SuggestParty(request);

            Assert.Equal("773165008890", response.suggestions[0].data.inn);
            Console.WriteLine(string.Join("\n", response.suggestions));
        }
        public async Task SuggestPartyStatusBankruptTest()
        {
            var request = new SuggestPartyRequest("6102019481")
            {
                status = new[] { PartyStatus.BANKRUPT }
            };
            var response = await api.SuggestParty(request);

            Assert.Equal("6102019481", response.suggestions[0].data.inn);
            Console.WriteLine(string.Join("\n", response.suggestions));
        }
        public async Task SuggestPartyStatusTest()
        {
            var request = new SuggestPartyRequest("4713008497")
            {
                status = new[] { PartyStatus.LIQUIDATED }
            };
            var response = await api.SuggestParty(request);

            Assert.Equal("4713008497", response.suggestions[0].data.inn);
            Console.WriteLine(string.Join("\n", response.suggestions));
        }
        public async Task SuggestPartyByOkvedTest()
        {
            var query = new SuggestPartyRequest("авиа")
            {
                okved = new[] { "85.22" }
            };
            var response = await api.SuggestParty(query);

            var party = response.suggestions[0];

            Assert.Equal("7712038455", party.data.inn);
            Console.WriteLine(string.Join("\n", response.suggestions));
        }
        public async Task <SuggestResponse <Party> > SuggestParty(string query, int count = 5)
        {
            var request = new SuggestPartyRequest(query, count);

            return(await SuggestParty(request));
        }
Beispiel #12
0
        public SuggestResponse <Party> SuggestParty(string query, int count = 5)
        {
            var request = new SuggestPartyRequest(query, count);

            return(SuggestParty(request));
        }
Beispiel #13
0
 public SuggestResponse <Party> SuggestParty(SuggestPartyRequest request)
 {
     return(Execute <SuggestResponse <Party> >(method: SuggestionsMethod.Suggest, entity: SuggestionsEntity.Party, request: request));
 }
 public async Task <SuggestResponse <Party> > SuggestParty(SuggestPartyRequest request,
                                                           CancellationToken cancellationToken = default)
 {
     return(await Execute <SuggestResponse <Party> >(method : SuggestionsMethod.Suggest,
                                                     entity : SuggestionsEntity.Party, request : request, cancellationToken : cancellationToken));
 }