Exemplo n.º 1
0
        public async Task <StripeResponse <Refund> > UpdateRefund(RefundUpdateArguments arguments,
                                                                  CancellationToken cancellationToken = default(CancellationToken))
        {
            var request = new StripeRequest <RefundUpdateArguments, Refund>
            {
                UrlPath = PathHelper.GetPath(Paths.Refunds, arguments.RefundId),
                Model   = arguments
            };

            return(await _client.Post(request, cancellationToken));
        }
        public async Task UpdateRefundTest()
        {
            var args = new RefundUpdateArguments
            {
                RefundId = "refund-id",
                ChargeId = "some-value"
            };

            _stripe.Post(
                Arg.Is <StripeRequest <RefundUpdateArguments, Refund> >(
                    a => a.UrlPath == "refunds/" + args.RefundId && a.Model == args),
                _cancellationToken).Returns(Task.FromResult(new StripeResponse <Refund>()));
            var response = await _client.UpdateRefund(args, _cancellationToken);

            response.Should().NotBeNull();
        }
 public void Init()
 {
     _args = GenFu.GenFu.New <RefundUpdateArguments>();
 }