Ejemplo n.º 1
0
        public async Task <StripeResponse <Charge> > UpdateCharge(ChargeUpdateArguments arguments,
                                                                  CancellationToken cancellationToken = default(CancellationToken))
        {
            var request = new StripeRequest <ChargeUpdateArguments, Charge>
            {
                UrlPath = PathHelper.GetPath(Paths.Charges, arguments.ChargeId),
                Model   = arguments
            };

            return(await _client.Post(request, cancellationToken));
        }
Ejemplo n.º 2
0
        public async Task UpdateChargeTest()
        {
            var args = new ChargeUpdateArguments
            {
                ChargeId = "some-value"
            };

            _stripe.Post(
                Arg.Is <StripeRequest <ChargeUpdateArguments, Charge> >(
                    a => a.UrlPath == "charges/" + args.ChargeId && a.Model == args), _cancellationToken)
            .Returns(Task.FromResult(new StripeResponse <Charge>()));
            var response = await _client.UpdateCharge(args, _cancellationToken);

            response.Should().NotBeNull();
        }
Ejemplo n.º 3
0
 public void Init()
 {
     _args = GenFu.GenFu.New <ChargeUpdateArguments>();
 }