1212 */
1313public final class Event extends AbstractModel {
1414
15+ private final Party party ;
1516 private final String transactionId ;
1617 private final String shopId ;
1718 private final ZonedDateTime time ;
1819 private final Type type ;
1920
2021 private Event (Event .Builder builder ) {
22+ party = builder .party ;
2123 transactionId = builder .transactionId ;
2224 shopId = builder .shopId ;
2325 time = builder .time ;
@@ -28,11 +30,21 @@ private Event(Event.Builder builder) {
2830 * {@code Builder} creates instances of {@code Event} from values set by the builder's methods.
2931 */
3032 public static final class Builder {
33+ Party party ;
3134 String transactionId ;
3235 String shopId ;
3336 ZonedDateTime time ;
3437 Type type ;
3538
39+ /**
40+ * @param party The party submitting the transaction.
41+ * @return The builder object.
42+ */
43+ public Event .Builder party (Party party ) {
44+ this .party = party ;
45+ return this ;
46+ }
47+
3648 /**
3749 * @param id Your internal ID for the transaction. We can use this to locate a specific
3850 * transaction in our logs, and it will also show up in email alerts and
@@ -90,6 +102,14 @@ public Event build() {
90102 }
91103 }
92104
105+ /**
106+ * @return The party submitting the transaction.
107+ */
108+ @ JsonProperty ("party" )
109+ public Party getParty () {
110+ return party ;
111+ }
112+
93113 /**
94114 * @return The transaction ID.
95115 */
@@ -142,10 +162,18 @@ public enum Type {
142162 * The account was logged into
143163 */
144164 ACCOUNT_LOGIN ,
165+ /**
166+ * A credit application was submitted
167+ */
168+ CREDIT_APPLICATION ,
145169 /**
146170 * The account email was changed
147171 */
148172 EMAIL_CHANGE ,
173+ /**
174+ * A fund transfer was initiated
175+ */
176+ FUND_TRANSFER ,
149177 /**
150178 * The account password was reset
151179 */
@@ -178,4 +206,25 @@ public String toString() {
178206 return this .name ().toLowerCase ();
179207 }
180208 }
209+
210+ /**
211+ * The enumerated event party types.
212+ */
213+ public enum Party {
214+ /**
215+ * An agent is submitting the transaction
216+ */
217+ AGENT ,
218+ /**
219+ * A customer is submitting the transaction
220+ */
221+ CUSTOMER ;
222+
223+ /**
224+ * @return a string representation of the object.
225+ */
226+ public String toString () {
227+ return this .name ().toLowerCase ();
228+ }
229+ }
181230}
0 commit comments