jaymedavis/stripe.net — pull request #17 by jslaybaugh (2012-02-26 03:52:42+00:00)
Title: StripeEventSearchOptions

OK, it *almost* worked. The implementation was correct, but we needed to do the datetime-to-epoch conversions on all the dates, not just `Created`, so here is a pull-request with that class updated. With the updated class in my code, these are the "tests" I ran, and everything came back peachy:

public void TestStripe()
{
var k = new StripeEventService();

var test0 = k.Get("evt_qmKj4NlutHhyvt"); // should return this specific event with correct properties, did
var test1 = k.List(100, 0, null); // should return 100, did
var test2 = k.List(100, 0, new StripeEventSearchOptions { Type = "charge.failed" }); // should return 2, did
var test3 = k.List(100, 0, new StripeEventSearchOptions { Type = "invoice.*" }); // should return 43, did
var test4 = k.List(100, 0, new StripeEventSearchOptions { Created = new DateTime(2012, 2, 21, 21, 57, 13) }); // should return 3, did
var test5 = k.List(100, 0, new StripeEventSearchOptions { GreaterThan = new DateTime(2012, 2, 21, 21, 57, 13) }); // should return 2, did
var test6 = k.List(100, 0, new StripeEventSearchOptions { GreaterThanOrEqualTo = new DateTime(2012, 2, 21, 21, 57, 13) }); // should return 5, did
var test7 = k.List(100, 0, new StripeEventSearchOptions { LessThan = new DateTime(2012, 2, 21, 21, 57, 13) }); // should return 100, did
var test8 = k.List(100, 0, new StripeEventSearchOptions { LessThanOrEqualTo = new DateTime(2012, 2, 21, 21, 57, 13) }); // should return 100, did

var boom = "stop"; // breakpoint

}