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(); }
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); }
public void Init() { _args = GenFu.GenFu.New<RecipientCardUpdateArguments>(); }