public async Task <StripeResponse <Pagination <Customer> > > GetCustomers(CustomerListFilter filter, CancellationToken cancellationToken = default(CancellationToken)) { var request = new StripeRequest <CustomerListFilter, Pagination <Customer> > { UrlPath = Paths.Customers, Model = filter }; return(await _client.Get(request, cancellationToken)); }
public void CustomerListFilter_DoesNotHaveRequiredFields() { // Arrange _filter = new CustomerListFilter(); // Act var keyValuePairs = StripeClient.GetModelKeyValuePairs(_filter).ToList(); // Assert keyValuePairs.Should().HaveCount(0); }
public async Task GetCustomersTest() { // Arrange var filter = new CustomerListFilter(); _stripe.Get( Arg.Is <StripeRequest <CustomerListFilter, Pagination <Customer> > >( a => a.UrlPath == "customers" && a.Model == filter), _cancellationToken) .Returns(Task.FromResult(new StripeResponse <Pagination <Customer> >())); // Act var response = await _client.GetCustomers(filter, _cancellationToken); // Assert response.Should().NotBeNull(); }
/// <summary> /// Gets a list of up to 250 of the shop's customers. /// </summary> public virtual async Task <ListResult <Customer> > ListAsync(CustomerListFilter filter, CancellationToken cancellationToken = default) { return(await ListAsync(filter?.AsListFilter(), cancellationToken)); }
/// <summary> /// Gets a list of up to 250 of the shop's customers. /// </summary> public virtual async Task <ListResult <Customer> > ListAsync(CustomerListFilter filter) { return(await ListAsync(filter?.AsListFilter())); }
public void Init() { _filter = GenFu.GenFu.New <CustomerListFilter>(); }