public async Task <StripeResponse <Pagination <Transfer> > > GetTransfers(TransferListFilter filter, CancellationToken cancellationToken = default(CancellationToken)) { var request = new StripeRequest <TransferListFilter, Pagination <Transfer> > { UrlPath = Paths.Transfers, Model = filter }; return(await _client.Get(request, cancellationToken)); }
public void TransferListFilter_DoesNotHaveRequiredFields() { // Arrange _filter = new TransferListFilter(); // Act var keyValuePairs = StripeClient.GetModelKeyValuePairs(_filter).ToList(); // Assert keyValuePairs.Should().HaveCount(0); }
public async Task GetTransfersTest() { // Arrange var filter = new TransferListFilter(); _stripe.Get( Arg.Is <StripeRequest <TransferListFilter, Pagination <Transfer> > >( a => a.UrlPath == "transfers" && a.Model == filter), _cancellationToken) .Returns(Task.FromResult(new StripeResponse <Pagination <Transfer> >())); // Act var response = await _client.GetTransfers(filter, _cancellationToken); // Assert response.Should().NotBeNull(); }
public void Init() { _filter = GenFu.GenFu.New <TransferListFilter>(); }