@@ -24,18 +24,43 @@ To do this, add the dependency to your pom.xml:
2424
2525To use this API, first create a new ` WebServiceClient ` object. The constructor
2626takes your MaxMind user ID, license key, and an optional options array as
27- arguments.
27+ arguments. For example:
28+
29+ ``` java
30+ WebServiceClient client = new WebServiceClient .Builder (6 , " ABCD567890" ). build();
31+ ```
2832
2933Then create a new ` Transaction ` object. This represents the transaction that
3034you are sending to minFraud. The class is instantiated using an inner builder
3135class, ` Transaction.Builder ` . Each builder method takes a corresponding
32- request object. Each of these objects is similarly built up with corresponding
33- builder classes.
36+ request model object. Each of these objects is similarly built up with
37+ corresponding builder classes. For example:
38+
39+ ``` java
40+ Transaction transaction = new Transaction .Builder (
41+ new Device .Builder (InetAddress . getByName(" 1.1.1.1" )). build()
42+ ). email(
43+ new Email .Builder ()
44+ .address(" fraud@ster.com" )
45+ .build()
46+ ). build();
47+ ```
48+
49+ After creating the transaction object, send a Score request by calling the
50+ ` score ` method:
51+
52+ ``` java
53+ Score score = client. score(transaction);
54+ ```
55+
56+ or an Insights request by calling ` insights ` method:
57+
58+ ``` java
59+ Insights score = client. insights(transaction);
60+ ```
3461
35- After creating the request object, send a Score request by calling the ` score `
36- method or an Insights request by calling ` insights ` method with the
37- transaction as a parameter. If the request succeeds, a model object will be
38- returned for the endpoint. If the request fails, an exception will be thrown.
62+ If the request succeeds, a model object will be returned for the endpoint.
63+ If the request fails, an exception will be thrown.
3964
4065See the API documentation for more details.
4166
0 commit comments