public async Task <StripeResponse <Account> > UpdateAccount(AccountUpdateArguments arguments, CancellationToken cancellationToken = default(CancellationToken)) { var request = new StripeRequest <AccountUpdateArguments, Account> { UrlPath = PathHelper.GetPath(Paths.Accounts, arguments.AccountId), Model = arguments }; return(await _client.Post(request, cancellationToken)); }
public void Init() { GenFu.GenFu.Configure <DateOfBirthArguments>() .Fill(x => x.Day, () => 10) .Fill(x => x.Month, () => 10) .Fill(x => x.Year, () => 1976); GenFu.GenFu.Configure <AddressArguments>().Fill(x => x.Country, () => "US"); GenFu.GenFu.Configure <AdditionalOwnerArguments>() .Fill(x => x.Address, () => GenFu.GenFu.New <AddressArguments>()) .Fill(x => x.Dob, () => GenFu.GenFu.New <DateOfBirthArguments>()); _args = GenFu.GenFu.New <AccountUpdateArguments>(); }
public async Task UpdateAccountTest() { // Arrange var args = new AccountUpdateArguments { AccountId = "account-id" }; _stripe.Post( Arg.Is <StripeRequest <AccountUpdateArguments, Account> >( a => a.UrlPath == "accounts/" + args.AccountId && a.Model == args), _cancellationToken) .Returns(Task.FromResult(new StripeResponse <Account>())); // Act var response = await _client.UpdateAccount(args, _cancellationToken); // Assert response.Should().NotBeNull(); }
public void Init() { _args = GenFu.GenFu.New <AccountUpdateArguments <CardCreateArguments> >(); }