diff --git a/CHANGES.MD b/CHANGES.MD
index c2290c7..c5ea4eb 100644
--- a/CHANGES.MD
+++ b/CHANGES.MD
@@ -1,5 +1,13 @@
# CHANGES
+## 1.7.0 (2025-12-03)
+
+### Added
+- **`$ip`** field support in events
+- **`$user_email`** field in `$create_content`, `$update_content` events
+- **`$verification_phone_number`** field in `$update_content` event
+- **`$reviewed_user_id`** field in `$review` complex type
+
## 1.6.0 (2025-10-18)
### NuGet Package Updates
diff --git a/README.md b/README.md
index 8e4478b..f5e2940 100644
--- a/README.md
+++ b/README.md
@@ -4,11 +4,7 @@
The official Sift .NET client, supporting .NET Standard 2.0+
-## Latest Release (v1.6.0)
-
-- Full Sift API v205 compliance with multi-currency support (`$exchange_rate`), enhanced payment validation (`$card_bin_metadata`), and account promotions tracking
-- **Breaking:** `$iata_carrier_code` moved from `Booking` to `Segment` complex type
-- iGaming API enhancements with `$wager`, `$deposit`, and `$withdrawal` transaction support
+## Latest Release (v1.7.0)
See [CHANGES.MD](CHANGES.MD) for full release history.
@@ -150,7 +146,8 @@ var booking = new Booking
site_country = "US",
site_domain = "sift.com",
user_email = "billjones1@example.com",
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
@@ -208,7 +205,8 @@ var booking = new Booking
site_country = "US",
site_domain = "sift.com",
user_email = "billjones1@example.com",
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
@@ -242,7 +240,8 @@ var booking = new Booking
site_country = "US",
site_domain = "sift.com",
user_email = "billjones1@example.com",
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
@@ -274,7 +273,8 @@ var booking = new Booking
accept_language = "en-US",
content_language = "en-GB"
},
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
@@ -322,7 +322,8 @@ var booking = new Booking
site_country = "US",
site_domain = "sift.com",
user_email = "billjones1@example.com",
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
@@ -453,7 +454,8 @@ var booking = new Booking
user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
accept_language = "en-US",
content_language = "en-GB"
- }
+ },
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
@@ -601,7 +603,8 @@ var booking = new Booking
zipcode = "03257"
}
- }
+ },
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
@@ -688,7 +691,8 @@ var booking = new Booking
reason = "$user_setting",
brand_name = "xyz",
site_country = "AU",
- site_domain = "somehost.example.com"
+ site_domain = "somehost.example.com",
+ ip = "1.2.3.4"
};
var sift = new Client("API_KEY");
@@ -720,6 +724,7 @@ var booking = new Booking
},
user_email = "billjones1@example.com",
verification_phone_number = "+123456789012",
+ ip = "1.2.3.4",
transaction_type = "$sale",
transaction_status = "$failure",
decline_category = "$bank_decline",
@@ -882,7 +887,8 @@ var booking = new Booking
user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
accept_language = "en-US",
content_language = "en-GB"
- }
+ },
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
diff --git a/Sift/Schema/ComplexTypes/review.json b/Sift/Schema/ComplexTypes/review.json
index d63baae..af366cf 100644
--- a/Sift/Schema/ComplexTypes/review.json
+++ b/Sift/Schema/ComplexTypes/review.json
@@ -22,6 +22,9 @@
"$reviewed_content_id": {
"type": [ "string", "null" ]
},
+ "$reviewed_user_id": {
+ "type": [ "string", "null" ]
+ },
"$rating": {
"type": [ "number", "null" ]
},
diff --git a/Sift/Schema/add_item_to_cart.json b/Sift/Schema/add_item_to_cart.json
index 629db80..bc84c27 100644
--- a/Sift/Schema/add_item_to_cart.json
+++ b/Sift/Schema/add_item_to_cart.json
@@ -46,6 +46,9 @@
},
"$verification_phone_number": {
"type": [ "string", "null" ]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/add_promotion.json b/Sift/Schema/add_promotion.json
index d2fb0b1..db8f0c2 100644
--- a/Sift/Schema/add_promotion.json
+++ b/Sift/Schema/add_promotion.json
@@ -44,6 +44,9 @@
},
"$verification_phone_number": {
"type": [ "string", "null" ]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/chargeback.json b/Sift/Schema/chargeback.json
index f9d4b4e..afb1c0b 100644
--- a/Sift/Schema/chargeback.json
+++ b/Sift/Schema/chargeback.json
@@ -46,6 +46,9 @@
},
"$ach_return_code": {
"type": [ "string", "null" ]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/content_status.json b/Sift/Schema/content_status.json
index e0572d1..c4aa54e 100644
--- a/Sift/Schema/content_status.json
+++ b/Sift/Schema/content_status.json
@@ -44,9 +44,11 @@
"$user_email": {
"type": [ "string", "null" ]
},
-
"$verification_phone_number": {
"type": [ "string", "null" ]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/create_account.json b/Sift/Schema/create_account.json
index beacf7d..ebd1a4c 100644
--- a/Sift/Schema/create_account.json
+++ b/Sift/Schema/create_account.json
@@ -82,6 +82,9 @@
},
"$verification_phone_number": {
"type": [ "string", "null" ]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/create_content.json b/Sift/Schema/create_content.json
index 2bd3b1a..ade9d88 100644
--- a/Sift/Schema/create_content.json
+++ b/Sift/Schema/create_content.json
@@ -80,6 +80,9 @@
"$site_domain": {
"type": [ "string", "null" ]
},
+ "$user_email": {
+ "type": [ "string", "null" ]
+ },
"$verification_phone_number": {
"type": [ "string", "null" ]
}
diff --git a/Sift/Schema/create_order.json b/Sift/Schema/create_order.json
index 985bd32..a971cc0 100644
--- a/Sift/Schema/create_order.json
+++ b/Sift/Schema/create_order.json
@@ -117,6 +117,9 @@
"$shipping_tracking_numbers": {
"type": [ "array", "null" ],
"items": { "type": "string" }
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/flag_content.json b/Sift/Schema/flag_content.json
index 669e262..274bf8f 100644
--- a/Sift/Schema/flag_content.json
+++ b/Sift/Schema/flag_content.json
@@ -40,6 +40,9 @@
},
"$verification_phone_number": {
"type": [ "string", "null" ]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/link_session_to_user.json b/Sift/Schema/link_session_to_user.json
index c18cb30..9d98292 100644
--- a/Sift/Schema/link_session_to_user.json
+++ b/Sift/Schema/link_session_to_user.json
@@ -25,6 +25,9 @@
{ "$ref": "ComplexTypes/browser.json" },
{ "type": "null" }
]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/logout.json b/Sift/Schema/logout.json
index b6d32dd..9f6f9a7 100644
--- a/Sift/Schema/logout.json
+++ b/Sift/Schema/logout.json
@@ -31,6 +31,9 @@
},
"$site_domain": {
"type": [ "string", "null" ]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/order_status.json b/Sift/Schema/order_status.json
index 6ba105a..1761dd6 100644
--- a/Sift/Schema/order_status.json
+++ b/Sift/Schema/order_status.json
@@ -55,6 +55,9 @@
},
"$site_domain": {
"type": [ "string", "null" ]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/remove_item_from_cart.json b/Sift/Schema/remove_item_from_cart.json
index 00d4067..350038b 100644
--- a/Sift/Schema/remove_item_from_cart.json
+++ b/Sift/Schema/remove_item_from_cart.json
@@ -44,9 +44,11 @@
"$user_email": {
"type": [ "string", "null" ]
},
-
"$verification_phone_number": {
"type": [ "string", "null" ]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/security_notification.json b/Sift/Schema/security_notification.json
index b150ffc..d66e24b 100644
--- a/Sift/Schema/security_notification.json
+++ b/Sift/Schema/security_notification.json
@@ -43,6 +43,9 @@
},
"$site_domain": {
"type": [ "string", "null" ]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/transaction.json b/Sift/Schema/transaction.json
index d8155b8..8c9e9e7 100644
--- a/Sift/Schema/transaction.json
+++ b/Sift/Schema/transaction.json
@@ -136,6 +136,9 @@
"$verification_phone_number": {
"type": [ "string", "null" ]
},
+ "$ip": {
+ "type": [ "string", "null" ]
+ },
"$minimum_deposit_amount": {
"type": [ "integer", "null" ],
"format": "long"
diff --git a/Sift/Schema/update_account.json b/Sift/Schema/update_account.json
index 599ee76..0c48edc 100644
--- a/Sift/Schema/update_account.json
+++ b/Sift/Schema/update_account.json
@@ -85,6 +85,9 @@
"$promotions": {
"type": [ "array", "null" ],
"items": { "$ref": "ComplexTypes/promotion.json" }
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/update_content.json b/Sift/Schema/update_content.json
index d895ecb..2848b9e 100644
--- a/Sift/Schema/update_content.json
+++ b/Sift/Schema/update_content.json
@@ -79,6 +79,12 @@
},
"$site_domain": {
"type": [ "string", "null" ]
+ },
+ "$user_email": {
+ "type": [ "string", "null" ]
+ },
+ "$verification_phone_number": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Schema/update_order.json b/Sift/Schema/update_order.json
index e55464b..e4e133e 100644
--- a/Sift/Schema/update_order.json
+++ b/Sift/Schema/update_order.json
@@ -116,8 +116,10 @@
{ "$ref": "ComplexTypes/merchant_profile.json" },
{ "type": "null" }
]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
-
}
}
\ No newline at end of file
diff --git a/Sift/Schema/verification.json b/Sift/Schema/verification.json
index c5b9df4..6f9c1c9 100644
--- a/Sift/Schema/verification.json
+++ b/Sift/Schema/verification.json
@@ -52,6 +52,9 @@
},
"$site_domain": {
"type": [ "string", "null" ]
+ },
+ "$ip": {
+ "type": [ "string", "null" ]
}
}
}
diff --git a/Sift/Sift.csproj b/Sift/Sift.csproj
index c4e250b..76009fc 100644
--- a/Sift/Sift.csproj
+++ b/Sift/Sift.csproj
@@ -4,8 +4,8 @@
Sift
Sift
Sift
- 1.6.0
- Release 1.6.0
+ 1.7.0
+ Release 1.7.0
netstandard2.0
Sift
sift;siftscience;client;api;client;async
diff --git a/Test.Integration.Net/EventsAPI/Account.cs b/Test.Integration.Net/EventsAPI/Account.cs
index 72f51da..2471004 100644
--- a/Test.Integration.Net/EventsAPI/Account.cs
+++ b/Test.Integration.Net/EventsAPI/Account.cs
@@ -115,7 +115,8 @@ public void CreateAccount()
zipcode = "03257"
}
- }
+ },
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
@@ -217,7 +218,8 @@ public void UpdateAccount()
zipcode = "03257"
}
- }
+ },
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
diff --git a/Test.Integration.Net/EventsAPI/Cart.cs b/Test.Integration.Net/EventsAPI/Cart.cs
index 881d173..103b610 100644
--- a/Test.Integration.Net/EventsAPI/Cart.cs
+++ b/Test.Integration.Net/EventsAPI/Cart.cs
@@ -53,7 +53,8 @@ public void AddItemToCartEvent()
brand_name = "sift",
site_country = "US",
site_domain = "sift.com",
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
@@ -99,7 +100,8 @@ public void RemoveItemFromCart()
brand_name = "sift",
site_country = "US",
site_domain = "sift.com",
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
diff --git a/Test.Integration.Net/EventsAPI/Chargebacks.cs b/Test.Integration.Net/EventsAPI/Chargebacks.cs
index 50f29c9..9ef2b6b 100644
--- a/Test.Integration.Net/EventsAPI/Chargebacks.cs
+++ b/Test.Integration.Net/EventsAPI/Chargebacks.cs
@@ -47,7 +47,8 @@ public void ChargebackTest()
zipcode = "03257"
}
- }
+ },
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
diff --git a/Test.Integration.Net/EventsAPI/Contents.cs b/Test.Integration.Net/EventsAPI/Contents.cs
index aadc4c3..3041c9c 100644
--- a/Test.Integration.Net/EventsAPI/Contents.cs
+++ b/Test.Integration.Net/EventsAPI/Contents.cs
@@ -140,7 +140,9 @@ public void CreateContentListing()
},
brand_name = "sift",
site_domain = "sift.com",
- site_country = "US"
+ site_country = "US",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
EventRequest eventRequest = new EventRequest()
{
@@ -170,6 +172,8 @@ public void CreateContentMessage()
brand_name = "sift",
site_domain = "sift.com",
site_country = "US",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012",
message = new Message()
{
subject = "2 Bedroom Apartment for Rent",
@@ -270,7 +274,9 @@ public void CreateContentPost()
},
brand_name = "sift",
site_domain = "sift.com",
- site_country = "US"
+ site_country = "US",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
EventRequest eventRequest = new EventRequest()
{
@@ -329,7 +335,9 @@ public void CreateContentProfile()
},
brand_name = "sift",
site_domain = "sift.com",
- site_country = "US"
+ site_country = "US",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
EventRequest eventRequest = new EventRequest()
{
@@ -396,6 +404,7 @@ public void CreateContentReview()
size = "6",
},
reviewed_content_id = "listing-234234",
+ reviewed_user_id = "fyw3989sjpqr71",
rating = 4.5,
images = new ObservableCollection()
{
@@ -413,7 +422,9 @@ public void CreateContentReview()
},
brand_name = "sift",
site_domain = "sift.com",
- site_country = "US"
+ site_country = "US",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
EventRequest eventRequest = new EventRequest()
{
@@ -460,7 +471,9 @@ private EventResponse CreateContentComment(Client sift)
},
brand_name = "sift",
site_domain = "sift.com",
- site_country = "US"
+ site_country = "US",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
EventRequest eventRequest = new EventRequest()
{
@@ -507,7 +520,9 @@ private EventResponse UpdateContentComment(Client sift)
},
brand_name = "sift",
site_domain = "sift.com",
- site_country = "US"
+ site_country = "US",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
EventRequest eventRequest = new EventRequest()
{
@@ -526,7 +541,9 @@ private EventResponse FlagContent(Client sift)
content_id = ContentId,
flagged_by = FlaggedBy,
reason = "$toxic",
- verification_phone_number = "+123456789012"
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
@@ -553,7 +570,9 @@ private EventResponse ContentStatus(Client sift)
brand_name = "sift",
site_country = "US",
site_domain = "sift.com",
- verification_phone_number = "+123456789012"
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
diff --git a/Test.Integration.Net/EventsAPI/LoginLogout.cs b/Test.Integration.Net/EventsAPI/LoginLogout.cs
index 99bcdfa..5ed1ad4 100644
--- a/Test.Integration.Net/EventsAPI/LoginLogout.cs
+++ b/Test.Integration.Net/EventsAPI/LoginLogout.cs
@@ -69,7 +69,8 @@ public void Logout()
},
brand_name = "sift",
site_domain = "sift.com",
- site_country = "US"
+ site_country = "US",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
diff --git a/Test.Integration.Net/EventsAPI/Notifications.cs b/Test.Integration.Net/EventsAPI/Notifications.cs
index fa36820..74b58f7 100644
--- a/Test.Integration.Net/EventsAPI/Notifications.cs
+++ b/Test.Integration.Net/EventsAPI/Notifications.cs
@@ -37,7 +37,8 @@ public void SecurityNotificationTest()
},
brand_name = "sift",
site_domain = "sift.com",
- site_country = "US"
+ site_country = "US",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
diff --git a/Test.Integration.Net/EventsAPI/Order.cs b/Test.Integration.Net/EventsAPI/Order.cs
index 338ec6b..a3898b8 100644
--- a/Test.Integration.Net/EventsAPI/Order.cs
+++ b/Test.Integration.Net/EventsAPI/Order.cs
@@ -174,7 +174,8 @@ private EventResponse CreateOrder(Client sift)
user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
accept_language = "en-US",
content_language = "en-GB"
- }
+ },
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
@@ -297,7 +298,8 @@ private EventResponse UpdateOrder(Client sift)
user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
accept_language = "en-US",
content_language = "en-GB"
- }
+ },
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
@@ -327,7 +329,8 @@ private EventResponse OrderStatus(Client sift)
},
brand_name = "sift",
site_country = "US",
- site_domain = "sift.com"
+ site_domain = "sift.com",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
diff --git a/Test.Integration.Net/EventsAPI/Promotions.cs b/Test.Integration.Net/EventsAPI/Promotions.cs
index c830508..053c816 100644
--- a/Test.Integration.Net/EventsAPI/Promotions.cs
+++ b/Test.Integration.Net/EventsAPI/Promotions.cs
@@ -65,7 +65,8 @@ public void AddPromotionTest()
brand_name = "sift",
site_country = "US",
site_domain = "sift.com",
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
diff --git a/Test.Integration.Net/EventsAPI/Sessions.cs b/Test.Integration.Net/EventsAPI/Sessions.cs
index b2facf9..5f4d174 100644
--- a/Test.Integration.Net/EventsAPI/Sessions.cs
+++ b/Test.Integration.Net/EventsAPI/Sessions.cs
@@ -23,7 +23,8 @@ public void LinkSessionToUserTest()
var linkSessionToUser = new LinkSessionToUser
{
user_id = UserId,
- session_id = SessionId
+ session_id = SessionId,
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
diff --git a/Test.Integration.Net/EventsAPI/Transactions.cs b/Test.Integration.Net/EventsAPI/Transactions.cs
index 9dc5246..d02eb8b 100644
--- a/Test.Integration.Net/EventsAPI/Transactions.cs
+++ b/Test.Integration.Net/EventsAPI/Transactions.cs
@@ -175,7 +175,8 @@ public void TransactionTest()
digital_asset = "BTC"
}
},
- receiver_external_address = true
+ receiver_external_address = true,
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
diff --git a/Test.Integration.Net/EventsAPI/Verifications.cs b/Test.Integration.Net/EventsAPI/Verifications.cs
index 030cc19..fe0d294 100644
--- a/Test.Integration.Net/EventsAPI/Verifications.cs
+++ b/Test.Integration.Net/EventsAPI/Verifications.cs
@@ -41,7 +41,8 @@ public void VerificationTest()
reason = "$user_setting",
brand_name = "sift",
site_domain = "sift.com",
- site_country = "US"
+ site_country = "US",
+ ip = "1.2.3.4"
};
EventRequest eventRequest = new EventRequest()
{
diff --git a/Test/Test.cs b/Test/Test.cs
index 2c519bb..35648b2 100644
--- a/Test/Test.cs
+++ b/Test/Test.cs
@@ -155,7 +155,8 @@ public void TestEventRequest()
},
site_country = "US",
site_domain = "sift.com",
- brand_name = "sift"
+ brand_name = "sift",
+ ip = "1.2.3.4"
};
// Augment with custom fields
@@ -178,7 +179,7 @@ public void TestEventRequest()
"\"$app_version\":\"1.0\",\"$client_language\":\"en-US\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\"," +
"\"$ordered_from\":{\"$store_id\":\"123\",\"$store_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\"," +
"\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\"," +
- "\"$phone\":\"1-415-555-6040\"}},\"foo\":\"bar\"}",
+ "\"$phone\":\"1-415-555-6040\"}},\"$ip\":\"1.2.3.4\",\"foo\":\"bar\"}",
createOrder.ToJson());
@@ -284,14 +285,15 @@ public void TestTransactionEvent()
session_id = sessionId,
transaction_type = "$sale",
transaction_status = "$failure",
- decline_category = "$invalid"
+ decline_category = "$invalid",
+ ip = "1.2.3.4"
};
// Augment with custom fields
transaction.AddField("foo", "bar");
Assert.Equal("{\"$type\":\"$transaction\",\"$user_id\":\"test_dotnet_transaction_event\",\"$session_id\":\"sessionId\"," +
"\"$transaction_type\":\"$sale\",\"$transaction_status\":\"$failure\",\"$amount\":1000000000000,\"$currency_code\":\"USD\"," +
- "\"$decline_category\":\"$invalid\",\"foo\":\"bar\"}", transaction.ToJson());
+ "\"$decline_category\":\"$invalid\",\"$ip\":\"1.2.3.4\",\"foo\":\"bar\"}", transaction.ToJson());
EventRequest eventRequest = new EventRequest
{
@@ -1112,7 +1114,8 @@ public void TestChargebackEvent()
zipcode = "03257"
}
},
- ach_return_code = "B02"
+ ach_return_code = "B02",
+ ip = "1.2.3.4"
};
// Augment with custom fields
@@ -1122,7 +1125,7 @@ public void TestChargebackEvent()
"\"$merchant_profile\":{\"$merchant_id\":\"123\",\"$merchant_category_code\":\"9876\",\"$merchant_name\":\"ABC Merchant\",\"$merchant_address\":" +
"{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\"," +
"\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6040\"}}," +
- "\"$ach_return_code\":\"B02\",\"foo\":\"bar\"}",
+ "\"$ach_return_code\":\"B02\",\"$ip\":\"1.2.3.4\",\"foo\":\"bar\"}",
chargeback.ToJson());
EventRequest eventRequest = new EventRequest
@@ -1173,7 +1176,8 @@ public void TestCreateAccountEvent()
zipcode = "03257"
}
},
- account_types = new ObservableCollection() { "merchant", "premium" }
+ account_types = new ObservableCollection() { "merchant", "premium" },
+ ip = "1.2.3.4"
};
// Augment with custom fields
@@ -1184,7 +1188,7 @@ public void TestCreateAccountEvent()
"\"$twitter\",\"$merchant_profile\":{\"$merchant_id\":\"123\",\"$merchant_category_code\":\"9876\",\"$merchant_name\":\"ABC Merchant\"," +
"\"$merchant_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\"," +
"\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6040\"}},\"$account_types\":" +
- "[\"merchant\",\"premium\"],\"foo\":\"bar\"}",
+ "[\"merchant\",\"premium\"],\"$ip\":\"1.2.3.4\",\"foo\":\"bar\"}",
createAccount.ToJson());
EventRequest eventRequest = new EventRequest
@@ -1235,7 +1239,8 @@ public void TestUpdateAccountEvent()
zipcode = "03257"
}
},
- account_types = new ObservableCollection() { "merchant", "premium" }
+ account_types = new ObservableCollection() { "merchant", "premium" },
+ ip = "1.2.3.4"
};
// Augment with custom fields
@@ -1246,7 +1251,7 @@ public void TestUpdateAccountEvent()
"\"$twitter\",\"$merchant_profile\":{\"$merchant_id\":\"123\",\"$merchant_category_code\":\"9876\",\"$merchant_name\":\"ABC Merchant\"," +
"\"$merchant_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":" +
"\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6040\"}}," +
- "\"$account_types\":[\"merchant\",\"premium\"],\"foo\":\"bar\"}",
+ "\"$account_types\":[\"merchant\",\"premium\"],\"$ip\":\"1.2.3.4\",\"foo\":\"bar\"}",
updateAccount.ToJson());
EventRequest eventRequest = new EventRequest
@@ -1387,9 +1392,11 @@ public void TestUpdateContentComment()
brand_name = "sift",
site_country = "US",
site_domain = "sift.com",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
- string updateCommentBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"comment-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$comment\":{\"$body\":\"Congrats on the new role!\",\"$contact_email\":\"alex_301@domain.com\",\"$parent_comment_id\":\"comment-23407\",\"$root_content_id\":\"listing-12923213\",\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"An old picture\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}]},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\"}";
+ string updateCommentBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"comment-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$comment\":{\"$body\":\"Congrats on the new role!\",\"$contact_email\":\"alex_301@domain.com\",\"$parent_comment_id\":\"comment-23407\",\"$root_content_id\":\"listing-12923213\",\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"An old picture\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}]},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"bill@gmail.com\",\"$verification_phone_number\":\"+123456789012\"}";
Assert.Equal(updateCommentBody, updateContent.ToJson());
@@ -1503,9 +1510,11 @@ public void TestUpdateContentListing()
brand_name = "sift",
site_country = "US",
site_domain = "sift.com",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
- string updateListingBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"listing-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$listing\":{\"$subject\":\"2 Bedroom Apartment for Rent\",\"$body\":\"Capitol Hill Seattle brand new condo. 2 bedrooms and 1 full bath.\",\"$contact_email\":\"alex_301@domain.com\",\"$contact_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$locations\":[{\"$name\":\"Bill Jones\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"Seattle\",\"$region\":\"Washington\",\"$country\":\"US\",\"$zipcode\":\"98112\",\"$phone\":\"1-415-555-6041\"},{\"$name\":\"Bill Jones\"}],\"$listed_items\":[{\"$item_id\":\"0cc175b9c0f1b6a831c399e269772661\",\"$product_title\":\"https://www.domain.com/file.png\",\"$price\":2950000000,\"$currency_code\":\"USD\",\"$quantity\":1,\"$upc\":\"6786211451001\",\"$sku\":\"abc\",\"$isbn\":\"0446576220\",\"$brand\":\"abc\",\"$manufacturer\":\"abc\",\"$category\":\"abc\",\"$tags\":[\"heat\",\"washer/dryer\"],\"$color\":\"ab\",\"$size\":\"ab\"}],\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"Billy's picture\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}],\"$expiration_time\":1549063157000},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\"}";
+ string updateListingBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"listing-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$listing\":{\"$subject\":\"2 Bedroom Apartment for Rent\",\"$body\":\"Capitol Hill Seattle brand new condo. 2 bedrooms and 1 full bath.\",\"$contact_email\":\"alex_301@domain.com\",\"$contact_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$locations\":[{\"$name\":\"Bill Jones\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"Seattle\",\"$region\":\"Washington\",\"$country\":\"US\",\"$zipcode\":\"98112\",\"$phone\":\"1-415-555-6041\"},{\"$name\":\"Bill Jones\"}],\"$listed_items\":[{\"$item_id\":\"0cc175b9c0f1b6a831c399e269772661\",\"$product_title\":\"https://www.domain.com/file.png\",\"$price\":2950000000,\"$currency_code\":\"USD\",\"$quantity\":1,\"$upc\":\"6786211451001\",\"$sku\":\"abc\",\"$isbn\":\"0446576220\",\"$brand\":\"abc\",\"$manufacturer\":\"abc\",\"$category\":\"abc\",\"$tags\":[\"heat\",\"washer/dryer\"],\"$color\":\"ab\",\"$size\":\"ab\"}],\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"Billy's picture\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}],\"$expiration_time\":1549063157000},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"bill@gmail.com\",\"$verification_phone_number\":\"+123456789012\"}";
Assert.Equal(updateListingBody, updateContent.ToJson());
@@ -1567,9 +1576,11 @@ public void TestUpdateContentMessage()
brand_name = "sift",
site_country = "US",
site_domain = "sift.com",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
- string updateMessageBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"message-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$message\":{\"$body\":\"Lets meet at 5pm\",\"$contact_email\":\"alex_301@domain.com\",\"$root_content_id\":\"listing-123\",\"$recipient_user_ids\":[\"fy9h989sjphh71\"],\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"My hike today!\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}]},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\"}";
+ string updateMessageBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"message-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$message\":{\"$body\":\"Lets meet at 5pm\",\"$contact_email\":\"alex_301@domain.com\",\"$root_content_id\":\"listing-123\",\"$recipient_user_ids\":[\"fy9h989sjphh71\"],\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"My hike today!\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}]},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"bill@gmail.com\",\"$verification_phone_number\":\"+123456789012\"}";
Assert.Equal(updateMessageBody, updateContent.ToJson());
@@ -1662,9 +1673,11 @@ public void TestUpdateContentPost()
brand_name = "sift",
site_country = "US",
site_domain = "sift.com",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
- string updatePostBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"post-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$post\":{\"$subject\":\"My new apartment!\",\"$body\":\"Moved into my new apartment yesterday.\",\"$contact_email\":\"alex_301@domain.com\",\"$contact_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$locations\":[{\"$name\":\"Bill Jones\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"Seattle\",\"$region\":\"Washington\",\"$country\":\"US\",\"$zipcode\":\"98112\",\"$phone\":\"1-415-555-6041\"},{\"$name\":\"Bill Jones\"}],\"$categories\":[\"Personal\"],\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"View from the window!\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}],\"$expiration_time\":1549063157000},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\"}";
+ string updatePostBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"post-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$post\":{\"$subject\":\"My new apartment!\",\"$body\":\"Moved into my new apartment yesterday.\",\"$contact_email\":\"alex_301@domain.com\",\"$contact_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$locations\":[{\"$name\":\"Bill Jones\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"Seattle\",\"$region\":\"Washington\",\"$country\":\"US\",\"$zipcode\":\"98112\",\"$phone\":\"1-415-555-6041\"},{\"$name\":\"Bill Jones\"}],\"$categories\":[\"Personal\"],\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"View from the window!\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}],\"$expiration_time\":1549063157000},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"bill@gmail.com\",\"$verification_phone_number\":\"+123456789012\"}";
Assert.Equal(updatePostBody, updateContent.ToJson());
@@ -1736,9 +1749,11 @@ public void TestUpdateContentProfile()
brand_name = "sift",
site_country = "US",
site_domain = "sift.com",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
- string updateProfileBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"listing-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$profile\":{\"$body\":\"Hi! My name is Alex and I just moved to New London!\",\"$contact_email\":\"alex_301@domain.com\",\"$contact_address\":{\"$name\":\"Alex Smith\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"Alexs picture\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}],\"$categories\":[\"Friends\",\"Long-term dating\"]},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\"}";
+ string updateProfileBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"listing-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$profile\":{\"$body\":\"Hi! My name is Alex and I just moved to New London!\",\"$contact_email\":\"alex_301@domain.com\",\"$contact_address\":{\"$name\":\"Alex Smith\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"Alexs picture\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}],\"$categories\":[\"Friends\",\"Long-term dating\"]},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"bill@gmail.com\",\"$verification_phone_number\":\"+123456789012\"}";
Assert.Equal(updateProfileBody, updateContent.ToJson());
@@ -1813,6 +1828,7 @@ public void TestUpdateContentReview()
},
reviewed_content_id = "listing-234234",
+ reviewed_user_id = "fyw3989sjpqr71",
rating = 4.5,
images = new ObservableCollection()
{
@@ -1837,9 +1853,11 @@ public void TestUpdateContentReview()
brand_name = "sift",
site_country = "US",
site_domain = "sift.com",
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
- string updateReviewBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"review-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$review\":{\"$subject\":\"Amazing Tacos!\",\"$body\":\"I ate the tacos.\",\"$contact_email\":\"alex_301@domain.com\",\"$locations\":[{\"$name\":\"Bill Jones\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"Seattle\",\"$region\":\"Washington\",\"$country\":\"US\",\"$zipcode\":\"98112\",\"$phone\":\"1-415-555-6041\"},{\"$name\":\"Bill Jones\"}],\"$item_reviewed\":{\"$item_id\":\"B004834GQO\",\"$product_title\":\"The Slanket Blanket-Texas Tea\",\"$price\":39990000,\"$currency_code\":\"USD\",\"$upc\":\"6786211451001\",\"$sku\":\"004834GQ\",\"$isbn\":\"0446576220\",\"$brand\":\"Slanket\",\"$manufacturer\":\"Slanket\",\"$category\":\"Blankets & Throws\",\"$tags\":[\"Awesome\",\"Wintertime specials\"],\"$color\":\"Texas Tea\",\"$size\":\"6\"},\"$reviewed_content_id\":\"listing-234234\",\"$rating\":4.5,\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"Calamari tacos.\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}]},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\"}";
+ string updateReviewBody = "{\"$type\":\"$update_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"review-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$review\":{\"$subject\":\"Amazing Tacos!\",\"$body\":\"I ate the tacos.\",\"$contact_email\":\"alex_301@domain.com\",\"$locations\":[{\"$name\":\"Bill Jones\",\"$address_1\":\"abc\",\"$address_2\":\"xyz\",\"$city\":\"Seattle\",\"$region\":\"Washington\",\"$country\":\"US\",\"$zipcode\":\"98112\",\"$phone\":\"1-415-555-6041\"},{\"$name\":\"Bill Jones\"}],\"$item_reviewed\":{\"$item_id\":\"B004834GQO\",\"$product_title\":\"The Slanket Blanket-Texas Tea\",\"$price\":39990000,\"$currency_code\":\"USD\",\"$upc\":\"6786211451001\",\"$sku\":\"004834GQ\",\"$isbn\":\"0446576220\",\"$brand\":\"Slanket\",\"$manufacturer\":\"Slanket\",\"$category\":\"Blankets & Throws\",\"$tags\":[\"Awesome\",\"Wintertime specials\"],\"$color\":\"Texas Tea\",\"$size\":\"6\"},\"$reviewed_content_id\":\"listing-234234\",\"$reviewed_user_id\":\"fyw3989sjpqr71\",\"$rating\":4.5,\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"Calamari tacos.\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}]},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"bill@gmail.com\",\"$verification_phone_number\":\"+123456789012\"}";
Assert.Equal(updateReviewBody, updateContent.ToJson());
@@ -1895,10 +1913,11 @@ public void TestAdditemtocartEvent()
site_country = "US",
site_domain = "sift.com",
user_email = "billjones1@example.com",
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
- string addItemToCartBody = "{\"$type\":\"$add_item_to_cart\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$item\":{\"$item_id\":\"B004834GQO\",\"$product_title\":\"The Slanket Blanket-Texas Tea\",\"$price\":39990000,\"$currency_code\":\"USD\",\"$quantity\":16,\"$upc\":\"6786211451001\",\"$sku\":\"004834GQ\",\"$isbn\":\"0446576220\",\"$brand\":\"Slanket\",\"$manufacturer\":\"Slanket\",\"$category\":\"Blankets & Throws\",\"$tags\":[\"Awesome\",\"Wintertime specials\"],\"$color\":\"Texas Tea\"},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"billjones1@example.com\",\"$verification_phone_number\":\"+123456789012\"}";
+ string addItemToCartBody = "{\"$type\":\"$add_item_to_cart\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$item\":{\"$item_id\":\"B004834GQO\",\"$product_title\":\"The Slanket Blanket-Texas Tea\",\"$price\":39990000,\"$currency_code\":\"USD\",\"$quantity\":16,\"$upc\":\"6786211451001\",\"$sku\":\"004834GQ\",\"$isbn\":\"0446576220\",\"$brand\":\"Slanket\",\"$manufacturer\":\"Slanket\",\"$category\":\"Blankets & Throws\",\"$tags\":[\"Awesome\",\"Wintertime specials\"],\"$color\":\"Texas Tea\"},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"billjones1@example.com\",\"$verification_phone_number\":\"+123456789012\",\"$ip\":\"1.2.3.4\"}";
Assert.Equal(addItemToCartBody, addItemToCart.ToJson());
@@ -1964,10 +1983,11 @@ public void TestAddPromotionEvent()
site_country = "US",
site_domain = "sift.com",
user_email = "billjones1@example.com",
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
- string addPromotionbody = "{\"$type\":\"$add_promotion\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$promotions\":[{\"$promotion_id\":\"NewCustomerReferral2016\",\"$status\":\"$success\",\"$failure_reason\":\"$already_used\",\"$description\":\"$5 off your first 5 rides\",\"$referrer_user_id\":\"elon-m93903\",\"$discount\":{\"$percentage_off\":0.2,\"$amount\":5000000,\"$currency_code\":\"USD\",\"$minimum_purchase_amount\":50000000},\"$credit_point\":{\"$amount\":5000,\"$credit_point_type\":\"character xp points\"}},{\"$promotion_id\":\"NewCustomerReferral2016\"}],\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"billjones1@example.com\",\"$verification_phone_number\":\"+123456789012\"}";
+ string addPromotionbody = "{\"$type\":\"$add_promotion\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$promotions\":[{\"$promotion_id\":\"NewCustomerReferral2016\",\"$status\":\"$success\",\"$failure_reason\":\"$already_used\",\"$description\":\"$5 off your first 5 rides\",\"$referrer_user_id\":\"elon-m93903\",\"$discount\":{\"$percentage_off\":0.2,\"$amount\":5000000,\"$currency_code\":\"USD\",\"$minimum_purchase_amount\":50000000},\"$credit_point\":{\"$amount\":5000,\"$credit_point_type\":\"character xp points\"}},{\"$promotion_id\":\"NewCustomerReferral2016\"}],\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"billjones1@example.com\",\"$verification_phone_number\":\"+123456789012\",\"$ip\":\"1.2.3.4\"}";
Assert.Equal(addPromotionbody, addPromotion.ToJson());
@@ -2008,10 +2028,11 @@ public void TestContentStatusEvent()
site_country = "US",
site_domain = "sift.com",
user_email = "billjones1@example.com",
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
- string contentStatusbody = "{\"$type\":\"$content_status\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$content_id\":\"9671500641\",\"$status\":\"$paused\",\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"billjones1@example.com\",\"$verification_phone_number\":\"+123456789012\"}";
+ string contentStatusbody = "{\"$type\":\"$content_status\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$content_id\":\"9671500641\",\"$status\":\"$paused\",\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"billjones1@example.com\",\"$verification_phone_number\":\"+123456789012\",\"$ip\":\"1.2.3.4\"}";
Assert.Equal(contentStatusbody, contentStatus.ToJson());
@@ -2050,10 +2071,11 @@ public void TestFlagContentEvent()
accept_language = "en-US",
content_language = "en-GB"
},
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
- string flagcontentbody = "{\"$type\":\"$flag_content\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$content_id\":\"9671500641\",\"$flagged_by\":\"jamieli89\",\"$reason\":\"$toxic\",\"$user_email\":\"billjones1@example.com\",\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$verification_phone_number\":\"+123456789012\"}";
+ string flagcontentbody = "{\"$type\":\"$flag_content\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$content_id\":\"9671500641\",\"$flagged_by\":\"jamieli89\",\"$reason\":\"$toxic\",\"$user_email\":\"billjones1@example.com\",\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$verification_phone_number\":\"+123456789012\",\"$ip\":\"1.2.3.4\"}";
Assert.Equal(flagcontentbody, flagContent.ToJson());
@@ -2108,10 +2130,11 @@ public void TestRemoveItemFromCartEvent()
site_country = "US",
site_domain = "sift.com",
user_email = "billjones1@example.com",
- verification_phone_number = "+123456789012"
+ verification_phone_number = "+123456789012",
+ ip = "1.2.3.4"
};
- string removeitemfromcartbody = "{\"$type\":\"$remove_item_from_cart\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$item\":{\"$item_id\":\"B004834GQO\",\"$product_title\":\"The Slanket Blanket-Texas Tea\",\"$price\":39990000,\"$currency_code\":\"USD\",\"$quantity\":2,\"$upc\":\"6786211451001\",\"$sku\":\"004834GQ\",\"$isbn\":\"0446576220\",\"$brand\":\"Slanket\",\"$manufacturer\":\"Slanket\",\"$category\":\"Blankets & Throws\",\"$tags\":[\"Awesome\",\"Wintertime specials\"],\"$color\":\"Texas Tea\"},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"billjones1@example.com\",\"$verification_phone_number\":\"+123456789012\"}";
+ string removeitemfromcartbody = "{\"$type\":\"$remove_item_from_cart\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$item\":{\"$item_id\":\"B004834GQO\",\"$product_title\":\"The Slanket Blanket-Texas Tea\",\"$price\":39990000,\"$currency_code\":\"USD\",\"$quantity\":2,\"$upc\":\"6786211451001\",\"$sku\":\"004834GQ\",\"$isbn\":\"0446576220\",\"$brand\":\"Slanket\",\"$manufacturer\":\"Slanket\",\"$category\":\"Blankets & Throws\",\"$tags\":[\"Awesome\",\"Wintertime specials\"],\"$color\":\"Texas Tea\"},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$user_email\":\"billjones1@example.com\",\"$verification_phone_number\":\"+123456789012\",\"$ip\":\"1.2.3.4\"}";
Assert.Equal(removeitemfromcartbody, removeItemFromCart.ToJson());
@@ -2249,9 +2272,10 @@ public void TestCreateOrderEvent()
user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",
accept_language = "en-US",
content_language = "en-GB"
- }
+ },
+ ip = "1.2.3.4"
};
- string createorderbody = "{\"$type\":\"$create_order\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$order_id\":\"ORDER-28168441\",\"$user_email\":\"billjones1@example.com\",\"$amount\":115940000,\"$currency_code\":\"USD\",\"$billing_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$payment_methods\":[{\"$payment_type\":\"$credit_card\",\"$payment_gateway\":\"$braintree\",\"$card_bin\":\"542486\",\"$card_last4\":\"4444\"},{\"$payment_type\":\"$credit_card\"}],\"$shipping_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$expedited_shipping\":true,\"$items\":[{\"$item_id\":\"12344321\",\"$product_title\":\"Microwavable Kettle Corn: Original Flavor\",\"$price\":4990000,\"$currency_code\":\"USD\",\"$quantity\":4,\"$upc\":\"097564307560\",\"$sku\":\"03586005\",\"$isbn\":\"0446576220\",\"$brand\":\"Peters Kettle Corn\",\"$manufacturer\":\"Peters Kettle Corn\",\"$category\":\"Food and Grocery\",\"$tags\":[\"Popcorn\",\"Snacks\",\"On Sale\"],\"$color\":\"Texas Tea\"},{\"$item_id\":\"12344321\"}],\"$seller_user_id\":\"slinkys_emporium\",\"$promotions\":[{\"$promotion_id\":\"FirstTimeBuyer\",\"$status\":\"$success\",\"$description\":\"$5 off\",\"$discount\":{\"$amount\":5000000,\"$currency_code\":\"USD\",\"$minimum_purchase_amount\":25000000}}],\"$shipping_method\":\"$physical\",\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$ordered_from\":{\"$store_id\":\"123\",\"$store_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6040\"}},\"$verification_phone_number\":\"+123456789012\",\"$shipping_carrier\":\"UPS\",\"$shipping_tracking_numbers\":[\"1Z204E380338943508\",\"1Z204E380338943509\"]}";
+ string createorderbody = "{\"$type\":\"$create_order\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$order_id\":\"ORDER-28168441\",\"$user_email\":\"billjones1@example.com\",\"$amount\":115940000,\"$currency_code\":\"USD\",\"$billing_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$payment_methods\":[{\"$payment_type\":\"$credit_card\",\"$payment_gateway\":\"$braintree\",\"$card_bin\":\"542486\",\"$card_last4\":\"4444\"},{\"$payment_type\":\"$credit_card\"}],\"$shipping_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$expedited_shipping\":true,\"$items\":[{\"$item_id\":\"12344321\",\"$product_title\":\"Microwavable Kettle Corn: Original Flavor\",\"$price\":4990000,\"$currency_code\":\"USD\",\"$quantity\":4,\"$upc\":\"097564307560\",\"$sku\":\"03586005\",\"$isbn\":\"0446576220\",\"$brand\":\"Peters Kettle Corn\",\"$manufacturer\":\"Peters Kettle Corn\",\"$category\":\"Food and Grocery\",\"$tags\":[\"Popcorn\",\"Snacks\",\"On Sale\"],\"$color\":\"Texas Tea\"},{\"$item_id\":\"12344321\"}],\"$seller_user_id\":\"slinkys_emporium\",\"$promotions\":[{\"$promotion_id\":\"FirstTimeBuyer\",\"$status\":\"$success\",\"$description\":\"$5 off\",\"$discount\":{\"$amount\":5000000,\"$currency_code\":\"USD\",\"$minimum_purchase_amount\":25000000}}],\"$shipping_method\":\"$physical\",\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$ordered_from\":{\"$store_id\":\"123\",\"$store_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6040\"}},\"$verification_phone_number\":\"+123456789012\",\"$shipping_carrier\":\"UPS\",\"$shipping_tracking_numbers\":[\"1Z204E380338943508\",\"1Z204E380338943509\"],\"$ip\":\"1.2.3.4\"}";
Assert.Equal(createorderbody, createOrder.ToJson());
@@ -2406,9 +2430,10 @@ public void TestUpdateOrderEvent()
zipcode = "03257"
}
- }
+ },
+ ip = "1.2.3.4"
};
- string updateorderbody = "{\"$type\":\"$update_order\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$order_id\":\"ORDER-28168441\",\"$user_email\":\"billjones1@example.com\",\"$amount\":115940000,\"$currency_code\":\"USD\",\"$billing_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$payment_methods\":[{\"$payment_type\":\"$credit_card\",\"$payment_gateway\":\"$braintree\",\"$card_bin\":\"542486\",\"$card_last4\":\"4444\"},{\"$payment_type\":\"$credit_card\"}],\"$shipping_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$expedited_shipping\":true,\"$items\":[{\"$item_id\":\"12344321\",\"$product_title\":\"Microwavable Kettle Corn: Original Flavor\",\"$price\":4990000,\"$currency_code\":\"USD\",\"$quantity\":4,\"$upc\":\"097564307560\",\"$sku\":\"03586005\",\"$isbn\":\"0446576220\",\"$brand\":\"Peters Kettle Corn\",\"$manufacturer\":\"Peters Kettle Corn\",\"$category\":\"Food and Grocery\",\"$tags\":[\"Popcorn\",\"Snacks\",\"On Sale\"],\"$color\":\"Texas Tea\"},{\"$item_id\":\"12344321\"}],\"$seller_user_id\":\"slinkys_emporium\",\"$promotions\":[{\"$promotion_id\":\"FirstTimeBuyer\",\"$status\":\"$success\",\"$description\":\"$5 off\",\"$discount\":{\"$amount\":5000000,\"$currency_code\":\"USD\",\"$minimum_purchase_amount\":25000000}}],\"$shipping_method\":\"$physical\",\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$ordered_from\":{\"$store_id\":\"123\",\"$store_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6040\"}},\"$verification_phone_number\":\"+123456789012\",\"$shipping_carrier\":\"UPS\",\"$shipping_tracking_numbers\":[\"1Z204E380338943508\",\"1Z204E380338943509\"],\"$merchant_profile\":{\"$merchant_id\":\"AX527123\",\"$merchant_category_code\":\"1234\",\"$merchant_name\":\"Dream Company\",\"$merchant_address\":{\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6040\"}}}";
+ string updateorderbody = "{\"$type\":\"$update_order\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"gigtleqddo84l8cm15qe4il\",\"$order_id\":\"ORDER-28168441\",\"$user_email\":\"billjones1@example.com\",\"$amount\":115940000,\"$currency_code\":\"USD\",\"$billing_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$payment_methods\":[{\"$payment_type\":\"$credit_card\",\"$payment_gateway\":\"$braintree\",\"$card_bin\":\"542486\",\"$card_last4\":\"4444\"},{\"$payment_type\":\"$credit_card\"}],\"$shipping_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6041\"},\"$expedited_shipping\":true,\"$items\":[{\"$item_id\":\"12344321\",\"$product_title\":\"Microwavable Kettle Corn: Original Flavor\",\"$price\":4990000,\"$currency_code\":\"USD\",\"$quantity\":4,\"$upc\":\"097564307560\",\"$sku\":\"03586005\",\"$isbn\":\"0446576220\",\"$brand\":\"Peters Kettle Corn\",\"$manufacturer\":\"Peters Kettle Corn\",\"$category\":\"Food and Grocery\",\"$tags\":[\"Popcorn\",\"Snacks\",\"On Sale\"],\"$color\":\"Texas Tea\"},{\"$item_id\":\"12344321\"}],\"$seller_user_id\":\"slinkys_emporium\",\"$promotions\":[{\"$promotion_id\":\"FirstTimeBuyer\",\"$status\":\"$success\",\"$description\":\"$5 off\",\"$discount\":{\"$amount\":5000000,\"$currency_code\":\"USD\",\"$minimum_purchase_amount\":25000000}}],\"$shipping_method\":\"$physical\",\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$brand_name\":\"sift\",\"$site_country\":\"US\",\"$site_domain\":\"sift.com\",\"$ordered_from\":{\"$store_id\":\"123\",\"$store_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6040\"}},\"$verification_phone_number\":\"+123456789012\",\"$shipping_carrier\":\"UPS\",\"$shipping_tracking_numbers\":[\"1Z204E380338943508\",\"1Z204E380338943509\"],\"$merchant_profile\":{\"$merchant_id\":\"AX527123\",\"$merchant_category_code\":\"1234\",\"$merchant_name\":\"Dream Company\",\"$merchant_address\":{\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\",\"$region\":\"New Hampshire\",\"$country\":\"US\",\"$zipcode\":\"03257\",\"$phone\":\"1-415-555-6040\"}},\"$ip\":\"1.2.3.4\"}";
Assert.Equal(updateorderbody, updateOrder.ToJson());
@@ -2467,9 +2492,11 @@ public void TestCreateContentCommentEvent()
accept_language = "en-US",
content_language = "en-GB"
},
+ user_email = "bill@gmail.com",
+ verification_phone_number = "+123456789012"
};
- string createcontentbody = "{\"$type\":\"$create_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"comment-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$comment\":{\"$body\":\"Congrats on the new role!\",\"$contact_email\":\"alex_301@domain.com\",\"$parent_comment_id\":\"comment-23407\",\"$root_content_id\":\"listing-12923213\",\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"An old picture\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}]},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"}}";
+ string createcontentbody = "{\"$type\":\"$create_content\",\"$user_id\":\"fyw3989sjpqr71\",\"$content_id\":\"comment-23412\",\"$session_id\":\"a234ksjfgn435sfg\",\"$status\":\"$active\",\"$ip\":\"255.255.255.0\",\"$comment\":{\"$body\":\"Congrats on the new role!\",\"$contact_email\":\"alex_301@domain.com\",\"$parent_comment_id\":\"comment-23407\",\"$root_content_id\":\"listing-12923213\",\"$images\":[{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\",\"$link\":\"https://www.domain.com/file.png\",\"$description\":\"An old picture\"},{\"$md5_hash\":\"0cc175b9c0f1b6a831c399e269772661\"}]},\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-US\",\"$content_language\":\"en-GB\"},\"$user_email\":\"bill@gmail.com\",\"$verification_phone_number\":\"+123456789012\"}";
Assert.Equal(createcontentbody, createContent.ToJson());
@@ -2513,10 +2540,11 @@ public void TestVerificationEvent()
reason = "$user_setting",
brand_name = "xyz",
site_country = "AU",
- site_domain = "somehost.example.com"
+ site_domain = "somehost.example.com",
+ ip = "1.2.3.4"
};
- Assert.Equal("{\"$type\":\"$verification\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"sessionId\",\"$status\":\"$pending\",\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-GB\",\"$content_language\":\"en-US\"},\"$verified_event\":\"$login\",\"$verified_entity_id\":\"123\",\"$verification_type\":\"$sms\",\"$verified_value\":\"14155551212\",\"$reason\":\"$user_setting\",\"$brand_name\":\"xyz\",\"$site_country\":\"AU\",\"$site_domain\":\"somehost.example.com\"}",
+ Assert.Equal("{\"$type\":\"$verification\",\"$user_id\":\"billy_jones_301\",\"$session_id\":\"sessionId\",\"$status\":\"$pending\",\"$browser\":{\"$user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\"$accept_language\":\"en-GB\",\"$content_language\":\"en-US\"},\"$verified_event\":\"$login\",\"$verified_entity_id\":\"123\",\"$verification_type\":\"$sms\",\"$verified_value\":\"14155551212\",\"$reason\":\"$user_setting\",\"$brand_name\":\"xyz\",\"$site_country\":\"AU\",\"$site_domain\":\"somehost.example.com\",\"$ip\":\"1.2.3.4\"}",
verification.ToJson());
EventRequest eventRequest = new EventRequest