Ejemplo n.º 1
0
        public async Task <StripeResponse <Plan> > UpdatePlan(PlanUpdateArguments arguments,
                                                              CancellationToken cancellationToken = default(CancellationToken))
        {
            var request = new StripeRequest <PlanUpdateArguments, Plan>
            {
                UrlPath = PathHelper.GetPath(Paths.Plans, arguments.PlanId),
                Model   = arguments
            };

            return(await _client.Post(request, cancellationToken));
        }
Ejemplo n.º 2
0
        public async Task UpdatePlanTest()
        {
            // Arrange
            var args = new PlanUpdateArguments
            {
                PlanId = "plan-id"
            };

            _stripe.Post(
                Arg.Is <StripeRequest <PlanUpdateArguments, Plan> >(
                    a => a.UrlPath == "plans/" + args.PlanId && a.Model == args), _cancellationToken)
            .Returns(Task.FromResult(new StripeResponse <Plan>()));

            // Act
            var response = await _client.UpdatePlan(args, _cancellationToken);

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