public async Task UpdateBankAccountTest()
        {
            // Arrange
            var args = new CustomerBankAccountUpdateArguments
            {
                BankAccountId = "some-value",
                CustomerId = "customer-id"
            };
            _stripe.Post(
                Arg.Is<StripeRequest<CustomerBankAccountUpdateArguments, BankAccount>>(
                    a => a.UrlPath == "customers/" + args.CustomerId + "/sources/" + args.BankAccountId && a.Model == args),
                _cancellationToken).Returns(Task.FromResult(new StripeResponse<BankAccount>()));

            // Act
            var response = await _client.UpdateBankAccount(args, _cancellationToken);

            // Assert
            response.Should().NotBeNull();
        }
Пример #2
0
 public async Task<StripeResponse<BankAccount>> UpdateBankAccount(CustomerBankAccountUpdateArguments arguments,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<CustomerBankAccountUpdateArguments, BankAccount>
     {
         UrlPath = PathHelper.GetPath(Paths.Customers, arguments.CustomerId, Paths.Sources, arguments.BankAccountId),
         Model = arguments
     };
     return await _client.Post(request, cancellationToken);
 }
 public void Init()
 {
     _args = GenFu.GenFu.New<CustomerBankAccountUpdateArguments>();
 }