Exemplo n.º 1
0
        public async Task GetOnvoice_should_return_Ubl_Model()
        {
            var query = new QueryFilterBuilder <OutboxInvoiceGetModel>()
                        .PageIndex(1)
                        .PageSize(3)
                        .QueryFor(q => q.Currency, Operator.Equal, "TRY")
                        .Build();
            var pageList = await inboxInvoiceClient.Get(query);

            var model = pageList.Items.FirstOrDefault();

            var response = await inboxInvoiceClient.GetInvoice(model.Id);

            Assert.Equal(response.InvoiceId, model.Id);
            Assert.NotNull(response.AddressBook);
            Assert.NotNull(response.GeneralInfoModel);
        }
 [HttpGet("getinvoice/{id}")] //1d9a9825-d0bb-4303-9d87-f3ae435cedc4
 public async Task <ActionResult <UblBuilderModel> > GetInvoice(Guid id)
 {
     return(await inboxInvoiceClient.GetInvoice(id));
 }