jaymedavis/stripe.net — pull request #130 by richardlawley (2014-01-12 15:33:16+00:00)
Title: Add Date Filtering on List Methods

This commit introduces changes to the method signature of List methods to take an options object, rather than individual parameters. On list methods which support the date filter in the Stripe API, there is a parameter of type "StripeDateFilter". This contains the properties necessary to perform the date comparisons supported by Stripe. This is different the approach previously taken on StripeEventSearchOptions, which had 5 parameters to support this filter.

Unit tests for the date filtering have been added for the charge service - I was reluctant to add tests for all of the places this logic can be used, as these tests cannot be run in parallel with other tests as they rely on only certain tests being created between two times (there is a Serial attribute on this tests which prevents NCrunch from running this test in parallel with any others).

Support for this parameter is handled inside ParameterBuilder, which performs custom serialisation logic on a parameter with this type.

I've also added some unit tests for the ParameterBuilder object (hence the requirement for InternalsVisibleTo) and moved the Epoch Time handling functions (which were duplicated) to a single location.