public async Task GetBankAccountsTest()
        {
            // Arrange
            var filter = new AccountBankAccountListFilter
            {
                AccountId = "account-id"
            };

            _stripe.Get(
                Arg.Is <StripeRequest <AccountBankAccountListFilter, Pagination <BankAccount> > >(
                    a => a.UrlPath == "accounts/" + filter.AccountId + "/external_accounts" && a.Model == filter),
                _cancellationToken).Returns(Task.FromResult(new StripeResponse <Pagination <BankAccount> >()));

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

            // Assert
            response.Should().NotBeNull();
        }
Пример #2
0
        public async Task <StripeResponse <Pagination <BankAccount> > > GetBankAccounts(AccountBankAccountListFilter filter,
                                                                                        CancellationToken cancellationToken = default(CancellationToken))
        {
            var request = new StripeRequest <AccountBankAccountListFilter, Pagination <BankAccount> >
            {
                UrlPath = PathHelper.GetPath(Paths.Accounts, filter.AccountId, Paths.ExternalAccounts),
                Model   = filter
            };

            return(await _client.Get(request, cancellationToken));
        }
 public void Init()
 {
     _filter = GenFu.GenFu.New <AccountBankAccountListFilter>();
 }