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

            return(await _client.Get(request, cancellationToken));
        }
示例#2
0
        public async Task GetApplicationFeeRefundsTest()
        {
            // Arrange
            var filter = new ApplicationFeeRefundListFilter
            {
                ApplicationFeeId = "application-fee-id"
            };

            _stripe.Get(
                Arg.Is <StripeRequest <ApplicationFeeRefundListFilter, Pagination <ApplicationFeeRefund> > >(
                    a => a.UrlPath == "application_fees/" + filter.ApplicationFeeId + "/refunds"), _cancellationToken)
            .Returns(Task.FromResult(new StripeResponse <Pagination <ApplicationFeeRefund> >()));

            // Act
            var response = await _client.GetApplicationFeeRefunds(filter, _cancellationToken);

            // Assert
            response.Should().NotBeNull();
        }
示例#3
0
 public void Init()
 {
     _filter = GenFu.GenFu.New <ApplicationFeeRefundListFilter>();
 }