コード例 #1
0
 public async Task<StripeResponse<Token>> CreatePiiToken(PiiTokenCreateArguments arguments, CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<PiiTokenCreateArguments, Token>
     {
         UrlPath = Paths.Tokens,
         Model = arguments
     };
     return await _client.Post(request, cancellationToken);
 }
コード例 #2
0
        public async Task CreatePiiTokenTest()
        {
            // Arrange
            var args = new PiiTokenCreateArguments();
            _stripe.Post(
                Arg.Is<StripeRequest<PiiTokenCreateArguments, Token>>(
                    a => a.UrlPath == "tokens" && a.Model == args), _cancellationToken)
                .Returns(Task.FromResult(new StripeResponse<Token>()));

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

            // Assert
            response.Should().NotBeNull();
        }
コード例 #3
0
 public void Init()
 {
     _args = GenFu.GenFu.New<PiiTokenCreateArguments>();
 }