public async Task CreateRecipientTest() { var args = new RecipientCreateArguments(); _stripe.Post( Arg.Is<StripeRequest<RecipientCreateArguments, Recipient>>( a => a.UrlPath == "recipients" && a.Model == args), _cancellationToken) .Returns(Task.FromResult(new StripeResponse<Recipient>())); var response = await _client.CreateRecipient(args, _cancellationToken); response.Should().NotBeNull(); }
public async Task<StripeResponse<Recipient>> CreateRecipient(RecipientCreateArguments arguments, CancellationToken cancellationToken = default(CancellationToken)) { var request = new StripeRequest<RecipientCreateArguments, Recipient> { UrlPath = Paths.Recipients, Model = arguments }; return await _client.Post(request, cancellationToken); }
public void Init() { _args = GenFu.GenFu.New<RecipientCreateArguments>(); }