Skip to content

Commit b7230b7

Browse files
committed
[API-5912] Adding $user_email to $login event
1 parent a910afe commit b7230b7

File tree

5 files changed

+21
-3
lines changed

5 files changed

+21
-3
lines changed

CHANGES.MD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
3.4.1 (2021-10-05)
2+
=================
3+
- Add support for `$user_email` field to `$login` event
4+
15
3.4.0 (2020-05-05)
26
=================
37
- Add support for `$decline_category` field to `$transaction` event

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ Java 1.7 or later.
1313
<dependency>
1414
<groupId>com.siftscience</groupId>
1515
<artifactId>sift-java</artifactId>
16-
<version>3.4.0</version>
16+
<version>3.4.1</version>
1717
</dependency>
1818
```
1919
### Gradle
2020
```
2121
dependencies {
22-
compile 'com.siftscience:sift-java:3.4.0'
22+
compile 'com.siftscience:sift-java:3.4.1'
2323
}
2424
```
2525
### Other

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apply plugin: 'signing'
55
apply plugin: 'java-library-distribution'
66

77
group = 'com.siftscience'
8-
version = '3.4.0'
8+
version = '3.4.1'
99

1010
repositories {
1111
mavenCentral()

src/main/java/com/siftscience/model/LoginFieldSet.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public static LoginFieldSet fromJson(String json) {
1515
@Expose @SerializedName("$username") private String username;
1616
@Expose @SerializedName("$social_sign_on_type") private String socialSignOnType;
1717
@Expose @SerializedName("$account_types") private List<String> accountTypes;
18+
@Expose @SerializedName("$user_email") private String userEmail;
1819

1920
@Override
2021
public String getEventType() {
@@ -59,4 +60,13 @@ public LoginFieldSet setAccountTypes(List<String> accountTypes) {
5960
this.accountTypes = accountTypes;
6061
return this;
6162
}
63+
64+
public String getUserEmail() {
65+
return userEmail;
66+
}
67+
68+
public LoginFieldSet setUserEmail(String userEmail) {
69+
this.userEmail = userEmail;
70+
return this;
71+
}
6272
}

src/test/java/com/siftscience/LoginEventTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public void testLoginWithApp() throws Exception {
2525
" \"$type\" : \"$login\",\n" +
2626
" \"$api_key\" : \"YOUR_API_KEY\",\n" +
2727
" \"$user_id\" : \"billy_jones_301\",\n" +
28+
" \"$user_email\" : \"billy_jones_301@gmail.com\",\n" +
2829
" \"$login_status\" : \"$success\",\n" +
2930
" \"$app\" : {\n" +
3031
" \"$os\" : \"" + operatingSystem + "\",\n" +
@@ -58,6 +59,7 @@ public void testLoginWithApp() throws Exception {
5859
// Build and execute the request against the mock server.
5960
SiftRequest request = client.buildRequest(new LoginFieldSet()
6061
.setUserId("billy_jones_301")
62+
.setUserEmail("billy_jones_301@gmail.com")
6163
.setLoginStatus("$success")
6264
.setApp(new App()
6365
.setOperatingSystem(operatingSystem)
@@ -93,6 +95,7 @@ public void testLoginWithBrowswer() throws Exception {
9395
" \"$type\" : \"$login\",\n" +
9496
" \"$api_key\" : \"YOUR_API_KEY\",\n" +
9597
" \"$user_id\" : \"billy_jones_301\",\n" +
98+
" \"$user_email\" : \"billy_jones_301@gmail.com\",\n" +
9699
" \"$login_status\" : \"$success\",\n" +
97100
" \"$browser\" : {\n" +
98101
" \"$user_agent\" : \"" + userAgent + "\"\n" +
@@ -121,6 +124,7 @@ public void testLoginWithBrowswer() throws Exception {
121124
// Build and execute the request against the mock server.
122125
SiftRequest request = client.buildRequest(new LoginFieldSet()
123126
.setUserId("billy_jones_301")
127+
.setUserEmail("billy_jones_301@gmail.com")
124128
.setLoginStatus("$success")
125129
.setBrowser(new Browser()
126130
.setUserAgent(userAgent)));

0 commit comments

Comments
 (0)