public async Task GetBankAccountsTest()
        {
            // Arrange
            var filter = new CustomerBankAccountListFilter
            {
                CustomerId = "customer-id"
            };
            _stripe.Get(
                Arg.Is<StripeRequest<CustomerBankAccountListFilter, Pagination<BankAccount>>>(
                    a => a.UrlPath == "customers/" + filter.CustomerId + "/sources" && a.Model == filter),
                _cancellationToken).Returns(Task.FromResult(new StripeResponse<Pagination<BankAccount>>()));

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

            // Assert
            response.Should().NotBeNull();
        }
Ejemplo n.º 2
0
 public async Task<StripeResponse<Pagination<BankAccount>>> GetBankAccounts(CustomerBankAccountListFilter filter,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<CustomerBankAccountListFilter, Pagination<BankAccount>>
     {
         UrlPath = PathHelper.GetPath(Paths.Customers, filter.CustomerId, Paths.Sources),
         Model = filter
     };
     return await _client.Get(request, cancellationToken);
 }
 public void Init()
 {
     _filter = GenFu.GenFu.New<CustomerBankAccountListFilter>();
 }