public async Task <StripeResponse <Card> > UpdateCard(RecipientCardUpdateArguments arguments,
                                                              CancellationToken cancellationToken = default(CancellationToken))
        {
            var request = new StripeRequest <RecipientCardUpdateArguments, Card>
            {
                UrlPath = PathHelper.GetPath(Paths.Recipients, arguments.RecipientId, Paths.Cards, arguments.CardId),
                Model   = arguments
            };

            return(await _client.Post(request, cancellationToken));
        }
示例#2
0
        public async Task UpdateCardTest()
        {
            var args = new RecipientCardUpdateArguments
            {
                CardId      = "some-value",
                RecipientId = "parent-id"
            };

            _stripe.Post(
                Arg.Is <StripeRequest <RecipientCardUpdateArguments, Card> >(
                    a => a.UrlPath == "recipients/" + args.RecipientId + "/cards/" + args.CardId && a.Model == args),
                _cancellationToken).Returns(Task.FromResult(new StripeResponse <Card>()));
            var response = await _client.UpdateCard(args, _cancellationToken);

            response.Should().NotBeNull();
        }
示例#3
0
 public void Init()
 {
     _args = GenFu.GenFu.New <RecipientCardUpdateArguments>();
 }