public async Task <StripeResponse <Pagination <InvoiceLineItem> > > GetInvoiceLineItems( InvoiceLineItemListFilter filter, CancellationToken cancellationToken = default(CancellationToken)) { var request = new StripeRequest <InvoiceLineItemListFilter, Pagination <InvoiceLineItem> > { UrlPath = PathHelper.GetPath(Paths.Invoices, filter.InvoiceId, Paths.Lines), Model = filter }; return(await _client.Get(request, cancellationToken)); }
public async Task GetInvoiceLineItemsTest() { // Arrange var filter = new InvoiceLineItemListFilter { InvoiceId = "invoice-id" }; _stripe.Get( Arg.Is <StripeRequest <InvoiceLineItemListFilter, Pagination <InvoiceLineItem> > >( a => a.UrlPath == "invoices/" + filter.InvoiceId + "/lines" && a.Model == filter), _cancellationToken).Returns(Task.FromResult(new StripeResponse <Pagination <InvoiceLineItem> >())); // Act var response = await _client.GetInvoiceLineItems(filter, _cancellationToken); // Assert response.Should().NotBeNull(); }
public void Init() { _filter = GenFu.GenFu.New <InvoiceLineItemListFilter>(); }