public async Task UpdateCardTest()
        {
            // Arrange
            var args = new CustomerCardUpdateArguments
            {
                CardId = "card-id",
                CustomerId = "customer-id"
            };
            _stripe.Post(
                Arg.Is<StripeRequest<CustomerCardUpdateArguments, Card>>(
                    a => a.UrlPath == "customers/" + args.CustomerId + "/sources/" + args.CardId && a.Model == args),
                _cancellationToken).Returns(Task.FromResult(new StripeResponse<Card>()));

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

            // Assert
            response.Should().NotBeNull();
        }
예제 #2
0
 public async Task<StripeResponse<Card>> UpdateCard(CustomerCardUpdateArguments arguments,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<CustomerCardUpdateArguments, Card>
     {
         UrlPath = PathHelper.GetPath(Paths.Customers, arguments.CustomerId, Paths.Sources, arguments.CardId),
         Model = arguments
     };
     return await _client.Post(request, cancellationToken);
 }
 public void Init()
 {
     _args = GenFu.GenFu.New<CustomerCardUpdateArguments>();
 }