public async Task <StripeResponse <ApplicationFeeRefund> > CreateApplicationFeeRefund(
            ApplicationFeeRefundCreateArguments arguments,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            var request = new StripeRequest <ApplicationFeeRefundCreateArguments, ApplicationFeeRefund>
            {
                UrlPath = PathHelper.GetPath(Paths.ApplicationFees, arguments.ApplicationFeeId, Paths.Refunds),
                Model   = arguments
            };

            return(await _client.Post(request, cancellationToken));
        }
Exemple #2
0
        public async Task CreateApplicationFeeRefundTest()
        {
            // Arrange
            var args = new ApplicationFeeRefundCreateArguments
            {
                ApplicationFeeId = "application-fee-id"
            };

            _stripe.Post(
                Arg.Is <StripeRequest <ApplicationFeeRefundCreateArguments, ApplicationFeeRefund> >(
                    a => a.UrlPath == "application_fees/" + args.ApplicationFeeId + "/refunds"), _cancellationToken)
            .Returns(Task.FromResult(new StripeResponse <ApplicationFeeRefund>()));

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

            // Assert
            response.Should().NotBeNull();
        }
Exemple #3
0
 public void Init()
 {
     GenFu.GenFu.Configure <ApplicationFeeRefundCreateArguments>().Fill(x => x.Amount, () => 100);
     _args = GenFu.GenFu.New <ApplicationFeeRefundCreateArguments>();
 }