From 347634149733f82e40033b1006210c31c64debbb Mon Sep 17 00:00:00 2001 From: echumak Date: Mon, 22 Dec 2025 15:29:41 -0800 Subject: [PATCH 1/7] Added missing fields --- .../model/BaseContentFieldSet.java | 10 +++++++ .../model/FlagContentFieldSet.java | 30 +++++++++++++++++++ .../java/com/siftscience/model/Review.java | 10 +++++++ 3 files changed, 50 insertions(+) diff --git a/src/main/java/com/siftscience/model/BaseContentFieldSet.java b/src/main/java/com/siftscience/model/BaseContentFieldSet.java index 35f15302..34087a2e 100644 --- a/src/main/java/com/siftscience/model/BaseContentFieldSet.java +++ b/src/main/java/com/siftscience/model/BaseContentFieldSet.java @@ -7,6 +7,7 @@ public abstract class BaseContentFieldSet> extends BaseAppBrowserSiteBrandFieldSet { @Expose @SerializedName("$content_id") private String contentId; @Expose @SerializedName("$status") private String status; + @Expose @SerializedName(USER_EMAIL) private String userEmail; @Expose @SerializedName(VERIFICATION_PHONE_NUMBER) private String verificationPhoneNumber; public String getContentId() { @@ -35,4 +36,13 @@ public T setVerificationPhoneNumber(String verificationPhoneNumber) { this.verificationPhoneNumber = verificationPhoneNumber; return (T) this; } + + public String getUserEmail() { + return userEmail; + } + + public T setUserEmail(String userEmail) { + this.userEmail = userEmail; + return (T) this; + } } diff --git a/src/main/java/com/siftscience/model/FlagContentFieldSet.java b/src/main/java/com/siftscience/model/FlagContentFieldSet.java index a3485057..98a41572 100644 --- a/src/main/java/com/siftscience/model/FlagContentFieldSet.java +++ b/src/main/java/com/siftscience/model/FlagContentFieldSet.java @@ -30,9 +30,12 @@ public String toString() { } } + @Expose @SerializedName("$brand_name") private String brandName; @Expose @SerializedName("$content_id") private String contentId; @Expose @SerializedName("$flagged_by") private String flaggedBy; @Expose @SerializedName("$reason") private String reason; + @Expose @SerializedName("$site_country") private String siteCountry; + @Expose @SerializedName("$site_domain") private String siteDomain; @Expose @SerializedName(USER_EMAIL) private String userEmail; @Expose @SerializedName(VERIFICATION_PHONE_NUMBER) private String verificationPhoneNumber; @@ -85,4 +88,31 @@ public FlagContentFieldSet setVerificationPhoneNumber(String verificationPhoneNu this.verificationPhoneNumber = verificationPhoneNumber; return this; } + + public String getSiteDomain() { + return siteDomain; + } + + public FlagContentFieldSet setSiteDomain(String siteDomain) { + this.siteDomain = siteDomain; + return this; + } + + public String getSiteCountry() { + return siteCountry; + } + + public FlagContentFieldSet setSiteCountry(String siteCountry) { + this.siteCountry = siteCountry; + return this; + } + + public String getBrandName() { + return brandName; + } + + public FlagContentFieldSet setBrandName(String brandName) { + this.brandName = brandName; + return this; + } } diff --git a/src/main/java/com/siftscience/model/Review.java b/src/main/java/com/siftscience/model/Review.java index 74bd7b00..2e28b840 100644 --- a/src/main/java/com/siftscience/model/Review.java +++ b/src/main/java/com/siftscience/model/Review.java @@ -11,6 +11,7 @@ public class Review { @Expose @SerializedName("$contact_email") private String contactEmail; @Expose @SerializedName("$locations") private List
locations; @Expose @SerializedName("$reviewed_content_id") private String reviewedContentId; + @Expose @SerializedName("$reviewed_user_id") private String reviewedUserId; @Expose @SerializedName("$images") private List images; @Expose @SerializedName("$rating") private Double rating; @@ -76,4 +77,13 @@ public Review setReviewedContentId(String reviewedContentId) { this.reviewedContentId = reviewedContentId; return this; } + + public String getReviewedUserId() { + return reviewedUserId; + } + + public Review setReviewedUserId(String reviewedUserId) { + this.reviewedUserId = reviewedUserId; + return this; + } } From f19d3aa175cc31fc6240135ff06b69d8cb881f3f Mon Sep 17 00:00:00 2001 From: echumak Date: Mon, 22 Dec 2025 16:18:27 -0800 Subject: [PATCH 2/7] Added missing fields --- .../com/siftscience/ContentEventTest.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/test/java/com/siftscience/ContentEventTest.java b/src/test/java/com/siftscience/ContentEventTest.java index ad80c864..acfc7665 100644 --- a/src/test/java/com/siftscience/ContentEventTest.java +++ b/src/test/java/com/siftscience/ContentEventTest.java @@ -48,6 +48,7 @@ public void testCreateComment() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$comment\" : {\n" + " \"$body\": \"Congrats on the new role!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -103,6 +104,7 @@ public void testCreateComment() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setComment(c) .setVerificationPhoneNumber("+12345678901")); @@ -135,6 +137,7 @@ public void testCreateListing() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$listing\" : {\n" + " \"$subject\": \"2 Bedroom Apartment for Rent\",\n" + " \"$body\": \"Capitol Hill Seattle brand new condo. 2 bedrooms and 1 full bath.\",\n" + @@ -232,6 +235,7 @@ public void testCreateListing() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setListing(l) .setVerificationPhoneNumber("+12345678901")); @@ -263,6 +267,7 @@ public void testCreateMessage() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$message\" : {\n" + " \"$body\": \"Let's meet at 5pm\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -316,6 +321,7 @@ public void testCreateMessage() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setMessage(m) .setVerificationPhoneNumber("+12345678901")); @@ -347,6 +353,7 @@ public void testCreateProfile() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$profile\" : {\n" + " \"$body\": \"Hi! My name is Alex and I just moved to New London!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -417,6 +424,7 @@ public void testCreateProfile() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setProfile(p) .setVerificationPhoneNumber("+12345678901")); @@ -448,6 +456,7 @@ public void testCreatePost() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$post\" : {\n" + " \"$subject\": \"My new apartment!\"," + " \"$body\": \"Moved into my new apartment yesterday.\",\n" + @@ -535,6 +544,7 @@ public void testCreatePost() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setPost(p) .setVerificationPhoneNumber("+12345678901")); @@ -566,6 +576,7 @@ public void testCreateReview() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$review\" : {\n" + " \"$subject\": \"Amazing Tacos!\"," + " \"$body\": \"I ate the tacos.\",\n" + @@ -577,6 +588,7 @@ public void testCreateReview() throws Exception { " \"$zipcode\": \"98112\"\n" + " }],\n" + " \"$reviewed_content_id\": \"listing-234234\",\n" + + " \"$reviewed_user_id\": \"a234ksjfgn435sfg\",\n" + " \"$images\": [{\n" + " \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" + " \"$link\": \"https://www.domain.com/file.png\",\n" + @@ -627,6 +639,7 @@ public void testCreateReview() throws Exception { .setContactEmail("alex_301@domain.com") .setLocations(Collections.singletonList(locationAddress)) .setReviewedContentId("listing-234234") + .setReviewedUserId("a234ksjfgn435sfg") .setImages(images) .setRating(4.5); @@ -637,6 +650,7 @@ public void testCreateReview() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setReview(r) .setVerificationPhoneNumber("+12345678901")); @@ -668,6 +682,7 @@ public void testUpdateComment() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$comment\" : {\n" + " \"$body\": \"Congrats on the new role!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -724,6 +739,7 @@ public void testUpdateComment() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setComment(c) .setVerificationPhoneNumber("+12345678901")); @@ -756,6 +772,7 @@ public void testUpdateListing() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$listing\" : {\n" + " \"$subject\": \"2 Bedroom Apartment for Rent\",\n" + " \"$body\": \"Capitol Hill Seattle brand new condo. 2 bedrooms and 1 full bath.\",\n" + @@ -853,6 +870,7 @@ public void testUpdateListing() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setListing(l) .setVerificationPhoneNumber("+12345678901")); @@ -884,6 +902,7 @@ public void testUpdateMessage() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$message\" : {\n" + " \"$body\": \"Let's meet at 5pm\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -941,6 +960,7 @@ public void testUpdateMessage() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setMessage(m) .setVerificationPhoneNumber("+12345678901")); @@ -972,6 +992,7 @@ public void testUpdateProfile() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$profile\" : {\n" + " \"$body\": \"Hi! My name is Alex and I just moved to New London!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -1042,6 +1063,7 @@ public void testUpdateProfile() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setProfile(p) .setVerificationPhoneNumber("+12345678901")); @@ -1073,6 +1095,7 @@ public void testUpdatePost() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$post\" : {\n" + " \"$subject\": \"My new apartment!\"," + " \"$body\": \"Moved into my new apartment yesterday.\",\n" + @@ -1160,6 +1183,7 @@ public void testUpdatePost() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setPost(p) .setVerificationPhoneNumber("+12345678901")); @@ -1191,6 +1215,7 @@ public void testUpdateReview() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + + " \"$user_email\" : \"example1@example.com\",\n" + " \"$review\" : {\n" + " \"$subject\": \"Amazing Tacos!\"," + " \"$body\": \"I ate the tacos.\",\n" + @@ -1202,6 +1227,7 @@ public void testUpdateReview() throws Exception { " \"$zipcode\": \"98112\"\n" + " }],\n" + " \"$reviewed_content_id\": \"listing-234234\",\n" + + " \"$reviewed_user_id\": \"a234ksjfgn435sfg\",\n" + " \"$images\": [{\n" + " \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" + " \"$link\": \"https://www.domain.com/file.png\",\n" + @@ -1252,6 +1278,7 @@ public void testUpdateReview() throws Exception { .setContactEmail("alex_301@domain.com") .setLocations(Collections.singletonList(locationAddress)) .setReviewedContentId("listing-234234") + .setReviewedUserId("a234ksjfgn435sfg") .setImages(images) .setRating(4.5); @@ -1262,6 +1289,7 @@ public void testUpdateReview() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") + .setUserEmail("example1@example.com") .setReview(r) .setVerificationPhoneNumber("+12345678901")); From 1eb188bb085926a03c9d7a90eb454713275a1615 Mon Sep 17 00:00:00 2001 From: echumak Date: Mon, 22 Dec 2025 16:21:59 -0800 Subject: [PATCH 3/7] Added missing fields --- src/test/java/com/siftscience/FlagContentEventTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/com/siftscience/FlagContentEventTest.java b/src/test/java/com/siftscience/FlagContentEventTest.java index 34776b74..b190a1bc 100644 --- a/src/test/java/com/siftscience/FlagContentEventTest.java +++ b/src/test/java/com/siftscience/FlagContentEventTest.java @@ -40,11 +40,14 @@ public void testFlagContent() throws Exception { String expectedRequestBody = "{\n" + " \"$type\" : \"$flag_content\", \n" + " \"$api_key\" : \"YOUR_API_KEY\",\n" + + " \"$brand_name\" : \"jamieli98\",\n" + " \"$user_id\" : \"billy_jones_301\",\n" + " \"$content_id\" : \"9671500641\",\n" + "\n" + " \"$flagged_by\" : \"jamieli89\",\n" + " \"$reason\" : \"" + this.reason.value + "\",\n" + + " \"$site_country\" : \"UA\",\n" + + " \"$site_domain\" : \"example.com\",\n" + " \"$user_email\" : \"billy_jones_301@email.com\",\n" + " \"$verification_phone_number\" : \"+12345678901\"\n" + "}"; @@ -75,6 +78,9 @@ public void testFlagContent() throws Exception { .setContentId("9671500641") .setFlaggedBy("jamieli89") .setReason(this.reason) + .setBrandName("jamieli98") + .setSiteCountry("UA") + .setSiteDomain("example.com") .setUserEmail("billy_jones_301@email.com") .setVerificationPhoneNumber("+12345678901")); From 71c91c3f659382fdd47dcf039b1d4393b65ef061 Mon Sep 17 00:00:00 2001 From: echumak Date: Mon, 22 Dec 2025 16:26:12 -0800 Subject: [PATCH 4/7] Added missing fields --- src/test/java/com/siftscience/ContentEventTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/siftscience/ContentEventTest.java b/src/test/java/com/siftscience/ContentEventTest.java index acfc7665..99d72e22 100644 --- a/src/test/java/com/siftscience/ContentEventTest.java +++ b/src/test/java/com/siftscience/ContentEventTest.java @@ -588,7 +588,7 @@ public void testCreateReview() throws Exception { " \"$zipcode\": \"98112\"\n" + " }],\n" + " \"$reviewed_content_id\": \"listing-234234\",\n" + - " \"$reviewed_user_id\": \"a234ksjfgn435sfg\",\n" + + " \"$reviewed_user_id\": \"userId_12345_65432\",\n" + " \"$images\": [{\n" + " \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" + " \"$link\": \"https://www.domain.com/file.png\",\n" + @@ -639,7 +639,7 @@ public void testCreateReview() throws Exception { .setContactEmail("alex_301@domain.com") .setLocations(Collections.singletonList(locationAddress)) .setReviewedContentId("listing-234234") - .setReviewedUserId("a234ksjfgn435sfg") + .setReviewedUserId("userId_12345_65432") .setImages(images) .setRating(4.5); @@ -1227,7 +1227,7 @@ public void testUpdateReview() throws Exception { " \"$zipcode\": \"98112\"\n" + " }],\n" + " \"$reviewed_content_id\": \"listing-234234\",\n" + - " \"$reviewed_user_id\": \"a234ksjfgn435sfg\",\n" + + " \"$reviewed_user_id\": \"userId_12345_65432\",\n" + " \"$images\": [{\n" + " \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" + " \"$link\": \"https://www.domain.com/file.png\",\n" + @@ -1278,7 +1278,7 @@ public void testUpdateReview() throws Exception { .setContactEmail("alex_301@domain.com") .setLocations(Collections.singletonList(locationAddress)) .setReviewedContentId("listing-234234") - .setReviewedUserId("a234ksjfgn435sfg") + .setReviewedUserId("userId_12345_65432") .setImages(images) .setRating(4.5); From c6df6af8a661a7fee6a8895fca958a83b121258c Mon Sep 17 00:00:00 2001 From: echumak Date: Mon, 22 Dec 2025 17:11:39 -0800 Subject: [PATCH 5/7] Added missing fields --- .../com/siftscience/ContentEventTest.java | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/test/java/com/siftscience/ContentEventTest.java b/src/test/java/com/siftscience/ContentEventTest.java index 99d72e22..0143c488 100644 --- a/src/test/java/com/siftscience/ContentEventTest.java +++ b/src/test/java/com/siftscience/ContentEventTest.java @@ -48,7 +48,7 @@ public void testCreateComment() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$comment\" : {\n" + " \"$body\": \"Congrats on the new role!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -104,7 +104,7 @@ public void testCreateComment() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setComment(c) .setVerificationPhoneNumber("+12345678901")); @@ -137,7 +137,7 @@ public void testCreateListing() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$listing\" : {\n" + " \"$subject\": \"2 Bedroom Apartment for Rent\",\n" + " \"$body\": \"Capitol Hill Seattle brand new condo. 2 bedrooms and 1 full bath.\",\n" + @@ -235,7 +235,7 @@ public void testCreateListing() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setListing(l) .setVerificationPhoneNumber("+12345678901")); @@ -267,7 +267,7 @@ public void testCreateMessage() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$message\" : {\n" + " \"$body\": \"Let's meet at 5pm\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -321,7 +321,7 @@ public void testCreateMessage() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setMessage(m) .setVerificationPhoneNumber("+12345678901")); @@ -353,7 +353,7 @@ public void testCreateProfile() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$profile\" : {\n" + " \"$body\": \"Hi! My name is Alex and I just moved to New London!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -424,7 +424,7 @@ public void testCreateProfile() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setProfile(p) .setVerificationPhoneNumber("+12345678901")); @@ -456,7 +456,7 @@ public void testCreatePost() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$post\" : {\n" + " \"$subject\": \"My new apartment!\"," + " \"$body\": \"Moved into my new apartment yesterday.\",\n" + @@ -544,7 +544,7 @@ public void testCreatePost() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setPost(p) .setVerificationPhoneNumber("+12345678901")); @@ -576,7 +576,7 @@ public void testCreateReview() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$review\" : {\n" + " \"$subject\": \"Amazing Tacos!\"," + " \"$body\": \"I ate the tacos.\",\n" + @@ -650,7 +650,7 @@ public void testCreateReview() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setReview(r) .setVerificationPhoneNumber("+12345678901")); @@ -682,7 +682,7 @@ public void testUpdateComment() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$comment\" : {\n" + " \"$body\": \"Congrats on the new role!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -739,7 +739,7 @@ public void testUpdateComment() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setComment(c) .setVerificationPhoneNumber("+12345678901")); @@ -772,7 +772,7 @@ public void testUpdateListing() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$listing\" : {\n" + " \"$subject\": \"2 Bedroom Apartment for Rent\",\n" + " \"$body\": \"Capitol Hill Seattle brand new condo. 2 bedrooms and 1 full bath.\",\n" + @@ -870,7 +870,7 @@ public void testUpdateListing() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setListing(l) .setVerificationPhoneNumber("+12345678901")); @@ -902,7 +902,7 @@ public void testUpdateMessage() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$message\" : {\n" + " \"$body\": \"Let's meet at 5pm\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -960,7 +960,7 @@ public void testUpdateMessage() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setMessage(m) .setVerificationPhoneNumber("+12345678901")); @@ -992,7 +992,7 @@ public void testUpdateProfile() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$profile\" : {\n" + " \"$body\": \"Hi! My name is Alex and I just moved to New London!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -1063,7 +1063,7 @@ public void testUpdateProfile() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setProfile(p) .setVerificationPhoneNumber("+12345678901")); @@ -1095,7 +1095,7 @@ public void testUpdatePost() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$post\" : {\n" + " \"$subject\": \"My new apartment!\"," + " \"$body\": \"Moved into my new apartment yesterday.\",\n" + @@ -1183,7 +1183,7 @@ public void testUpdatePost() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setPost(p) .setVerificationPhoneNumber("+12345678901")); @@ -1215,7 +1215,7 @@ public void testUpdateReview() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"example1@example.com\",\n" + + " \"$user_email\" : \"alex_302@domain.com\",\n" + " \"$review\" : {\n" + " \"$subject\": \"Amazing Tacos!\"," + " \"$body\": \"I ate the tacos.\",\n" + @@ -1289,7 +1289,7 @@ public void testUpdateReview() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("example1@example.com") + .setUserEmail("alex_302@domain.com") .setReview(r) .setVerificationPhoneNumber("+12345678901")); From 15d7672835b7261afa082ce4f0236ae50d814911 Mon Sep 17 00:00:00 2001 From: echumak Date: Mon, 22 Dec 2025 17:27:24 -0800 Subject: [PATCH 6/7] [API-8521] Added missing fields --- .../com/siftscience/ContentEventTest.java | 48 +++++++++---------- .../com/siftscience/FlagContentEventTest.java | 12 ++--- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/test/java/com/siftscience/ContentEventTest.java b/src/test/java/com/siftscience/ContentEventTest.java index 0143c488..9a6483c8 100644 --- a/src/test/java/com/siftscience/ContentEventTest.java +++ b/src/test/java/com/siftscience/ContentEventTest.java @@ -48,7 +48,7 @@ public void testCreateComment() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$comment\" : {\n" + " \"$body\": \"Congrats on the new role!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -104,7 +104,7 @@ public void testCreateComment() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setComment(c) .setVerificationPhoneNumber("+12345678901")); @@ -137,7 +137,7 @@ public void testCreateListing() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$listing\" : {\n" + " \"$subject\": \"2 Bedroom Apartment for Rent\",\n" + " \"$body\": \"Capitol Hill Seattle brand new condo. 2 bedrooms and 1 full bath.\",\n" + @@ -235,7 +235,7 @@ public void testCreateListing() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setListing(l) .setVerificationPhoneNumber("+12345678901")); @@ -267,7 +267,7 @@ public void testCreateMessage() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$message\" : {\n" + " \"$body\": \"Let's meet at 5pm\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -321,7 +321,7 @@ public void testCreateMessage() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setMessage(m) .setVerificationPhoneNumber("+12345678901")); @@ -353,7 +353,7 @@ public void testCreateProfile() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$profile\" : {\n" + " \"$body\": \"Hi! My name is Alex and I just moved to New London!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -424,7 +424,7 @@ public void testCreateProfile() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setProfile(p) .setVerificationPhoneNumber("+12345678901")); @@ -456,7 +456,7 @@ public void testCreatePost() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$post\" : {\n" + " \"$subject\": \"My new apartment!\"," + " \"$body\": \"Moved into my new apartment yesterday.\",\n" + @@ -544,7 +544,7 @@ public void testCreatePost() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setPost(p) .setVerificationPhoneNumber("+12345678901")); @@ -576,7 +576,7 @@ public void testCreateReview() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$review\" : {\n" + " \"$subject\": \"Amazing Tacos!\"," + " \"$body\": \"I ate the tacos.\",\n" + @@ -650,7 +650,7 @@ public void testCreateReview() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setReview(r) .setVerificationPhoneNumber("+12345678901")); @@ -682,7 +682,7 @@ public void testUpdateComment() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$comment\" : {\n" + " \"$body\": \"Congrats on the new role!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -739,7 +739,7 @@ public void testUpdateComment() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setComment(c) .setVerificationPhoneNumber("+12345678901")); @@ -772,7 +772,7 @@ public void testUpdateListing() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$listing\" : {\n" + " \"$subject\": \"2 Bedroom Apartment for Rent\",\n" + " \"$body\": \"Capitol Hill Seattle brand new condo. 2 bedrooms and 1 full bath.\",\n" + @@ -870,7 +870,7 @@ public void testUpdateListing() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setListing(l) .setVerificationPhoneNumber("+12345678901")); @@ -902,7 +902,7 @@ public void testUpdateMessage() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$message\" : {\n" + " \"$body\": \"Let's meet at 5pm\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -960,7 +960,7 @@ public void testUpdateMessage() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setMessage(m) .setVerificationPhoneNumber("+12345678901")); @@ -992,7 +992,7 @@ public void testUpdateProfile() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$profile\" : {\n" + " \"$body\": \"Hi! My name is Alex and I just moved to New London!\",\n" + " \"$contact_email\": \"alex_301@domain.com\",\n" + @@ -1063,7 +1063,7 @@ public void testUpdateProfile() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setProfile(p) .setVerificationPhoneNumber("+12345678901")); @@ -1095,7 +1095,7 @@ public void testUpdatePost() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$post\" : {\n" + " \"$subject\": \"My new apartment!\"," + " \"$body\": \"Moved into my new apartment yesterday.\",\n" + @@ -1183,7 +1183,7 @@ public void testUpdatePost() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setPost(p) .setVerificationPhoneNumber("+12345678901")); @@ -1215,7 +1215,7 @@ public void testUpdateReview() throws Exception { " \"$session_id\" : \"a234ksjfgn435sfg\",\n" + " \"$status\" : \"$active\",\n" + " \"$ip\" : \"255.255.255.0\",\n" + - " \"$user_email\" : \"alex_302@domain.com\",\n" + + " \"$user_email\" : \"billjones1@example.com\",\n" + " \"$review\" : {\n" + " \"$subject\": \"Amazing Tacos!\"," + " \"$body\": \"I ate the tacos.\",\n" + @@ -1289,7 +1289,7 @@ public void testUpdateReview() throws Exception { .setSessionId("a234ksjfgn435sfg") .setStatus("$active") .setIp("255.255.255.0") - .setUserEmail("alex_302@domain.com") + .setUserEmail("billjones1@example.com") .setReview(r) .setVerificationPhoneNumber("+12345678901")); diff --git a/src/test/java/com/siftscience/FlagContentEventTest.java b/src/test/java/com/siftscience/FlagContentEventTest.java index b190a1bc..fd2cb5c2 100644 --- a/src/test/java/com/siftscience/FlagContentEventTest.java +++ b/src/test/java/com/siftscience/FlagContentEventTest.java @@ -40,14 +40,14 @@ public void testFlagContent() throws Exception { String expectedRequestBody = "{\n" + " \"$type\" : \"$flag_content\", \n" + " \"$api_key\" : \"YOUR_API_KEY\",\n" + - " \"$brand_name\" : \"jamieli98\",\n" + + " \"$brand_name\" : \"sift\",\n" + " \"$user_id\" : \"billy_jones_301\",\n" + " \"$content_id\" : \"9671500641\",\n" + "\n" + " \"$flagged_by\" : \"jamieli89\",\n" + " \"$reason\" : \"" + this.reason.value + "\",\n" + - " \"$site_country\" : \"UA\",\n" + - " \"$site_domain\" : \"example.com\",\n" + + " \"$site_country\" : \"US\",\n" + + " \"$site_domain\" : \"sift.com\",\n" + " \"$user_email\" : \"billy_jones_301@email.com\",\n" + " \"$verification_phone_number\" : \"+12345678901\"\n" + "}"; @@ -78,9 +78,9 @@ public void testFlagContent() throws Exception { .setContentId("9671500641") .setFlaggedBy("jamieli89") .setReason(this.reason) - .setBrandName("jamieli98") - .setSiteCountry("UA") - .setSiteDomain("example.com") + .setBrandName("sift") + .setSiteCountry("US") + .setSiteDomain("sift.com") .setUserEmail("billy_jones_301@email.com") .setVerificationPhoneNumber("+12345678901")); From e7a922b00b60d598249a244a85eec1711ba3355b Mon Sep 17 00:00:00 2001 From: echumak Date: Mon, 22 Dec 2025 17:32:13 -0800 Subject: [PATCH 7/7] [API-8521] Added missing fields --- src/test/java/com/siftscience/ContentEventTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/siftscience/ContentEventTest.java b/src/test/java/com/siftscience/ContentEventTest.java index 9a6483c8..c6dd5c8f 100644 --- a/src/test/java/com/siftscience/ContentEventTest.java +++ b/src/test/java/com/siftscience/ContentEventTest.java @@ -588,7 +588,7 @@ public void testCreateReview() throws Exception { " \"$zipcode\": \"98112\"\n" + " }],\n" + " \"$reviewed_content_id\": \"listing-234234\",\n" + - " \"$reviewed_user_id\": \"userId_12345_65432\",\n" + + " \"$reviewed_user_id\": \"fyw3989sjpqr71\",\n" + " \"$images\": [{\n" + " \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" + " \"$link\": \"https://www.domain.com/file.png\",\n" + @@ -639,7 +639,7 @@ public void testCreateReview() throws Exception { .setContactEmail("alex_301@domain.com") .setLocations(Collections.singletonList(locationAddress)) .setReviewedContentId("listing-234234") - .setReviewedUserId("userId_12345_65432") + .setReviewedUserId("fyw3989sjpqr71") .setImages(images) .setRating(4.5); @@ -1227,7 +1227,7 @@ public void testUpdateReview() throws Exception { " \"$zipcode\": \"98112\"\n" + " }],\n" + " \"$reviewed_content_id\": \"listing-234234\",\n" + - " \"$reviewed_user_id\": \"userId_12345_65432\",\n" + + " \"$reviewed_user_id\": \"fyw3989sjpqr71\",\n" + " \"$images\": [{\n" + " \"$md5_hash\": \"aflshdfbalsubdf3234sfdkjb\",\n" + " \"$link\": \"https://www.domain.com/file.png\",\n" + @@ -1278,7 +1278,7 @@ public void testUpdateReview() throws Exception { .setContactEmail("alex_301@domain.com") .setLocations(Collections.singletonList(locationAddress)) .setReviewedContentId("listing-234234") - .setReviewedUserId("userId_12345_65432") + .setReviewedUserId("fyw3989sjpqr71") .setImages(images) .setRating(4.5);