public async Task<StripeResponse<Pagination<Coupon>>> GetCoupons(CouponListFilter filter,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<CouponListFilter, Pagination<Coupon>>
     {
         UrlPath = Paths.Coupons,
         Model = filter
     };
     return await _client.Get(request, cancellationToken);
 }
        public void CouponListFilter_DoesNotHaveRequiredFields()
        {
            // Arrange 
            _filter = new CouponListFilter();

            // Act
            var keyValuePairs = StripeClient.GetModelKeyValuePairs(_filter).ToList();

            // Assert
            keyValuePairs.Should().HaveCount(0);
        }
        public async Task GetCouponsTest()
        {
            // Arrange
            var filter = new CouponListFilter();
            _stripe.Get(
                Arg.Is<StripeRequest<CouponListFilter, Pagination<Coupon>>>(
                    a => a.UrlPath == "coupons" && a.Model == filter), _cancellationToken)
                .Returns(Task.FromResult(new StripeResponse<Pagination<Coupon>>()));

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

            // Assert
            response.Should().NotBeNull();
        }
 public void Init()
 {
     _filter = GenFu.GenFu.New<CouponListFilter>();
 }