Esempio n. 1
0
 public async Task<StripeResponse<Token>> CreateBankAccountToken(BankAccountTokenCreateArguments arguments,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<BankAccountTokenCreateArguments, Token>
     {
         UrlPath = Paths.Tokens,
         Model = arguments
     };
     return await _client.Post(request, cancellationToken);
 }
        public async Task CreateBankAccountTokenTest()
        {
            // Arrange
            var args = new BankAccountTokenCreateArguments();
            _stripe.Post(
                Arg.Is<StripeRequest<BankAccountTokenCreateArguments, Token>>(
                    a => a.UrlPath == "tokens" && a.Model == args), _cancellationToken)
                .Returns(Task.FromResult(new StripeResponse<Token>()));

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

            // Assert
            response.Should().NotBeNull();
        }
 public void Init()
 {
     _args = GenFu.GenFu.New<BankAccountTokenCreateArguments>();
 }