File tree Expand file tree Collapse file tree
main/java/com/maxmind/minfraud Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11CHANGELOG
22=========
33
4+ 1.5.1
5+ -----------------
6+
7+ * Corrected serialization of ` /event/time ` input to be valid RFC 3339. Reported by
8+ Luis Rojas. GitHub #26 .
9+
4101.5.0 (2017-07-07)
511------------------
612
Original file line number Diff line number Diff line change 44import com .fasterxml .jackson .databind .MapperFeature ;
55import com .fasterxml .jackson .databind .ObjectMapper ;
66import com .fasterxml .jackson .databind .SerializationFeature ;
7+ import com .fasterxml .jackson .databind .util .ISO8601DateFormat ;
78
89import java .io .IOException ;
910
@@ -19,6 +20,7 @@ public final String toJson() throws IOException {
1920 mapper .setSerializationInclusion (JsonInclude .Include .NON_EMPTY );
2021 mapper .enable (SerializationFeature .WRITE_ENUMS_USING_TO_STRING );
2122 mapper .disable (MapperFeature .CAN_OVERRIDE_ACCESS_MODIFIERS );
23+ mapper .setDateFormat (new ISO8601DateFormat ());
2224 mapper .configure (SerializationFeature .WRITE_DATES_AS_TIMESTAMPS , false );
2325
2426 return mapper .writeValueAsString (this );
Original file line number Diff line number Diff line change 66import com .fasterxml .jackson .databind .InjectableValues .Std ;
77import com .fasterxml .jackson .databind .MapperFeature ;
88import com .fasterxml .jackson .databind .ObjectMapper ;
9+ import com .fasterxml .jackson .databind .util .ISO8601DateFormat ;
910import com .maxmind .minfraud .exception .*;
1011import com .maxmind .minfraud .request .Transaction ;
1112import com .maxmind .minfraud .response .FactorsResponse ;
@@ -61,6 +62,7 @@ private WebServiceClient(WebServiceClient.Builder builder) {
6162 mapper = new ObjectMapper ();
6263 mapper .disable (MapperFeature .CAN_OVERRIDE_ACCESS_MODIFIERS );
6364 mapper .disable (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES );
65+ mapper .setDateFormat (new ISO8601DateFormat ());
6466
6567 RequestConfig .Builder configBuilder = RequestConfig .custom ()
6668 .setConnectTimeout (builder .connectTimeout )
Original file line number Diff line number Diff line change 22 "event" : {
33 "transaction_id" : " txn3134133" ,
44 "shop_id" : " s2123" ,
5- "time" : " 2012-04-12T23:20:50.052+0000 " ,
5+ "time" : " 2012-04-12T23:20:50Z " ,
66 "type" : " purchase"
77 },
88 "account" : {
You can’t perform that action at this time.
0 commit comments