@@ -14,7 +14,7 @@ Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/mai
1414import com.mindee.MindeeClient ;
1515import com.mindee.input.LocalInputSource ;
1616import com.mindee.parsing.common.AsyncPredictResponse ;
17- import com.mindee.product.us.usmail.UsMailV2 ;
17+ import com.mindee.product.us.usmail.UsMailV3 ;
1818import java.io.File ;
1919import java.io.IOException ;
2020
@@ -31,8 +31,8 @@ public class SimpleMindeeClient {
3131 LocalInputSource inputSource = new LocalInputSource (new File (filePath));
3232
3333 // Parse the file asynchronously
34- AsyncPredictResponse<UsMailV2 > response = mindeeClient. enqueueAndParse(
35- UsMailV2 . class,
34+ AsyncPredictResponse<UsMailV3 > response = mindeeClient. enqueueAndParse(
35+ UsMailV3 . class,
3636 inputSource
3737 );
3838
@@ -57,7 +57,20 @@ public class SimpleMindeeClient {
5757
5858** Output (RST):**
5959``` rst
60- :Sender Name: zed
60+ ########
61+ Document
62+ ########
63+ :Mindee ID: f9c36f59-977d-4ddc-9f2d-31c294c456ac
64+ :Filename: default_sample.jpg
65+
66+ Inference
67+ #########
68+ :Product: mindee/us_mail v3.0
69+ :Rotation applied: Yes
70+
71+ Prediction
72+ ==========
73+ :Sender Name: company zed
6174:Sender Address:
6275 :City: Dallas
6376 :Complete Address: 54321 Elm Street, Dallas, Texas 54321
@@ -66,11 +79,12 @@ public class SimpleMindeeClient {
6679 :Street: 54321 Elm Street
6780:Recipient Names: Jane Doe
6881:Recipient Addresses:
69- +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+
70- | City | Complete Address | Is Address Change | Postal Code | Private Mailbox Number | State | Street |
71- +=================+=====================================+===================+=============+========================+=======+===========================+
72- | Detroit | 1234 Market Street PMB 4321, Det... | | 12345 | 4321 | MI | 1234 Market Street |
73- +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+
82+ +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+-----------------+
83+ | City | Complete Address | Is Address Change | Postal Code | Private Mailbox Number | State | Street | Unit |
84+ +=================+=====================================+===================+=============+========================+=======+===========================+=================+
85+ | Detroit | 1234 Market Street PMB 4321, Det... | False | 12345 | 4321 | MI | 1234 Market Street | |
86+ +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+-----------------+
87+ :Return to Sender: False
7488```
7589
7690# Field Types
@@ -96,13 +110,17 @@ The text field `StringField` extends `BaseField`, but also implements:
96110* ** value** (` String ` ): corresponds to the field value.
97111* ** rawValue** (` String ` ): corresponds to the raw value as it appears on the document.
98112
113+ ### BooleanField
114+ The boolean field ` BooleanField ` extends BaseField, but also implements:
115+ * ** value** (` Boolean ` ): corresponds to the value of the field.
116+
99117## Specific Fields
100118Fields which are specific to this product; they are not used in any other product.
101119
102120### Recipient Addresses Field
103121The addresses of the recipients.
104122
105- A ` UsMailV2RecipientAddress ` implements the following attributes:
123+ A ` UsMailV3RecipientAddress ` implements the following attributes:
106124
107125* ** city** (` String ` ): The city of the recipient's address.
108126* ** complete** (` String ` ): The complete address of the recipient.
@@ -111,12 +129,13 @@ A `UsMailV2RecipientAddress` implements the following attributes:
111129* ** privateMailboxNumber** (` String ` ): The private mailbox number of the recipient's address.
112130* ** state** (` String ` ): Second part of the ISO 3166-2 code, consisting of two letters indicating the US State.
113131* ** street** (` String ` ): The street of the recipient's address.
132+ * ** unit** (` String ` ): The unit number of the recipient's address.
114133Fields which are specific to this product; they are not used in any other product.
115134
116135### Sender Address Field
117136The address of the sender.
118137
119- A ` UsMailV2SenderAddress ` implements the following attributes:
138+ A ` UsMailV3SenderAddress ` implements the following attributes:
120139
121140* ** city** (` String ` ): The city of the sender's address.
122141* ** complete** (` String ` ): The complete address of the sender.
@@ -125,10 +144,17 @@ A `UsMailV2SenderAddress` implements the following attributes:
125144* ** street** (` String ` ): The street of the sender's address.
126145
127146# Attributes
128- The following fields are extracted for US Mail V2:
147+ The following fields are extracted for US Mail V3:
148+
149+ ## Return to Sender
150+ ** isReturnToSender** : Whether the mailing is marked as return to sender.
151+
152+ ``` java
153+ System . out. println(result. getDocument(). getInference(). getPrediction(). getIsReturnToSender(). value);
154+ ```
129155
130156## Recipient Addresses
131- ** recipientAddresses** (List<[ UsMailV2RecipientAddress ] ( #recipient-addresses-field ) >): The addresses of the recipients.
157+ ** recipientAddresses** (List<[ UsMailV3RecipientAddress ] ( #recipient-addresses-field ) >): The addresses of the recipients.
132158
133159``` java
134160for (recipientAddressesElem : result. getDocument(). getInference(). getPrediction(). getRecipientAddresses())
@@ -148,7 +174,7 @@ for (recipientNamesElem : result.getDocument().getInference().getPrediction().ge
148174```
149175
150176## Sender Address
151- ** senderAddress** ([ UsMailV2SenderAddress ] ( #sender-address-field ) ): The address of the sender.
177+ ** senderAddress** ([ UsMailV3SenderAddress ] ( #sender-address-field ) ): The address of the sender.
152178
153179``` java
154180System . out. println(result. getDocument(). getInference(). getPrediction(). getSenderAddress(). value);
0 commit comments