public async Task<StripeResponse<Pagination<InvoiceItem>>> GetInvoiceItems(InvoiceItemListFilter filter,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<InvoiceItemListFilter, Pagination<InvoiceItem>>
     {
         UrlPath = Paths.InvoiceItems,
         Model = filter
     };
     return await _client.Get(request, cancellationToken);
 }
        public void InvoiceItemListFilter_DoesNotHaveRequiredFields()
        {
            // Arrange 
            _filter = new InvoiceItemListFilter();

            // Act
            var keyValuePairs = StripeClient.GetModelKeyValuePairs(_filter).ToList();

            // Assert
            keyValuePairs.Should().HaveCount(0);
        }
        public async Task GetInvoiceItemsTest()
        {
            // Arrange
            var filter = new InvoiceItemListFilter();
            _stripe.Get(
                Arg.Is<StripeRequest<InvoiceItemListFilter, Pagination<InvoiceItem>>>(
                    a => a.UrlPath == "invoiceitems" && a.Model == filter), _cancellationToken)
                .Returns(Task.FromResult(new StripeResponse<Pagination<InvoiceItem>>()));

            // Act
            var response = await _client.GetInvoiceItems(filter, _cancellationToken);

            // Assert
            response.Should().NotBeNull();
        }
 public void Init()
 {
     _filter = GenFu.GenFu.New<InvoiceItemListFilter>();
 }