public async Task<StripeResponse<Pagination<Event>>> GetEvents(EventListFilter filter,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new StripeRequest<EventListFilter, Pagination<Event>>
     {
         UrlPath = Paths.Events,
         Model = filter
     };
     return await _client.Get(request, cancellationToken);
 }
        public void EventListFilter_DoesNotHaveRequiredFields()
        {
            // Arrange 
            _filter = new EventListFilter();

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

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

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

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