public async Task<StripeResponse<Charge>> CaptureCharge(ChargeCaptureArguments arguments, CancellationToken cancellationToken = default(CancellationToken)) { var request = new StripeRequest<ChargeCaptureArguments, Charge> { UrlPath = PathHelper.GetPath(Paths.Charges, arguments.ChargeId, Paths.Capture), Model = arguments }; return await _client.Post(request, cancellationToken); }
public async Task CaptureChargeTest() { var args = new ChargeCaptureArguments { ChargeId = "some-value" }; _stripe.Post( Arg.Is<StripeRequest<ChargeCaptureArguments, Charge>>( a => a.UrlPath == "charges/" + args.ChargeId + "/capture" && a.Model == args), _cancellationToken) .Returns(Task.FromResult(new StripeResponse<Charge>())); var response = await _client.CaptureCharge(args, _cancellationToken); response.Should().NotBeNull(); }
public void Init() { _args = GenFu.GenFu.New<ChargeCaptureArguments>(); }