From 12b0c0f8ac4211004c9f6953d377dafd7084465f Mon Sep 17 00:00:00 2001 From: vilnytskyi Date: Thu, 16 Oct 2025 13:07:45 +0200 Subject: [PATCH 1/9] Added support for missing fields --- .gitignore | 1 + CHANGELOG.md | 190 ++++++++++++++++++ Sift/Schema/ComplexTypes/booking.json | 7 +- .../ComplexTypes/card_bin_metadata.json | 22 ++ Sift/Schema/ComplexTypes/discount.json | 6 + Sift/Schema/ComplexTypes/exchange_rate.json | 18 ++ Sift/Schema/ComplexTypes/item.json | 6 + Sift/Schema/ComplexTypes/payment_method.json | 6 + Sift/Schema/ComplexTypes/segment.json | 3 + Sift/Schema/create_order.json | 6 + Sift/Schema/transaction.json | 6 + Sift/Schema/update_account.json | 4 + Sift/Schema/update_order.json | 6 + Sift/Schema/wager.json | 6 + Sift/Sift.csproj | 10 +- Test.Integration.Net7/EventsAPI/Order.cs | 21 +- .../EventsAPI/Transactions.cs | 42 +++- Test.Integration.Net7/EventsAPI/Wagers.cs | 7 +- .../Test.Integration.Net7.csproj | 10 +- Test.Integration.NetFx48/EventsAPI/Order.cs | 21 +- .../EventsAPI/Transactions.cs | 42 +++- Test.Integration.NetFx48/EventsAPI/Wagers.cs | 7 +- .../Test.Integration.NetFx48.csproj | 6 +- Test/Test.cs | 164 ++++++++++++++- Test/Test.csproj | 11 +- 25 files changed, 594 insertions(+), 34 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 Sift/Schema/ComplexTypes/card_bin_metadata.json create mode 100644 Sift/Schema/ComplexTypes/exchange_rate.json diff --git a/.gitignore b/.gitignore index d7bc2319..4dcdedd8 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ tarballs/ test-results/ Thumbs.db .vs/ +.idea/ # mac bundle stuff *.dmg diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..865c168d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,190 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.6.0] - 2025-01-XX + +### Breaking Changes + +#### ⚠️ iata_carrier_code Migration (February 2025 API Change) + +The `$iata_carrier_code` field has been moved from the `Booking` complex type to the `Segment` complex type to properly represent IATA codes at the segment level for flights. + +**Migration Required:** + +```csharp +// BEFORE (v1.5.0 and earlier) - NO LONGER WORKS +var booking = new Booking +{ + iata_carrier_code = "AS", // ❌ This property no longer exists + segments = new ObservableCollection() + { + new Segment() { /* ... */ } + } +}; + +// AFTER (v1.6.0+) - REQUIRED +var booking = new Booking +{ + segments = new ObservableCollection() + { + new Segment() + { + iata_carrier_code = "AS", // ✅ Now at segment level + departure_airport_code = "SFO", + arrival_airport_code = "LAS", + /* ... */ + } + } +}; +``` + +**Why this change?** This aligns with Sift's API v205 specification where IATA carrier codes are specific to each flight segment, not the overall booking. + +### Added + +#### API Compliance Updates (February-April 2025) + +- **`$exchange_rate` field** (April 2025) + - Added to events: `$create_order`, `$update_order`, `$transaction`, `$wager` + - Added to complex types: `$booking`, `$item`, `$discount` + - Supports currency exchange rate tracking with quote currency and rate + +- **`$card_bin_metadata` field** (March 2025) + - Added to `$payment_method` complex type + - Provides detailed card BIN (Bank Identification Number) metadata + +- **`$promotions` field** (April 2025) + - Added to `$update_account` event + - Allows tracking promotion changes during account updates + +- **`$iata_carrier_code` field** (February 2025) + - Added to `Segment` complex type (for flight segments) + - Properly represents IATA airline codes at the segment level + +#### Platform Support + +- **Apple Silicon (ARM64) support** + - Added `osx-arm64` runtime identifier + - Native support for M1, M2, and M3 Mac processors + +#### Developer Experience + +- **JetBrains IDE support** + - Added `.idea/` directory to `.gitignore` + - Better IDE integration for Rider and IntelliJ users + +### Changed + +- **Booking model**: Removed deprecated `iata_carrier_code` property (see Breaking Changes) +- **Segment model**: Added `iata_carrier_code` property +- **UpdateAccount model**: Added `promotions` array property +- **Package version**: Updated to 1.6.0 + +### Deprecated + +- **Booking.iata_carrier_code** (removed in v1.6.0) + - Deprecated in Sift API v205 (February 2025) + - Replaced by `Segment.iata_carrier_code` + +### Technical Details + +#### New Complex Types + +- **ExchangeRate** + - `quote_currency_code` (string): The currency code for the quote + - `rate` (double): The exchange rate value + +- **CardBinMetadata** + - Provides card BIN information for payment methods + +#### Schema Updates + +The following JSON schema files were updated: + +**Events:** +- `create_order.json` - Added `$exchange_rate` +- `update_order.json` - Added `$exchange_rate` +- `transaction.json` - Added `$exchange_rate` +- `wager.json` - Added `$exchange_rate` +- `update_account.json` - Added `$promotions` + +**Complex Types:** +- `booking.json` - Added `$exchange_rate`, removed `$iata_carrier_code` +- `item.json` - Added `$exchange_rate` +- `discount.json` - Added `$exchange_rate` +- `segment.json` - Added `$iata_carrier_code` +- `payment_method.json` - Added `$card_bin_metadata` + +### Notes + +This release brings the .NET SDK into full compliance with Sift API v205 specifications as of April 2025, including all reserved field updates from February through April 2025. + +For complete migration guidance, see [IATA_CARRIER_CODE_MIGRATION_SUMMARY.md](IATA_CARRIER_CODE_MIGRATION_SUMMARY.md). + +--- + +## [1.5.0] - 2024-XX-XX + +### Added +- iGaming Events API support +- Additional reserved fields for gaming/wagering use cases + +### Changed +- Updated API version compatibility + +--- + +## [1.4.0] - 2023-XX-XX + +### Added +- Support for complex fields in events +- Enhanced event validation + +--- + +## Earlier Releases + +For earlier release notes, see [GitHub Releases](https://github.com/siftscience/sift-dotnet/releases). + +--- + +## Upgrade Guide + +### From 1.5.x to 1.6.0 + +1. **Update package reference:** + ```xml + + ``` + +2. **Update iata_carrier_code usage** (if applicable): + - Find all instances of `booking.iata_carrier_code` + - Move to `segment.iata_carrier_code` within the segments array + - See Breaking Changes section above for code examples + +3. **Verify builds and tests:** + - Rebuild your project + - Run all tests, especially those involving flight bookings + - Update any tests that reference `booking.iata_carrier_code` + +4. **Optional: Leverage new features:** + - Use `exchange_rate` fields for multi-currency transactions + - Use `card_bin_metadata` for enhanced payment method tracking + - Use `promotions` in account update events + +### Compatibility + +- ✅ Compatible with Sift API v205 +- ✅ .NET Standard 2.0 +- ✅ Supports .NET Framework 4.6.1+, .NET Core 2.0+, .NET 5.0+ +- ✅ Native Apple Silicon (M1/M2/M3) support + +--- + +[1.6.0]: https://github.com/siftscience/sift-dotnet/compare/v1.5.0...v1.6.0 +[1.5.0]: https://github.com/siftscience/sift-dotnet/compare/v1.4.0...v1.5.0 +[1.4.0]: https://github.com/siftscience/sift-dotnet/releases/tag/v1.4.0 diff --git a/Sift/Schema/ComplexTypes/booking.json b/Sift/Schema/ComplexTypes/booking.json index 3d3252fb..6a9c30b3 100644 --- a/Sift/Schema/ComplexTypes/booking.json +++ b/Sift/Schema/ComplexTypes/booking.json @@ -25,8 +25,11 @@ "$currency_code": { "type": [ "string", "null" ] }, - "$iata_carrier_code": { - "type": [ "string", "null" ] + "$exchange_rate": { + "oneOf": [ + { "$ref": "exchange_rate.json" }, + { "type": "null" } + ] }, "$quantity": { "type": [ "integer", "null" ] diff --git a/Sift/Schema/ComplexTypes/card_bin_metadata.json b/Sift/Schema/ComplexTypes/card_bin_metadata.json new file mode 100644 index 00000000..54284e5a --- /dev/null +++ b/Sift/Schema/ComplexTypes/card_bin_metadata.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "CardBinMetadata", + "type": "object", + "properties": { + "$bank": { + "type": [ "string", "null" ] + }, + "$brand": { + "type": [ "string", "null" ] + }, + "$country": { + "type": [ "string", "null" ] + }, + "$level": { + "type": [ "string", "null" ] + }, + "$type": { + "type": [ "string", "null" ] + } + } +} diff --git a/Sift/Schema/ComplexTypes/discount.json b/Sift/Schema/ComplexTypes/discount.json index 3cecbcaf..1c650d83 100644 --- a/Sift/Schema/ComplexTypes/discount.json +++ b/Sift/Schema/ComplexTypes/discount.json @@ -13,6 +13,12 @@ "$currency_code": { "type": [ "string", "null" ] }, + "$exchange_rate": { + "oneOf": [ + { "$ref": "exchange_rate.json" }, + { "type": "null" } + ] + }, "$minimum_purchase_amount": { "type": [ "integer", "null" ], "format": "long" diff --git a/Sift/Schema/ComplexTypes/exchange_rate.json b/Sift/Schema/ComplexTypes/exchange_rate.json new file mode 100644 index 00000000..ac74dd34 --- /dev/null +++ b/Sift/Schema/ComplexTypes/exchange_rate.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "ExchangeRate", + "type": "object", + "required": [ + "$quote_currency_code", + "$rate" + ], + "properties": { + "$quote_currency_code": { + "type": [ "string", "null" ] + }, + "$rate": { + "type": [ "number", "null" ], + "format": "float" + } + } +} \ No newline at end of file diff --git a/Sift/Schema/ComplexTypes/item.json b/Sift/Schema/ComplexTypes/item.json index d8ef4daa..901d86d7 100644 --- a/Sift/Schema/ComplexTypes/item.json +++ b/Sift/Schema/ComplexTypes/item.json @@ -16,6 +16,12 @@ "$currency_code": { "type": [ "string", "null" ] }, + "$exchange_rate": { + "oneOf": [ + { "$ref": "exchange_rate.json" }, + { "type": "null" } + ] + }, "$quantity": { "type": [ "integer", "null" ] }, diff --git a/Sift/Schema/ComplexTypes/payment_method.json b/Sift/Schema/ComplexTypes/payment_method.json index 89b92298..00d9e06b 100644 --- a/Sift/Schema/ComplexTypes/payment_method.json +++ b/Sift/Schema/ComplexTypes/payment_method.json @@ -92,6 +92,12 @@ }, "$wallet_type": { "type": [ "string", "null" ] + }, + "$card_bin_metadata": { + "oneOf": [ + { "$ref": "card_bin_metadata.json" }, + { "type": "null" } + ] } } } diff --git a/Sift/Schema/ComplexTypes/segment.json b/Sift/Schema/ComplexTypes/segment.json index 580f4e0e..860d59af 100644 --- a/Sift/Schema/ComplexTypes/segment.json +++ b/Sift/Schema/ComplexTypes/segment.json @@ -23,6 +23,9 @@ "$fare_class": { "type": [ "string", "null" ] }, + "$iata_carrier_code": { + "type": [ "string", "null" ] + }, "$departure_address": { "oneOf": [ { "$ref": "address.json" }, diff --git a/Sift/Schema/create_order.json b/Sift/Schema/create_order.json index 8bb59197..985bd32d 100644 --- a/Sift/Schema/create_order.json +++ b/Sift/Schema/create_order.json @@ -27,6 +27,12 @@ "$currency_code": { "type": [ "string", "null" ] }, + "$exchange_rate": { + "oneOf": [ + { "$ref": "ComplexTypes/exchange_rate.json" }, + { "type": "null" } + ] + }, "$billing_address": { "oneOf": [ { "$ref": "ComplexTypes/address.json" }, diff --git a/Sift/Schema/transaction.json b/Sift/Schema/transaction.json index bceb3b9b..d8155b89 100644 --- a/Sift/Schema/transaction.json +++ b/Sift/Schema/transaction.json @@ -30,6 +30,12 @@ "$currency_code": { "type": [ "string", "null" ] }, + "$exchange_rate": { + "oneOf": [ + { "$ref": "ComplexTypes/exchange_rate.json" }, + { "type": "null" } + ] + }, "$order_id": { "type": [ "string", "null" ] }, diff --git a/Sift/Schema/update_account.json b/Sift/Schema/update_account.json index 770594c9..599ee762 100644 --- a/Sift/Schema/update_account.json +++ b/Sift/Schema/update_account.json @@ -81,6 +81,10 @@ }, "$verification_phone_number": { "type": [ "string", "null" ] + }, + "$promotions": { + "type": [ "array", "null" ], + "items": { "$ref": "ComplexTypes/promotion.json" } } } } diff --git a/Sift/Schema/update_order.json b/Sift/Schema/update_order.json index 9ea3089a..e55464ba 100644 --- a/Sift/Schema/update_order.json +++ b/Sift/Schema/update_order.json @@ -27,6 +27,12 @@ "$currency_code": { "type": [ "string", "null" ] }, + "$exchange_rate": { + "oneOf": [ + { "$ref": "ComplexTypes/exchange_rate.json" }, + { "type": "null" } + ] + }, "$billing_address": { "oneOf": [ { "$ref": "ComplexTypes/address.json" }, diff --git a/Sift/Schema/wager.json b/Sift/Schema/wager.json index db88bd24..ff0a996b 100644 --- a/Sift/Schema/wager.json +++ b/Sift/Schema/wager.json @@ -27,6 +27,12 @@ "$currency_code": { "type": [ "string", "null" ] }, + "$exchange_rate": { + "oneOf": [ + { "$ref": "ComplexTypes/exchange_rate.json" }, + { "type": "null" } + ] + }, "$wager_event_type": { "type": [ "string", "null" ] }, diff --git a/Sift/Sift.csproj b/Sift/Sift.csproj index 4c16f532..90e0a3ed 100644 --- a/Sift/Sift.csproj +++ b/Sift/Sift.csproj @@ -4,8 +4,8 @@ Sift Sift Sift - 1.5.0 - Release 1.5.0 + 1.6.0 + Release 1.6.0 netstandard2.0 Sift sift;siftscience;client;api;client;async @@ -13,7 +13,7 @@ https://github.com/siftscience/sift-dotnet https://raw.github.com/siftscience/sift-dotnet/master/LICENSE true - win10-x64 + win10-x64;osx-arm64 True @@ -27,7 +27,7 @@ - - + + diff --git a/Test.Integration.Net7/EventsAPI/Order.cs b/Test.Integration.Net7/EventsAPI/Order.cs index 002c57ee..6d71395c 100644 --- a/Test.Integration.Net7/EventsAPI/Order.cs +++ b/Test.Integration.Net7/EventsAPI/Order.cs @@ -56,7 +56,12 @@ private EventResponse CreateOrder(Client sift) order_id = OrderId, user_email = UserEmail, amount = 115940000, - currency_code = "USD", + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, billing_address = new Address() { name = "Bill Jones", @@ -122,7 +127,12 @@ private EventResponse CreateOrder(Client sift) item_id = ItemId, product_title = "Microwavable Kettle Corn: Original Flavor", price = 4990000, - currency_code = "USD", + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, upc = "097564307560", sku = "03586005", isbn = "0446576220", @@ -149,7 +159,12 @@ private EventResponse CreateOrder(Client sift) discount = new Discount() { amount = 5000000, - currency_code = "USD", + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, minimum_purchase_amount = 25000000 } } diff --git a/Test.Integration.Net7/EventsAPI/Transactions.cs b/Test.Integration.Net7/EventsAPI/Transactions.cs index 42c90f9b..3719e07e 100644 --- a/Test.Integration.Net7/EventsAPI/Transactions.cs +++ b/Test.Integration.Net7/EventsAPI/Transactions.cs @@ -43,7 +43,12 @@ public void TransactionTest() transaction_type = "$sale", transaction_status = "$failure", amount = 506790000, - currency_code = "USD", + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, order_id = OrderId, transaction_id = TransactionId, billing_address = new Address() @@ -240,5 +245,40 @@ public void WithdrawalTransactionTest() EventResponse res = sift.SendAsync(eventRequest).Result; Assert.Equal("0", res.Status.ToString()); } + + [Fact] + public void TransactionEventWithAmountAndBinMetadataFieldsTest() + { + var sift = new Client(ApiKey); + var transaction = new Transaction + { + user_id = "test_dotnet_transaction_event", + amount = 100000000L, + currency_code = "EUR", + transaction_type = "$withdrawal", + transaction_status = "$failure", + payment_method = new PaymentMethod + { + payment_type = "$credit_card", + card_bin = "542486", + card_last4 = "4444", + card_bin_metadata = new CardBinMetadata + { + bank = "Chase", + brand = "VISA", + country = "US", + level = "Gold", + type = "CREDIT" + } + } + }; + + EventRequest eventRequest = new EventRequest() + { + Event = transaction + }; + EventResponse res = sift.SendAsync(eventRequest).Result; + Assert.Equal("0", res.Status.ToString()); + } } } diff --git a/Test.Integration.Net7/EventsAPI/Wagers.cs b/Test.Integration.Net7/EventsAPI/Wagers.cs index 22ffa679..56cb0f3d 100644 --- a/Test.Integration.Net7/EventsAPI/Wagers.cs +++ b/Test.Integration.Net7/EventsAPI/Wagers.cs @@ -34,7 +34,12 @@ public void WagerTest() wager_type = "$parlay", wager_status = "$accept", amount = 5000, - currency_code = "USD", + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, minimum_wager_amount = 100L, wager_event_type = "NBA", wager_event_name = "Bulls-Lakers", diff --git a/Test.Integration.Net7/Test.Integration.Net7.csproj b/Test.Integration.Net7/Test.Integration.Net7.csproj index b246dc7b..15039677 100644 --- a/Test.Integration.Net7/Test.Integration.Net7.csproj +++ b/Test.Integration.Net7/Test.Integration.Net7.csproj @@ -1,16 +1,16 @@  - net7.0 + net8.0 false - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Test.Integration.NetFx48/EventsAPI/Order.cs b/Test.Integration.NetFx48/EventsAPI/Order.cs index 75d8622b..2b7ef686 100644 --- a/Test.Integration.NetFx48/EventsAPI/Order.cs +++ b/Test.Integration.NetFx48/EventsAPI/Order.cs @@ -40,7 +40,12 @@ public void CreateOrder() order_id = OrderId, user_email = UserEmail, amount = 115940000, - currency_code = "USD", + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, billing_address = new Address() { name = "Bill Jones", @@ -106,7 +111,12 @@ public void CreateOrder() item_id = ItemId, product_title = "Microwavable Kettle Corn: Original Flavor", price = 4990000, - currency_code = "USD", + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, upc = "097564307560", sku = "03586005", isbn = "0446576220", @@ -133,7 +143,12 @@ public void CreateOrder() discount = new Discount() { amount = 5000000, - currency_code = "USD", + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, minimum_purchase_amount = 25000000 } } diff --git a/Test.Integration.NetFx48/EventsAPI/Transactions.cs b/Test.Integration.NetFx48/EventsAPI/Transactions.cs index 1d4bcc72..19eca2a7 100644 --- a/Test.Integration.NetFx48/EventsAPI/Transactions.cs +++ b/Test.Integration.NetFx48/EventsAPI/Transactions.cs @@ -39,7 +39,12 @@ public void TransactionTest() transaction_type = "$sale", transaction_status = "$failure", amount = 506790000, - currency_code = "USD", + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, order_id = OrderId, transaction_id = TransactionId, billing_address = new Address() @@ -236,5 +241,40 @@ public void WithdrawalTransactionTest() EventResponse res = sift.SendAsync(eventRequest).Result; Assert.Equal("0", res.Status.ToString()); } + + [Fact] + public void TransactionEventWithAmountAndBinMetadataFieldsTest() + { + var sift = new Client(ApiKey); + var transaction = new Transaction + { + user_id = "test_dotnet_transaction_event", + amount = 100000000L, + currency_code = "EUR", + transaction_type = "$withdrawal", + transaction_status = "$failure", + payment_method = new PaymentMethod + { + payment_type = "$credit_card", + card_bin = "542486", + card_last4 = "4444", + card_bin_metadata = new CardBinMetadata + { + bank = "Chase", + brand = "VISA", + country = "US", + level = "Gold", + type = "CREDIT" + } + } + }; + + EventRequest eventRequest = new EventRequest() + { + Event = transaction + }; + EventResponse res = sift.SendAsync(eventRequest).Result; + Assert.Equal("0", res.Status.ToString()); + } } } diff --git a/Test.Integration.NetFx48/EventsAPI/Wagers.cs b/Test.Integration.NetFx48/EventsAPI/Wagers.cs index a9cff6db..013ded80 100644 --- a/Test.Integration.NetFx48/EventsAPI/Wagers.cs +++ b/Test.Integration.NetFx48/EventsAPI/Wagers.cs @@ -34,7 +34,12 @@ public void WagerTest() wager_type = "$parlay", wager_status = "$accept", amount = 5000, - currency_code = "USD", + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, minimum_wager_amount = 100L, wager_event_type = "NBA", wager_event_name = "Bulls-Lakers", diff --git a/Test.Integration.NetFx48/Test.Integration.NetFx48.csproj b/Test.Integration.NetFx48/Test.Integration.NetFx48.csproj index a59d6700..09932a96 100644 --- a/Test.Integration.NetFx48/Test.Integration.NetFx48.csproj +++ b/Test.Integration.NetFx48/Test.Integration.NetFx48.csproj @@ -10,9 +10,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/Test/Test.cs b/Test/Test.cs index 8d31f0b1..7e963394 100644 --- a/Test/Test.cs +++ b/Test/Test.cs @@ -55,7 +55,6 @@ public void TestEventRequest() end_time= 2038412903, price = 49900000, currency_code = "USD", - iata_carrier_code = "AS", quantity = 1, venue_id = "venue-123", event_id = "event-123", @@ -107,6 +106,7 @@ public void TestEventRequest() end_time = 2038412903, vessel_number = "LH454", fare_class = "Premium Economy", + iata_carrier_code = "AS", departure_airport_code = "SFO", arrival_airport_code = "LAS" } @@ -162,10 +162,10 @@ public void TestEventRequest() "\"$session_id\":\"sessionId\",\"$order_id\":\"oid\",\"$user_email\":\"bill@gmail.com\"," + "\"$amount\":1000000000000,\"$currency_code\":\"USD\",\"$billing_address\":{\"$name\":\"gary\",\"$city\":\"san francisco\"}," + "\"$bookings\":[{\"$booking_type\":\"$flight\",\"$title\":\"SFO - LAS, 2 Adults\",\"$start_time\":2038412903," + - "\"$end_time\":2038412903,\"$price\":49900000,\"$currency_code\":\"USD\",\"$iata_carrier_code\":\"AS\",\"$quantity\":1,\"$guests\":[{\"$name\":\"John Doe\"," + + "\"$end_time\":2038412903,\"$price\":49900000,\"$currency_code\":\"USD\",\"$quantity\":1,\"$guests\":[{\"$name\":\"John Doe\"," + "\"$email\":\"jdoe@domain.com\",\"$phone\":\"1-415-555-6040\",\"$loyalty_program\":\"skymiles\",\"$loyalty_program_id\":\"PSOV34DF\"," + "\"$birth_date\":\"1985-01-19\"},{\"$name\":\"John Doe\"}],\"$segments\":[{\"$start_time\":203841290300,\"$end_time\":2038412903," + - "\"$vessel_number\":\"LH454\",\"$departure_airport_code\":\"SFO\",\"$arrival_airport_code\":\"LAS\",\"$fare_class\":\"Premium Economy\"," + + "\"$vessel_number\":\"LH454\",\"$departure_airport_code\":\"SFO\",\"$arrival_airport_code\":\"LAS\",\"$fare_class\":\"Premium Economy\",\"$iata_carrier_code\":\"AS\"," + "\"$departure_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\"}," + "\"$arrival_address\":{\"$name\":\"Bill Jones\",\"$address_1\":\"2100 Main Street\",\"$address_2\":\"Apt 3B\",\"$city\":\"New London\"," + @@ -2763,7 +2763,12 @@ public void TestWagerEvent() wager_type = "$parlay", wager_status = "$accept", amount = 5000L, - currency_code = "USD", + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, wager_event_type = "NFL", wager_event_name = "Example Game", wager_event_id = "event456", @@ -2777,7 +2782,11 @@ public void TestWagerEvent() "\"$wager_type\":\"$parlay\"," + "\"$wager_status\":\"$accept\"," + "\"$amount\":5000," + - "\"$currency_code\":\"USD\"," + + "\"$currency_code\":\"EUR\"," + + "\"$exchange_rate\":{" + + "\"$quote_currency_code\":\"USD\"," + + "\"$rate\":1.14" + + "}," + "\"$wager_event_type\":\"NFL\"," + "\"$wager_event_name\":\"Example Game\"," + "\"$wager_event_id\":\"event456\"," + @@ -2801,6 +2810,151 @@ public void TestWagerEvent() Assert.Equal("https://api.sift.com/v205/events?abuse_types=legacy,payment_abuse&return_score=true", Uri.UnescapeDataString(eventRequest.Request.RequestUri!.ToString())); } + + [Fact] + public void TestTransactionEventWithExchangeRate() + { + //Please provide the valid session id in place of 'sessionId' + var sessionId = "sessionId"; + var transaction = new Transaction + { + user_id = "test_dotnet_transaction_event", + amount = 100000000L, + currency_code = "EUR", + session_id = sessionId, + transaction_type = "$deposit", + transaction_status = "$failure", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + }, + }; + + Assert.Equal("{" + + "\"$type\":\"$transaction\"," + + "\"$user_id\":\"test_dotnet_transaction_event\"," + + "\"$session_id\":\"sessionId\"," + + "\"$transaction_type\":\"$deposit\"," + + "\"$transaction_status\":\"$failure\"," + + "\"$amount\":100000000," + + "\"$currency_code\":\"EUR\"," + + "\"$exchange_rate\":{" + + "\"$quote_currency_code\":\"USD\"," + + "\"$rate\":1.14" + + "}" + + "}", transaction.ToJson()); + + EventRequest eventRequest = new EventRequest + { + Event = transaction + }; + + Assert.Equal("https://api.sift.com/v205/events", eventRequest.Request.RequestUri!.ToString()); + + eventRequest = new EventRequest + { + Event = transaction, + AbuseTypes = { "legacy", "payment_abuse" }, + ReturnScore = true + }; + + Assert.Equal("https://api.sift.com/v205/events?abuse_types=legacy,payment_abuse&return_score=true", + Uri.UnescapeDataString(eventRequest.Request.RequestUri!.ToString())); + } + + [Fact] + public void TestCreateOrderWithExchangeRate() + { + //Please provide the valid session id in place of 'sessionId' + var sessionId = "sessionId"; + var createOrder = new CreateOrder + { + user_id = "test_dotnet_order_with_all_exchange_rate_fields", + order_id = "oid", + amount = 1000000000000L, + currency_code = "EUR", + session_id = sessionId, + user_email = "bill@gmail.com", + bookings = new ObservableCollection() + { + new Booking() + { + booking_type = "$flight", + title = "SFO - LAS, 2 Adults", + start_time= 2038412903, + end_time= 2038412903, + price = 49900000, + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + } + } + }, + promotions = new ObservableCollection() + { + new Promotion() + { + discount = new Discount() + { + percentage_off = 0.2, + amount = 5000000, + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + } + } + } + }, + items = new ObservableCollection() + { + new Item() + { + item_id = "12344321", + price = 4990000, + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + } + } + }, + }; + + // Augment with custom fields + Assert.Equal("{\"$type\":\"$create_order\",\"$user_id\":\"test_dotnet_order_with_all_exchange_rate_fields\"," + + "\"$session_id\":\"sessionId\",\"$order_id\":\"oid\",\"$user_email\":\"bill@gmail.com\",\"$amount\":1000000000000," + + "\"$currency_code\":\"EUR\",\"$items\":[{\"$item_id\":\"12344321\",\"$price\":4990000,\"$currency_code\":\"EUR\"," + + "\"$exchange_rate\":{\"$quote_currency_code\":\"USD\",\"$rate\":1.14}}],\"$bookings\":[{\"$booking_type\":\"$flight\"," + + "\"$title\":\"SFO - LAS, 2 Adults\",\"$start_time\":2038412903,\"$end_time\":2038412903,\"$price\":49900000," + + "\"$currency_code\":\"EUR\",\"$exchange_rate\":{\"$quote_currency_code\":\"USD\",\"$rate\":1.14}}],\"$promotions\":" + + "[{\"$discount\":{\"$percentage_off\":0.2,\"$amount\":5000000,\"$currency_code\":\"EUR\",\"$exchange_rate\":" + + "{\"$quote_currency_code\":\"USD\",\"$rate\":1.14}}}]}", createOrder.ToJson()); + + + EventRequest eventRequest = new EventRequest + { + Event = createOrder + }; + + Assert.Equal("https://api.sift.com/v205/events", eventRequest.Request.RequestUri!.ToString()); + + eventRequest = new EventRequest + { + Event = createOrder, + AbuseTypes = { "legacy", "payment_abuse" }, + ReturnScore = true, + ReturnRouteInfo = true + }; + + Assert.Equal("https://api.sift.com/v205/events?abuse_types=legacy,payment_abuse&return_score=true&return_route_info=true", + Uri.UnescapeDataString(eventRequest.Request.RequestUri!.ToString())); + } } } diff --git a/Test/Test.csproj b/Test/Test.csproj index 97ca3c29..156d9bb3 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -1,15 +1,18 @@ - net7.0 + net8.0 enable enable - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + From fb76ed154d01ead8cb9b0dbb6ad295fbf003abe9 Mon Sep 17 00:00:00 2001 From: vilnytskyi Date: Sat, 18 Oct 2025 15:09:44 +0200 Subject: [PATCH 2/9] updated tests --- Sift.sln | 2 +- .../DecisionsAPI/DecisionsRequests.cs | 4 ++-- .../EventsAPI/Account.cs | 19 +++++++++++++++++-- .../EventsAPI/Cart.cs | 4 ++-- .../EventsAPI/Chargebacks.cs | 4 ++-- .../EventsAPI/Contents.cs | 4 ++-- .../EventsAPI/LoginLogout.cs | 4 ++-- .../EventsAPI/Notifications.cs | 4 ++-- .../EventsAPI/Order.cs | 4 ++-- .../EventsAPI/Passwords.cs | 4 ++-- .../EventsAPI/Promotions.cs | 4 ++-- .../EventsAPI/Sessions.cs | 4 ++-- .../EventsAPI/Transactions.cs | 4 ++-- .../EventsAPI/Verifications.cs | 4 ++-- .../EventsAPI/Wagers.cs | 4 ++-- .../LabelsAPI/Labels.cs | 4 ++-- .../MerchantRequests.cs | 4 ++-- .../ScoreAPI/Scores.cs | 4 ++-- .../Test.Integration.Net.csproj | 3 +++ .../Uitlities/EnvironmentVariable.cs | 11 ++++++----- .../VerificationAPI/VerificationsRequests.cs | 4 ++-- .../local.settings.json | 0 .../xunit.runner.json | 0 Test.Integration.NetFx48/EventsAPI/Account.cs | 15 +++++++++++++++ build.cake | 8 ++++---- 25 files changed, 80 insertions(+), 46 deletions(-) rename {Test.Integration.Net7 => Test.Integration.Net}/DecisionsAPI/DecisionsRequests.cs (98%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Account.cs (92%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Cart.cs (98%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Chargebacks.cs (96%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Contents.cs (99%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/LoginLogout.cs (97%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Notifications.cs (95%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Order.cs (99%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Passwords.cs (95%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Promotions.cs (97%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Sessions.cs (92%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Transactions.cs (99%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Verifications.cs (95%) rename {Test.Integration.Net7 => Test.Integration.Net}/EventsAPI/Wagers.cs (95%) rename {Test.Integration.Net7 => Test.Integration.Net}/LabelsAPI/Labels.cs (94%) rename {Test.Integration.Net7 => Test.Integration.Net}/PSPMerchantManagementAPI/MerchantRequests.cs (98%) rename {Test.Integration.Net7 => Test.Integration.Net}/ScoreAPI/Scores.cs (94%) rename Test.Integration.Net7/Test.Integration.Net7.csproj => Test.Integration.Net/Test.Integration.Net.csproj (87%) rename {Test.Integration.Net7 => Test.Integration.Net}/Uitlities/EnvironmentVariable.cs (93%) rename {Test.Integration.Net7 => Test.Integration.Net}/VerificationAPI/VerificationsRequests.cs (96%) rename {Test.Integration.Net7 => Test.Integration.Net}/local.settings.json (100%) rename {Test.Integration.Net7 => Test.Integration.Net}/xunit.runner.json (100%) diff --git a/Sift.sln b/Sift.sln index ffb84480..0807b02e 100644 --- a/Sift.sln +++ b/Sift.sln @@ -6,7 +6,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sift", "Sift\Sift.csproj", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test", "Test\Test.csproj", "{E34BBAD1-9AAC-4120-92C9-3574CCFAF01D}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test.Integration.Net7", "Test.Integration.Net7\Test.Integration.Net7.csproj", "{C3E39BBC-D51F-4230-979B-AA2E5597ECD8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test.Integration.Net", "Test.Integration.Net\Test.Integration.Net.csproj", "{C3E39BBC-D51F-4230-979B-AA2E5597ECD8}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test.Integration.NetFx48", "Test.Integration.NetFx48\Test.Integration.NetFx48.csproj", "{B5A60307-AAE2-4D1B-B3B6-95440A0F6381}" EndProject diff --git a/Test.Integration.Net7/DecisionsAPI/DecisionsRequests.cs b/Test.Integration.Net/DecisionsAPI/DecisionsRequests.cs similarity index 98% rename from Test.Integration.Net7/DecisionsAPI/DecisionsRequests.cs rename to Test.Integration.Net/DecisionsAPI/DecisionsRequests.cs index 9c462601..a694f2f6 100644 --- a/Test.Integration.Net7/DecisionsAPI/DecisionsRequests.cs +++ b/Test.Integration.Net/DecisionsAPI/DecisionsRequests.cs @@ -1,9 +1,9 @@ using Sift; using System; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.DecisionsAPI +namespace Test.Integration.Net.DecisionsAPI { public class DecisionsRequests { diff --git a/Test.Integration.Net7/EventsAPI/Account.cs b/Test.Integration.Net/EventsAPI/Account.cs similarity index 92% rename from Test.Integration.Net7/EventsAPI/Account.cs rename to Test.Integration.Net/EventsAPI/Account.cs index 6fb4681e..039ad8db 100644 --- a/Test.Integration.Net7/EventsAPI/Account.cs +++ b/Test.Integration.Net/EventsAPI/Account.cs @@ -1,9 +1,9 @@ using Sift; using System.Collections.ObjectModel; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Account { @@ -174,6 +174,21 @@ public void UpdateAccount() country = "US", zipcode = "03257" }, + promotions = new ObservableCollection() + { + new Promotion() + { + promotion_id = "UpdatedPromotion", + status = "$success", + description = "$10 off updated account", + discount = new Discount() + { + amount = 10000000, + currency_code = "USD", + minimum_purchase_amount = 50000000 + } + } + }, social_sign_on_type = "$twitter", browser = new Browser { diff --git a/Test.Integration.Net7/EventsAPI/Cart.cs b/Test.Integration.Net/EventsAPI/Cart.cs similarity index 98% rename from Test.Integration.Net7/EventsAPI/Cart.cs rename to Test.Integration.Net/EventsAPI/Cart.cs index 3a811241..881d173a 100644 --- a/Test.Integration.Net7/EventsAPI/Cart.cs +++ b/Test.Integration.Net/EventsAPI/Cart.cs @@ -1,9 +1,9 @@ using Sift; using System.Collections.ObjectModel; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Cart { diff --git a/Test.Integration.Net7/EventsAPI/Chargebacks.cs b/Test.Integration.Net/EventsAPI/Chargebacks.cs similarity index 96% rename from Test.Integration.Net7/EventsAPI/Chargebacks.cs rename to Test.Integration.Net/EventsAPI/Chargebacks.cs index 35199b77..50f29c97 100644 --- a/Test.Integration.Net7/EventsAPI/Chargebacks.cs +++ b/Test.Integration.Net/EventsAPI/Chargebacks.cs @@ -1,8 +1,8 @@ using Sift; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Chargebacks { diff --git a/Test.Integration.Net7/EventsAPI/Contents.cs b/Test.Integration.Net/EventsAPI/Contents.cs similarity index 99% rename from Test.Integration.Net7/EventsAPI/Contents.cs rename to Test.Integration.Net/EventsAPI/Contents.cs index afc75311..aadc4c3a 100644 --- a/Test.Integration.Net7/EventsAPI/Contents.cs +++ b/Test.Integration.Net/EventsAPI/Contents.cs @@ -1,10 +1,10 @@ using Sift; using System; using System.Collections.ObjectModel; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Contents { diff --git a/Test.Integration.Net7/EventsAPI/LoginLogout.cs b/Test.Integration.Net/EventsAPI/LoginLogout.cs similarity index 97% rename from Test.Integration.Net7/EventsAPI/LoginLogout.cs rename to Test.Integration.Net/EventsAPI/LoginLogout.cs index deecda51..99bcdfa8 100644 --- a/Test.Integration.Net7/EventsAPI/LoginLogout.cs +++ b/Test.Integration.Net/EventsAPI/LoginLogout.cs @@ -1,9 +1,9 @@ using Sift; using System.Collections.ObjectModel; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class LoginLogout { diff --git a/Test.Integration.Net7/EventsAPI/Notifications.cs b/Test.Integration.Net/EventsAPI/Notifications.cs similarity index 95% rename from Test.Integration.Net7/EventsAPI/Notifications.cs rename to Test.Integration.Net/EventsAPI/Notifications.cs index 8b6a904d..fa368208 100644 --- a/Test.Integration.Net7/EventsAPI/Notifications.cs +++ b/Test.Integration.Net/EventsAPI/Notifications.cs @@ -1,8 +1,8 @@ using Sift; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Notifications { diff --git a/Test.Integration.Net7/EventsAPI/Order.cs b/Test.Integration.Net/EventsAPI/Order.cs similarity index 99% rename from Test.Integration.Net7/EventsAPI/Order.cs rename to Test.Integration.Net/EventsAPI/Order.cs index 6d71395c..338ec6bc 100644 --- a/Test.Integration.Net7/EventsAPI/Order.cs +++ b/Test.Integration.Net/EventsAPI/Order.cs @@ -1,10 +1,10 @@ using Sift; using System; using System.Collections.ObjectModel; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Order { diff --git a/Test.Integration.Net7/EventsAPI/Passwords.cs b/Test.Integration.Net/EventsAPI/Passwords.cs similarity index 95% rename from Test.Integration.Net7/EventsAPI/Passwords.cs rename to Test.Integration.Net/EventsAPI/Passwords.cs index 803c6d65..f73651b5 100644 --- a/Test.Integration.Net7/EventsAPI/Passwords.cs +++ b/Test.Integration.Net/EventsAPI/Passwords.cs @@ -1,8 +1,8 @@ using Sift; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Passwords { diff --git a/Test.Integration.Net7/EventsAPI/Promotions.cs b/Test.Integration.Net/EventsAPI/Promotions.cs similarity index 97% rename from Test.Integration.Net7/EventsAPI/Promotions.cs rename to Test.Integration.Net/EventsAPI/Promotions.cs index ca171f7e..c8305088 100644 --- a/Test.Integration.Net7/EventsAPI/Promotions.cs +++ b/Test.Integration.Net/EventsAPI/Promotions.cs @@ -1,9 +1,9 @@ using Sift; using System.Collections.ObjectModel; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Promotions { diff --git a/Test.Integration.Net7/EventsAPI/Sessions.cs b/Test.Integration.Net/EventsAPI/Sessions.cs similarity index 92% rename from Test.Integration.Net7/EventsAPI/Sessions.cs rename to Test.Integration.Net/EventsAPI/Sessions.cs index 7480fb09..b2facf99 100644 --- a/Test.Integration.Net7/EventsAPI/Sessions.cs +++ b/Test.Integration.Net/EventsAPI/Sessions.cs @@ -1,8 +1,8 @@ using Sift; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Sessions { diff --git a/Test.Integration.Net7/EventsAPI/Transactions.cs b/Test.Integration.Net/EventsAPI/Transactions.cs similarity index 99% rename from Test.Integration.Net7/EventsAPI/Transactions.cs rename to Test.Integration.Net/EventsAPI/Transactions.cs index 3719e07e..9dc52463 100644 --- a/Test.Integration.Net7/EventsAPI/Transactions.cs +++ b/Test.Integration.Net/EventsAPI/Transactions.cs @@ -2,10 +2,10 @@ using System; using System.Collections.ObjectModel; using System.Diagnostics; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Transactions { diff --git a/Test.Integration.Net7/EventsAPI/Verifications.cs b/Test.Integration.Net/EventsAPI/Verifications.cs similarity index 95% rename from Test.Integration.Net7/EventsAPI/Verifications.cs rename to Test.Integration.Net/EventsAPI/Verifications.cs index f5a6cb70..030cc19a 100644 --- a/Test.Integration.Net7/EventsAPI/Verifications.cs +++ b/Test.Integration.Net/EventsAPI/Verifications.cs @@ -1,8 +1,8 @@ using Sift; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Verifications { diff --git a/Test.Integration.Net7/EventsAPI/Wagers.cs b/Test.Integration.Net/EventsAPI/Wagers.cs similarity index 95% rename from Test.Integration.Net7/EventsAPI/Wagers.cs rename to Test.Integration.Net/EventsAPI/Wagers.cs index 56cb0f3d..e0d9f3a4 100644 --- a/Test.Integration.Net7/EventsAPI/Wagers.cs +++ b/Test.Integration.Net/EventsAPI/Wagers.cs @@ -1,10 +1,10 @@ using Sift; using System; using System.Diagnostics; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.EventsAPI +namespace Test.Integration.Net.EventsAPI { public class Wagers { diff --git a/Test.Integration.Net7/LabelsAPI/Labels.cs b/Test.Integration.Net/LabelsAPI/Labels.cs similarity index 94% rename from Test.Integration.Net7/LabelsAPI/Labels.cs rename to Test.Integration.Net/LabelsAPI/Labels.cs index 6ce26545..57b575c4 100644 --- a/Test.Integration.Net7/LabelsAPI/Labels.cs +++ b/Test.Integration.Net/LabelsAPI/Labels.cs @@ -1,8 +1,8 @@ using Sift; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.LabelsAPI +namespace Test.Integration.Net.LabelsAPI { public class Labels { diff --git a/Test.Integration.Net7/PSPMerchantManagementAPI/MerchantRequests.cs b/Test.Integration.Net/PSPMerchantManagementAPI/MerchantRequests.cs similarity index 98% rename from Test.Integration.Net7/PSPMerchantManagementAPI/MerchantRequests.cs rename to Test.Integration.Net/PSPMerchantManagementAPI/MerchantRequests.cs index b5c5734b..a1a208aa 100644 --- a/Test.Integration.Net7/PSPMerchantManagementAPI/MerchantRequests.cs +++ b/Test.Integration.Net/PSPMerchantManagementAPI/MerchantRequests.cs @@ -1,9 +1,9 @@ using Sift; using System; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.PSPMerchantManagementAPI +namespace Test.Integration.Net.PSPMerchantManagementAPI { public class MerchantRequests { diff --git a/Test.Integration.Net7/ScoreAPI/Scores.cs b/Test.Integration.Net/ScoreAPI/Scores.cs similarity index 94% rename from Test.Integration.Net7/ScoreAPI/Scores.cs rename to Test.Integration.Net/ScoreAPI/Scores.cs index bc5cdae9..ee30bf41 100644 --- a/Test.Integration.Net7/ScoreAPI/Scores.cs +++ b/Test.Integration.Net/ScoreAPI/Scores.cs @@ -1,9 +1,9 @@ using Sift; using System.Collections.Generic; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.ScoreAPI +namespace Test.Integration.Net.ScoreAPI { public class Scores { diff --git a/Test.Integration.Net7/Test.Integration.Net7.csproj b/Test.Integration.Net/Test.Integration.Net.csproj similarity index 87% rename from Test.Integration.Net7/Test.Integration.Net7.csproj rename to Test.Integration.Net/Test.Integration.Net.csproj index 15039677..ea662136 100644 --- a/Test.Integration.Net7/Test.Integration.Net7.csproj +++ b/Test.Integration.Net/Test.Integration.Net.csproj @@ -4,9 +4,12 @@ net8.0 false + + latest + diff --git a/Test.Integration.Net7/Uitlities/EnvironmentVariable.cs b/Test.Integration.Net/Uitlities/EnvironmentVariable.cs similarity index 93% rename from Test.Integration.Net7/Uitlities/EnvironmentVariable.cs rename to Test.Integration.Net/Uitlities/EnvironmentVariable.cs index c7a0f633..091c2b8a 100644 --- a/Test.Integration.Net7/Uitlities/EnvironmentVariable.cs +++ b/Test.Integration.Net/Uitlities/EnvironmentVariable.cs @@ -2,7 +2,7 @@ using System; using System.IO; -namespace Test.Integration.Net7.Uitlities +namespace Test.Integration.Net.Uitlities { internal class EnvironmentVariable { @@ -10,9 +10,10 @@ internal class EnvironmentVariable public EnvironmentVariable() { - var builder = new ConfigurationBuilder() + var builder = new ConfigurationManager() .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("local.settings.json", optional: true, reloadOnChange: true); + .AddJsonFile("local.settings.json", optional: true, reloadOnChange: true) + .AddEnvironmentVariables(); configuration = builder.Build(); } @@ -20,7 +21,7 @@ public string ApiKey { get { - var envAPI_KEY = Environment.GetEnvironmentVariable("API_KEY"); + var envAPI_KEY = configuration["API_KEY"] ?? configuration["Values:ApiKey"]; if (string.IsNullOrEmpty(envAPI_KEY)) { throw new Exception("Specify API Key"); @@ -32,7 +33,7 @@ public string AccountId { get { - var envACCOUNT_ID = Environment.GetEnvironmentVariable("ACCOUNT_ID"); + var envACCOUNT_ID = configuration["ACCOUNT_ID"] ?? configuration["Values:AccountId"]; if (string.IsNullOrEmpty(envACCOUNT_ID)) { throw new Exception("Specify ACCOUNT ID"); diff --git a/Test.Integration.Net7/VerificationAPI/VerificationsRequests.cs b/Test.Integration.Net/VerificationAPI/VerificationsRequests.cs similarity index 96% rename from Test.Integration.Net7/VerificationAPI/VerificationsRequests.cs rename to Test.Integration.Net/VerificationAPI/VerificationsRequests.cs index d7703b29..7c1d70ec 100644 --- a/Test.Integration.Net7/VerificationAPI/VerificationsRequests.cs +++ b/Test.Integration.Net/VerificationAPI/VerificationsRequests.cs @@ -1,9 +1,9 @@ using Sift; using System; -using Test.Integration.Net7.Uitlities; +using Test.Integration.Net.Uitlities; using Xunit; -namespace Test.Integration.Net7.VerificationAPI +namespace Test.Integration.Net.VerificationAPI { public class VerificationsRequests { diff --git a/Test.Integration.Net7/local.settings.json b/Test.Integration.Net/local.settings.json similarity index 100% rename from Test.Integration.Net7/local.settings.json rename to Test.Integration.Net/local.settings.json diff --git a/Test.Integration.Net7/xunit.runner.json b/Test.Integration.Net/xunit.runner.json similarity index 100% rename from Test.Integration.Net7/xunit.runner.json rename to Test.Integration.Net/xunit.runner.json diff --git a/Test.Integration.NetFx48/EventsAPI/Account.cs b/Test.Integration.NetFx48/EventsAPI/Account.cs index ee9a14ce..6cea242c 100644 --- a/Test.Integration.NetFx48/EventsAPI/Account.cs +++ b/Test.Integration.NetFx48/EventsAPI/Account.cs @@ -176,6 +176,21 @@ public void UpdateAccount() country = "US", zipcode = "03257" }, + promotions = new ObservableCollection() + { + new Promotion() + { + promotion_id = "UpdatedPromotion", + status = "$success", + description = "$10 off updated account", + discount = new Discount() + { + amount = 10000000, + currency_code = "USD", + minimum_purchase_amount = 50000000 + } + } + }, social_sign_on_type = "$twitter", browser = new Browser { diff --git a/build.cake b/build.cake index 45626c33..65ab8124 100644 --- a/build.cake +++ b/build.cake @@ -4,7 +4,7 @@ var ARTIFACTS_DIR = "./artifacts/"; var SOLUTION = "./Sift.sln"; var SIFT = "./Sift/Sift.csproj"; var TEST = "./Test/Test.csproj"; -var TEST_NET7 = "./Test.Integration.Net7/Test.Integration.Net7.csproj"; +var TEST_NET = "./Test.Integration.Net/Test.Integration.Net.csproj"; Task("clean") .Does(() => @@ -36,13 +36,13 @@ Task("build") Task("test") .Does(() => DotNetCoreTest(TEST)); -Task("testNet7") +Task("testNet") .Does(() => { var testFilter = Argument("filter", ""); if (string.IsNullOrEmpty(testFilter)) { - DotNetCoreTest(TEST_NET7); + DotNetCoreTest(TEST_NET); } else { @@ -50,7 +50,7 @@ Task("testNet7") { ArgumentCustomization = args => args.Append("--filter=" + testFilter) }; - DotNetCoreTest(TEST_NET7, settings); + DotNetCoreTest(TEST_NET, settings); } }); From b39c4fa576075c38ca3c1e582d8d81d53ab33cb7 Mon Sep 17 00:00:00 2001 From: vilnytskyi Date: Wed, 22 Oct 2025 15:40:56 +0200 Subject: [PATCH 3/9] Updated tests --- CHANGELOG.md | 95 ++++++++++++++++++- Sift/Schema/ComplexTypes/guest.json | 6 ++ Test.Integration.Net/EventsAPI/Account.cs | 13 +++ Test.Integration.NetFx48/EventsAPI/Account.cs | 13 +++ Test/Test.cs | 6 +- 5 files changed, 126 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 865c168d..6ce3f006 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.6.0] - 2025-01-XX +## [1.6.0] - 2025-10-18 + +### Summary + +This release brings the sift-dotnet SDK into full compliance with Sift API v205 specifications, including critical updates for multi-currency support, enhanced fraud detection capabilities, and iGaming features. + +**Key Highlights:** +- 🔄 **Breaking Change**: `$iata_carrier_code` moved from `Booking` to `Segment` (see migration guide below) +- 💱 Multi-currency transaction support via `$exchange_rate` field +- 🎁 Account promotions tracking in `$update_account` events +- 💳 Enhanced payment method validation with `$card_bin_metadata` +- 🎰 Complete iGaming support with enhanced `$transaction` and `$wager` events +- ✅ Comprehensive test coverage across all new features ### Breaking Changes @@ -71,17 +83,34 @@ var booking = new Booking - Added `osx-arm64` runtime identifier - Native support for M1, M2, and M3 Mac processors +- **.NET 8.0 migration** + - Migrated integration tests from .NET 7 to .NET 8.0 + - Renamed `Test.Integration.Net7` project to `Test.Integration.Net` + - Maintains backward compatibility with .NET Framework 4.8 + #### Developer Experience - **JetBrains IDE support** - Added `.idea/` directory to `.gitignore` - Better IDE integration for Rider and IntelliJ users +#### Test Coverage Enhancements + +- **Comprehensive integration tests** across both .NET and .NET Framework 4.8: + - Added test coverage for `$promotions` field in `$update_account` event + - Enhanced `$transaction` event tests with deposit/withdrawal scenarios covering all new iGaming fields + - Complete test coverage for `$wager` event with all fields including `$exchange_rate` + - Validation tests for `$card_bin_metadata` in payment methods + - All new fields verified with end-to-end integration tests + ### Changed - **Booking model**: Removed deprecated `iata_carrier_code` property (see Breaking Changes) - **Segment model**: Added `iata_carrier_code` property - **UpdateAccount model**: Added `promotions` array property +- **Transaction model**: Enhanced with `$exchange_rate` support for multi-currency transactions +- **Wager model**: Added `$exchange_rate` field for currency conversion tracking +- **Test projects**: Renamed `Test.Integration.Net7` to `Test.Integration.Net` (targeting .NET 8.0) - **Package version**: Updated to 1.6.0 ### Deprecated @@ -119,11 +148,23 @@ The following JSON schema files were updated: - `segment.json` - Added `$iata_carrier_code` - `payment_method.json` - Added `$card_bin_metadata` +### Testing & Validation + +- ✅ All 51 unit tests passing +- ✅ Comprehensive integration test coverage across .NET 8.0 and .NET Framework 4.8 +- ✅ All new fields validated with end-to-end API integration tests +- ✅ Breaking changes verified with migration test scenarios +- ✅ Multi-currency exchange rate calculations validated +- ✅ iGaming transaction flows (deposits, withdrawals, wagers) fully tested + ### Notes This release brings the .NET SDK into full compliance with Sift API v205 specifications as of April 2025, including all reserved field updates from February through April 2025. -For complete migration guidance, see [IATA_CARRIER_CODE_MIGRATION_SUMMARY.md](IATA_CARRIER_CODE_MIGRATION_SUMMARY.md). +**Migration Support:** +- For complete `$iata_carrier_code` migration guidance, see [IATA_CARRIER_CODE_MIGRATION_SUMMARY.md](IATA_CARRIER_CODE_MIGRATION_SUMMARY.md) +- All changes are backward compatible except for the `$iata_carrier_code` field relocation +- Existing code using other fields will continue to work without modifications --- @@ -172,9 +213,53 @@ For earlier release notes, see [GitHub Releases](https://github.com/siftscience/ - Update any tests that reference `booking.iata_carrier_code` 4. **Optional: Leverage new features:** - - Use `exchange_rate` fields for multi-currency transactions - - Use `card_bin_metadata` for enhanced payment method tracking - - Use `promotions` in account update events + - **Multi-currency support**: Use `exchange_rate` fields in transactions, wagers, and orders + ```csharp + var transaction = new Transaction + { + amount = 100000000L, + currency_code = "EUR", + exchange_rate = new ExchangeRate + { + quote_currency_code = "USD", + rate = 1.14 + } + }; + ``` + - **Enhanced payment validation**: Use `card_bin_metadata` for detailed card information + ```csharp + payment_method = new PaymentMethod + { + card_bin = "542486", + card_bin_metadata = new CardBinMetadata + { + bank = "Chase", + brand = "VISA", + country = "US", + level = "Gold", + type = "CREDIT" + } + }; + ``` + - **Account promotions tracking**: Use `promotions` in `$update_account` events + ```csharp + var updateAccount = new UpdateAccount + { + promotions = new ObservableCollection() + { + new Promotion() + { + promotion_id = "SUMMER2025", + status = "$success", + discount = new Discount() + { + amount = 5000000, + currency_code = "USD" + } + } + } + }; + ``` ### Compatibility diff --git a/Sift/Schema/ComplexTypes/guest.json b/Sift/Schema/ComplexTypes/guest.json index 5635f52c..5997ccc0 100644 --- a/Sift/Schema/ComplexTypes/guest.json +++ b/Sift/Schema/ComplexTypes/guest.json @@ -20,6 +20,12 @@ }, "$birth_date": { "type": [ "string", "null" ] + }, + "$guest_user_id": { + "type": [ "string", "null" ] + }, + "$guest_booking_reference_id": { + "type": [ "string", "null" ] } } } diff --git a/Test.Integration.Net/EventsAPI/Account.cs b/Test.Integration.Net/EventsAPI/Account.cs index 039ad8db..5cb22c7a 100644 --- a/Test.Integration.Net/EventsAPI/Account.cs +++ b/Test.Integration.Net/EventsAPI/Account.cs @@ -32,6 +32,7 @@ public void CreateAccount() user_id = UserId, session_id = SessionId, user_email = UserEmail, + verification_phone_number = "+123456789012", name = "Bill Jones", phone = "1-415-555-6040", referrer_user_id = ReferrerUserId, @@ -88,6 +89,12 @@ public void CreateAccount() } }, social_sign_on_type = "$twitter", + app = new App + { + app_name = "MyTestApp", + app_version = "1.2.3", + client_language = "en-US" + }, browser = new 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", @@ -190,6 +197,12 @@ public void UpdateAccount() } }, social_sign_on_type = "$twitter", + app = new App + { + app_name = "MyTestApp", + app_version = "1.2.3", + client_language = "en-US" + }, browser = new 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", diff --git a/Test.Integration.NetFx48/EventsAPI/Account.cs b/Test.Integration.NetFx48/EventsAPI/Account.cs index 6cea242c..691cf1d4 100644 --- a/Test.Integration.NetFx48/EventsAPI/Account.cs +++ b/Test.Integration.NetFx48/EventsAPI/Account.cs @@ -34,6 +34,7 @@ public void CreateAccount() user_id = UserId, session_id = SessionId, user_email = UserEmail, + verification_phone_number = "+123456789012", name = "Bill Jones", phone = "1-415-555-6040", referrer_user_id = ReferrerUserId, @@ -90,6 +91,12 @@ public void CreateAccount() } }, social_sign_on_type = "$twitter", + app = new App + { + app_name = "MyTestApp", + app_version = "1.2.3", + client_language = "en-US" + }, browser = new 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", @@ -192,6 +199,12 @@ public void UpdateAccount() } }, social_sign_on_type = "$twitter", + app = new App + { + app_name = "MyTestApp", + app_version = "1.2.3", + client_language = "en-US" + }, browser = new 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", diff --git a/Test/Test.cs b/Test/Test.cs index 7e963394..2c519bb3 100644 --- a/Test/Test.cs +++ b/Test/Test.cs @@ -69,7 +69,9 @@ public void TestEventRequest() loyalty_program = "skymiles", loyalty_program_id = "PSOV34DF", phone = "1-415-555-6040", - email = "jdoe@domain.com" + email = "jdoe@domain.com", + guest_user_id = "johndoe_1985-01-19", + guest_booking_reference_id = "AO0999837df" }, new Guest() { @@ -164,7 +166,7 @@ public void TestEventRequest() "\"$bookings\":[{\"$booking_type\":\"$flight\",\"$title\":\"SFO - LAS, 2 Adults\",\"$start_time\":2038412903," + "\"$end_time\":2038412903,\"$price\":49900000,\"$currency_code\":\"USD\",\"$quantity\":1,\"$guests\":[{\"$name\":\"John Doe\"," + "\"$email\":\"jdoe@domain.com\",\"$phone\":\"1-415-555-6040\",\"$loyalty_program\":\"skymiles\",\"$loyalty_program_id\":\"PSOV34DF\"," + - "\"$birth_date\":\"1985-01-19\"},{\"$name\":\"John Doe\"}],\"$segments\":[{\"$start_time\":203841290300,\"$end_time\":2038412903," + + "\"$birth_date\":\"1985-01-19\",\"$guest_user_id\":\"johndoe_1985-01-19\",\"$guest_booking_reference_id\":\"AO0999837df\"},{\"$name\":\"John Doe\"}],\"$segments\":[{\"$start_time\":203841290300,\"$end_time\":2038412903," + "\"$vessel_number\":\"LH454\",\"$departure_airport_code\":\"SFO\",\"$arrival_airport_code\":\"LAS\",\"$fare_class\":\"Premium Economy\",\"$iata_carrier_code\":\"AS\"," + "\"$departure_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\"}," + From 48f6803c8e1767af4afabb19c43108587a807bf5 Mon Sep 17 00:00:00 2001 From: vilnytskyi Date: Wed, 22 Oct 2025 18:15:09 +0200 Subject: [PATCH 4/9] Updated changelog and workflow files --- .github/workflows/ci-workflow.yml | 46 ++--- .github/workflows/publishing2NuGet.yml | 12 +- CHANGELOG.md | 275 ------------------------- CHANGES.MD | 74 +++++++ README.md | 259 ++++++++++++++++------- Sift/Sift.csproj | 1 - 6 files changed, 287 insertions(+), 380 deletions(-) delete mode 100644 CHANGELOG.md create mode 100644 CHANGES.MD diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index e19da56e..b1f6b252 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -17,11 +17,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: - dotnet-version: 7.x.x + dotnet-version: 8.x.x - name: build run: | ./build.sh --target=restore @@ -33,30 +33,30 @@ jobs: runs-on: ubuntu-latest if: ${{ github.ref == 'refs/heads/master' }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: - dotnet-version: 7.x.x + dotnet-version: 8.x.x - name: siftDotNetIntegrationTest run: | ./build.sh --target=restore ./build.sh --target=generate ./build.sh --target=build - ./build.sh --target=testNet7 --filter=Account - ./build.sh --target=testNet7 --filter=Cart - ./build.sh --target=testNet7 --filter=Chargebacks - ./build.sh --target=testNet7 --filter=Contents - ./build.sh --target=testNet7 --filter=LoginLogout - ./build.sh --target=testNet7 --filter=Notifications - ./build.sh --target=testNet7 --filter=Order - ./build.sh --target=testNet7 --filter=Passwords - ./build.sh --target=testNet7 --filter=Promotions - ./build.sh --target=testNet7 --filter=Sessions - ./build.sh --target=testNet7 --filter=Transactions - ./build.sh --target=testNet7 --filter=Verifications - ./build.sh --target=testNet7 --filter=DecisionsRequests - ./build.sh --target=testNet7 --filter=Labels - ./build.sh --target=testNet7 --filter=MerchantRequests - ./build.sh --target=testNet7 --filter=Scores - ./build.sh --target=testNet7 --filter=VerificationsRequests + ./build.sh --target=testNet --filter=Account + ./build.sh --target=testNet --filter=Cart + ./build.sh --target=testNet --filter=Chargebacks + ./build.sh --target=testNet --filter=Contents + ./build.sh --target=testNet --filter=LoginLogout + ./build.sh --target=testNet --filter=Notifications + ./build.sh --target=testNet --filter=Order + ./build.sh --target=testNet --filter=Passwords + ./build.sh --target=testNet --filter=Promotions + ./build.sh --target=testNet --filter=Sessions + ./build.sh --target=testNet --filter=Transactions + ./build.sh --target=testNet --filter=Verifications + ./build.sh --target=testNet --filter=DecisionsRequests + ./build.sh --target=testNet --filter=Labels + ./build.sh --target=testNet --filter=MerchantRequests + ./build.sh --target=testNet --filter=Scores + ./build.sh --target=testNet --filter=VerificationsRequests diff --git a/.github/workflows/publishing2NuGet.yml b/.github/workflows/publishing2NuGet.yml index 91ecb2f8..f3765bc9 100644 --- a/.github/workflows/publishing2NuGet.yml +++ b/.github/workflows/publishing2NuGet.yml @@ -10,17 +10,15 @@ jobs: SOLUTION: 'Sift.sln' runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - name: Setup NuGet - uses: NuGet/setup-nuget@v1.0.5 + - uses: actions/checkout@v5 - name: Setup .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v5 with: - dotnet-version: 7.x.x + dotnet-version: 8.x.x - name: Build run: | - dotnet --info + dotnet --info echo $GITHUB_REF_NAME bash -x ./build.sh --target=pack - name: Publish - run: nuget push artifacts\Sift*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} + run: dotnet nuget push artifacts\Sift*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 6ce3f006..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,275 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [1.6.0] - 2025-10-18 - -### Summary - -This release brings the sift-dotnet SDK into full compliance with Sift API v205 specifications, including critical updates for multi-currency support, enhanced fraud detection capabilities, and iGaming features. - -**Key Highlights:** -- 🔄 **Breaking Change**: `$iata_carrier_code` moved from `Booking` to `Segment` (see migration guide below) -- 💱 Multi-currency transaction support via `$exchange_rate` field -- 🎁 Account promotions tracking in `$update_account` events -- 💳 Enhanced payment method validation with `$card_bin_metadata` -- 🎰 Complete iGaming support with enhanced `$transaction` and `$wager` events -- ✅ Comprehensive test coverage across all new features - -### Breaking Changes - -#### ⚠️ iata_carrier_code Migration (February 2025 API Change) - -The `$iata_carrier_code` field has been moved from the `Booking` complex type to the `Segment` complex type to properly represent IATA codes at the segment level for flights. - -**Migration Required:** - -```csharp -// BEFORE (v1.5.0 and earlier) - NO LONGER WORKS -var booking = new Booking -{ - iata_carrier_code = "AS", // ❌ This property no longer exists - segments = new ObservableCollection() - { - new Segment() { /* ... */ } - } -}; - -// AFTER (v1.6.0+) - REQUIRED -var booking = new Booking -{ - segments = new ObservableCollection() - { - new Segment() - { - iata_carrier_code = "AS", // ✅ Now at segment level - departure_airport_code = "SFO", - arrival_airport_code = "LAS", - /* ... */ - } - } -}; -``` - -**Why this change?** This aligns with Sift's API v205 specification where IATA carrier codes are specific to each flight segment, not the overall booking. - -### Added - -#### API Compliance Updates (February-April 2025) - -- **`$exchange_rate` field** (April 2025) - - Added to events: `$create_order`, `$update_order`, `$transaction`, `$wager` - - Added to complex types: `$booking`, `$item`, `$discount` - - Supports currency exchange rate tracking with quote currency and rate - -- **`$card_bin_metadata` field** (March 2025) - - Added to `$payment_method` complex type - - Provides detailed card BIN (Bank Identification Number) metadata - -- **`$promotions` field** (April 2025) - - Added to `$update_account` event - - Allows tracking promotion changes during account updates - -- **`$iata_carrier_code` field** (February 2025) - - Added to `Segment` complex type (for flight segments) - - Properly represents IATA airline codes at the segment level - -#### Platform Support - -- **Apple Silicon (ARM64) support** - - Added `osx-arm64` runtime identifier - - Native support for M1, M2, and M3 Mac processors - -- **.NET 8.0 migration** - - Migrated integration tests from .NET 7 to .NET 8.0 - - Renamed `Test.Integration.Net7` project to `Test.Integration.Net` - - Maintains backward compatibility with .NET Framework 4.8 - -#### Developer Experience - -- **JetBrains IDE support** - - Added `.idea/` directory to `.gitignore` - - Better IDE integration for Rider and IntelliJ users - -#### Test Coverage Enhancements - -- **Comprehensive integration tests** across both .NET and .NET Framework 4.8: - - Added test coverage for `$promotions` field in `$update_account` event - - Enhanced `$transaction` event tests with deposit/withdrawal scenarios covering all new iGaming fields - - Complete test coverage for `$wager` event with all fields including `$exchange_rate` - - Validation tests for `$card_bin_metadata` in payment methods - - All new fields verified with end-to-end integration tests - -### Changed - -- **Booking model**: Removed deprecated `iata_carrier_code` property (see Breaking Changes) -- **Segment model**: Added `iata_carrier_code` property -- **UpdateAccount model**: Added `promotions` array property -- **Transaction model**: Enhanced with `$exchange_rate` support for multi-currency transactions -- **Wager model**: Added `$exchange_rate` field for currency conversion tracking -- **Test projects**: Renamed `Test.Integration.Net7` to `Test.Integration.Net` (targeting .NET 8.0) -- **Package version**: Updated to 1.6.0 - -### Deprecated - -- **Booking.iata_carrier_code** (removed in v1.6.0) - - Deprecated in Sift API v205 (February 2025) - - Replaced by `Segment.iata_carrier_code` - -### Technical Details - -#### New Complex Types - -- **ExchangeRate** - - `quote_currency_code` (string): The currency code for the quote - - `rate` (double): The exchange rate value - -- **CardBinMetadata** - - Provides card BIN information for payment methods - -#### Schema Updates - -The following JSON schema files were updated: - -**Events:** -- `create_order.json` - Added `$exchange_rate` -- `update_order.json` - Added `$exchange_rate` -- `transaction.json` - Added `$exchange_rate` -- `wager.json` - Added `$exchange_rate` -- `update_account.json` - Added `$promotions` - -**Complex Types:** -- `booking.json` - Added `$exchange_rate`, removed `$iata_carrier_code` -- `item.json` - Added `$exchange_rate` -- `discount.json` - Added `$exchange_rate` -- `segment.json` - Added `$iata_carrier_code` -- `payment_method.json` - Added `$card_bin_metadata` - -### Testing & Validation - -- ✅ All 51 unit tests passing -- ✅ Comprehensive integration test coverage across .NET 8.0 and .NET Framework 4.8 -- ✅ All new fields validated with end-to-end API integration tests -- ✅ Breaking changes verified with migration test scenarios -- ✅ Multi-currency exchange rate calculations validated -- ✅ iGaming transaction flows (deposits, withdrawals, wagers) fully tested - -### Notes - -This release brings the .NET SDK into full compliance with Sift API v205 specifications as of April 2025, including all reserved field updates from February through April 2025. - -**Migration Support:** -- For complete `$iata_carrier_code` migration guidance, see [IATA_CARRIER_CODE_MIGRATION_SUMMARY.md](IATA_CARRIER_CODE_MIGRATION_SUMMARY.md) -- All changes are backward compatible except for the `$iata_carrier_code` field relocation -- Existing code using other fields will continue to work without modifications - ---- - -## [1.5.0] - 2024-XX-XX - -### Added -- iGaming Events API support -- Additional reserved fields for gaming/wagering use cases - -### Changed -- Updated API version compatibility - ---- - -## [1.4.0] - 2023-XX-XX - -### Added -- Support for complex fields in events -- Enhanced event validation - ---- - -## Earlier Releases - -For earlier release notes, see [GitHub Releases](https://github.com/siftscience/sift-dotnet/releases). - ---- - -## Upgrade Guide - -### From 1.5.x to 1.6.0 - -1. **Update package reference:** - ```xml - - ``` - -2. **Update iata_carrier_code usage** (if applicable): - - Find all instances of `booking.iata_carrier_code` - - Move to `segment.iata_carrier_code` within the segments array - - See Breaking Changes section above for code examples - -3. **Verify builds and tests:** - - Rebuild your project - - Run all tests, especially those involving flight bookings - - Update any tests that reference `booking.iata_carrier_code` - -4. **Optional: Leverage new features:** - - **Multi-currency support**: Use `exchange_rate` fields in transactions, wagers, and orders - ```csharp - var transaction = new Transaction - { - amount = 100000000L, - currency_code = "EUR", - exchange_rate = new ExchangeRate - { - quote_currency_code = "USD", - rate = 1.14 - } - }; - ``` - - **Enhanced payment validation**: Use `card_bin_metadata` for detailed card information - ```csharp - payment_method = new PaymentMethod - { - card_bin = "542486", - card_bin_metadata = new CardBinMetadata - { - bank = "Chase", - brand = "VISA", - country = "US", - level = "Gold", - type = "CREDIT" - } - }; - ``` - - **Account promotions tracking**: Use `promotions` in `$update_account` events - ```csharp - var updateAccount = new UpdateAccount - { - promotions = new ObservableCollection() - { - new Promotion() - { - promotion_id = "SUMMER2025", - status = "$success", - discount = new Discount() - { - amount = 5000000, - currency_code = "USD" - } - } - } - }; - ``` - -### Compatibility - -- ✅ Compatible with Sift API v205 -- ✅ .NET Standard 2.0 -- ✅ Supports .NET Framework 4.6.1+, .NET Core 2.0+, .NET 5.0+ -- ✅ Native Apple Silicon (M1/M2/M3) support - ---- - -[1.6.0]: https://github.com/siftscience/sift-dotnet/compare/v1.5.0...v1.6.0 -[1.5.0]: https://github.com/siftscience/sift-dotnet/compare/v1.4.0...v1.5.0 -[1.4.0]: https://github.com/siftscience/sift-dotnet/releases/tag/v1.4.0 diff --git a/CHANGES.MD b/CHANGES.MD new file mode 100644 index 00000000..c2290c77 --- /dev/null +++ b/CHANGES.MD @@ -0,0 +1,74 @@ +# CHANGES + +## 1.6.0 (2025-10-18) + +### NuGet Package Updates +- Bumped `Newtonsoft.Json` from `13.0.2` to `13.0.4` +- Bumped `System.ComponentModel.Annotations` from `4.5.0` to `5.0.0` + +### Breaking Changes +- **`$iata_carrier_code`** moved from `Booking` to `Segment` complex type (API v205 compliance) + +### Added +- **`$exchange_rate`** field support in `$create_order`, `$update_order`, `$transaction`, `$wager` events and `$booking`, `$item`, `$discount` complex types +- **`$card_bin_metadata`** field in `$payment_method` complex type +- **`$promotions`** field in `$update_account` event +- **`$iata_carrier_code`** field in `Segment` complex type +- Apple Silicon (ARM64) native support (`osx-arm64` runtime) +- .NET 8.0 support (migrated integration tests from .NET 7) +- Comprehensive integration test coverage for all new fields + +### Changed +- Renamed `Test.Integration.Net7` to `Test.Integration.Net` (targeting .NET 8.0) + +## 1.5.0 (2024-12-24) + +### Added +- iGaming Events API support +- New event type `$wager` +- Extra fields for `$deposit` and `$withdrawal` Transactions + +## 1.4.0 (2024-09-27) + +### Added +- Support for `$iata_carrier_code` field in `$booking` complex field + +## 1.3.0 (2024-06-18) + +### Added +- Warnings to Event Response + +## 1.2.0 (2023-12-22) + +### Fixed +- PSP Merchants API fixes + +## 1.1.0 (2023-10-20) + +### Added +- Score percentiles support in Score API + +## 1.0.0 (2023-09-01) + +### Changed +- Updates in Verification API (breaking changes - see README for examples) + +## 0.13.0 (2023-08-31) + +### Added +- Initial public release + +## 0.12.0 (2023-08-28) + +### Added +- Pre-release features + +## 0.11.0-beta (2023-02-10) + +### Added +- Beta release + +## 0.10.1-beta (2022-12-05) + +### Added +- Beta release diff --git a/README.md b/README.md index bdc7efe5..8e4478ba 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,43 @@ 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 + +See [CHANGES.MD](CHANGES.MD) for full release history. + ## Documentation +### Breaking Change in v1.6.0 + +**`$iata_carrier_code` field relocation**: The `$iata_carrier_code` field has been moved from the `Booking` complex type to the `Segment` complex type to align with Sift API v205 specification. + +```csharp +// BEFORE v1.6.0 - NO LONGER WORKS +var booking = new Booking +{ + iata_carrier_code = "AS", // ❌ This property no longer exists + segments = new ObservableCollection() { /* ... */ } +}; + +// v1.6.0+ - REQUIRED +var booking = new Booking +{ + segments = new ObservableCollection() + { + new Segment() + { + iata_carrier_code = "AS", // ✅ Now at segment level + departure_airport_code = "SFO", + arrival_airport_code = "LAS" + } + } +}; +``` + ### Initialization // You can also pass in your own HttpClient implementation as the second parameter. @@ -675,74 +710,92 @@ The official Sift .NET client, supporting .NET Standard 2.0+ // Construct reserved events with known fields Transaction var transaction = new Transaction { - "$user_id" : "billy_jones_301", - "$amount" : 506790000, - "$currency_code" : "USD", - "$user_email" : "billjones1@example.com", - "$verification_phone_number" : "+123456789012", - "$transaction_type" : "$sale", - "$transaction_status" : "$failure", - "$decline_category" : "$bank_decline", - "$order_id" : "ORDER-123124124", - "$transaction_id" : "719637215", - "$ip" : "54.208.214.78", - "$billing_address" : { - "$name" : "Bill Jones", - "$phone" : "1-415-555-6041", - "$address_1" : "2100 Main Street", - "$address_2" : "Apt 3B", - "$city" : "New London", - "$region" : "New Hampshire", - "$country" : "US", - "$zipcode" : "03257" + user_id = "billy_jones_301", + amount = 506790000, + currency_code = "EUR", + exchange_rate = new ExchangeRate // NEW in v1.6.0: Multi-currency support + { + quote_currency_code = "USD", + rate = 1.14 }, - "$brand_name" : "sift", - "$site_domain" : "sift.com", - "$site_country" : "US", - "$ordered_from" : { - "$store_id" : "123", - "$store_address" : { - "$name" : "Bill Jones", - "$phone" : "1-415-555-6040", - "$address_1" : "2100 Main Street", - "$address_2" : "Apt 3B", - "$city" : "New London", - "$region" : "New Hampshire", - "$country" : "US", - "$zipcode" : "03257" + user_email = "billjones1@example.com", + verification_phone_number = "+123456789012", + transaction_type = "$sale", + transaction_status = "$failure", + decline_category = "$bank_decline", + order_id = "ORDER-123124124", + transaction_id = "719637215", + billing_address = new Address() + { + name = "Bill Jones", + phone = "1-415-555-6041", + address_1 = "2100 Main Street", + address_2 = "Apt 3B", + city = "New London", + region = "New Hampshire", + country = "US", + zipcode = "03257" + }, + brand_name = "sift", + site_domain = "sift.com", + site_country = "US", + ordered_from = new OrderedFrom() + { + store_id = "123", + store_address = new Address() + { + name = "Bill Jones", + phone = "1-415-555-6040", + address_1 = "2100 Main Street", + address_2 = "Apt 3B", + city = "New London", + region = "New Hampshire", + country = "US", + zipcode = "03257" } }, - "$payment_method" : { - "$payment_type" : "$credit_card", - "$payment_gateway" : "$braintree", - "$card_bin" : "542486", - "$card_last4" : "4444" + payment_method = new PaymentMethod() + { + payment_type = "$credit_card", + payment_gateway = "$braintree", + card_bin = "542486", + card_last4 = "4444", + card_bin_metadata = new CardBinMetadata // NEW in v1.6.0: Enhanced card validation + { + bank = "Chase", + brand = "VISA", + country = "US", + level = "Gold", + type = "CREDIT" + } }, - "$status_3ds" : "$attempted", - "$triggered_3ds" : "$processor", - "$merchant_initiated_transaction" : false, - "$shipping_address" : { - "$name" : "Bill Jones", - "$phone" : "1-415-555-6041", - "$address_1" : "2100 Main Street", - "$address_2" : "Apt 3B", - "$city" : "New London", - "$region" : "New Hampshire", - "$country" : "US", - "$zipcode" : "03257" + status_3ds = "$attempted", + triggered_3ds = "$processor", + merchant_initiated_transaction = false, + shipping_address = new Address() + { + name = "Bill Jones", + phone = "1-415-555-6041", + address_1 = "2100 Main Street", + address_2 = "Apt 3B", + city = "New London", + region = "New Hampshire", + country = "US", + zipcode = "03257" }, - "$session_id" : "gigtleqddo84l8cm15qe4il", - "$seller_user_id" : "slinkys_emporium", - "digital_wallet" : "apple_pay", - "coupon_code" : "dollarMadness", - "shipping_choice" : "FedEx Ground Courier", - "is_first_time_buyer" : false, - "$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" + session_id = "gigtleqddo84l8cm15qe4il", + seller_user_id = "slinkys_emporium", + browser = new 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" } }; + // Augment with custom fields + transaction.AddField("digital_wallet", "apple_pay"); + transaction.AddField("coupon_code", "dollarMadness"); + transaction.AddField("is_first_time_buyer", false); EventRequest eventRequest = new EventRequest() { @@ -757,21 +810,24 @@ The official Sift .NET client, supporting .NET Standard 2.0+ // Handle InnerException } - // Construct reserved events with known fields Wager + // Construct reserved events with known fields Wager (NEW in v1.5.0: iGaming support) var wager = new Wager { - "$type" : "$wager", - "$api_key" : "YOUR_API_KEY", - "$user_id" : "billy_jones_301", - "$wager_id". : "ID000001", - "$wager_type" : "spread", - "$wager_status" : "$accept", - "$amount" : 506790000, - "$currency_code" : "USD", - "$event_type" : "Sportsbook", - "$event_name" : "NFL", - "$event_id" : "KHG23423093", - "$minimum_wager_amount" : 3000000 + user_id = "billy_jones_301", + wager_id = "ID000001", + wager_type = "$parlay", + wager_status = "$accept", + amount = 506790000, + currency_code = "EUR", + exchange_rate = new ExchangeRate // NEW in v1.6.0: Multi-currency support for wagers + { + quote_currency_code = "USD", + rate = 1.14 + }, + minimum_wager_amount = 3000000, + wager_event_type = "Sportsbook", + wager_event_name = "Bulls-Lakers", + wager_event_id = "nba-23-11100" }; EventRequest eventRequest = new EventRequest() @@ -787,6 +843,61 @@ The official Sift .NET client, supporting .NET Standard 2.0+ // Handle InnerException } + // Construct reserved events with known fields UpdateAccount + var updateAccount = new UpdateAccount + { + user_id = "billy_jones_301", + user_email = "billjones1@example.com", + name = "Bill Jones", + phone = "1-415-555-6041", + changed_password = true, + billing_address = new Address() + { + name = "Bill Jones", + phone = "1-415-555-6041", + address_1 = "2100 Main Street", + address_2 = "Apt 3B", + city = "New London", + region = "New Hampshire", + country = "US", + zipcode = "03257" + }, + promotions = new ObservableCollection() // NEW in v1.6.0: Promotions tracking + { + new Promotion() + { + promotion_id = "FirstTimeBuyer", + status = "$success", + description = "$5 off", + discount = new Discount() + { + amount = 5000000, + currency_code = "USD", + minimum_purchase_amount = 25000000 + } + } + }, + browser = new 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" + } + }; + + EventRequest eventRequest = new EventRequest() + { + Event = updateAccount + }; + try + { + EventResponse res = sift.SendAsync(eventRequest).Result; + } + catch (AggregateException ae) + { + // Handle InnerException + } + #### IncludeScorePercentile in EventRequest diff --git a/Sift/Sift.csproj b/Sift/Sift.csproj index 90e0a3ed..c4e250be 100644 --- a/Sift/Sift.csproj +++ b/Sift/Sift.csproj @@ -13,7 +13,6 @@ https://github.com/siftscience/sift-dotnet https://raw.github.com/siftscience/sift-dotnet/master/LICENSE true - win10-x64;osx-arm64 True From 9b410551b9cd1ec9b4b386f02860170903813da0 Mon Sep 17 00:00:00 2001 From: vilnytskyi Date: Wed, 29 Oct 2025 19:26:40 +0100 Subject: [PATCH 5/9] Added FrameworkDescription and OSArchitecture to runtime --- Sift/Core/Client.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sift/Core/Client.cs b/Sift/Core/Client.cs index be45012c..6049e17a 100644 --- a/Sift/Core/Client.cs +++ b/Sift/Core/Client.cs @@ -2,13 +2,14 @@ using System; using System.Net.Http; using System.Reflection; +using System.Runtime.InteropServices; using System.Threading.Tasks; namespace Sift { public class Client : IDisposable { - static string UserAgent = "sift-dotnet/" + Assembly.GetExecutingAssembly().GetName().Version; + static string UserAgent = $"sift-dotnet/{Assembly.GetExecutingAssembly().GetName().Version} ({RuntimeInformation.FrameworkDescription}; {RuntimeInformation.OSArchitecture}; {Environment.OSVersion})"; readonly String apiKey; readonly HttpClient http; From 64decd79d5a52fc3b1364b78ac8c0de82d0dd697 Mon Sep 17 00:00:00 2001 From: vilnytskyi Date: Wed, 5 Nov 2025 14:09:24 +0100 Subject: [PATCH 6/9] Removed one of optional fields in tests --- Test.Integration.Net/EventsAPI/Account.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Test.Integration.Net/EventsAPI/Account.cs b/Test.Integration.Net/EventsAPI/Account.cs index 5cb22c7a..72f51da9 100644 --- a/Test.Integration.Net/EventsAPI/Account.cs +++ b/Test.Integration.Net/EventsAPI/Account.cs @@ -89,12 +89,6 @@ public void CreateAccount() } }, social_sign_on_type = "$twitter", - app = new App - { - app_name = "MyTestApp", - app_version = "1.2.3", - client_language = "en-US" - }, browser = new 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", @@ -197,12 +191,6 @@ public void UpdateAccount() } }, social_sign_on_type = "$twitter", - app = new App - { - app_name = "MyTestApp", - app_version = "1.2.3", - client_language = "en-US" - }, browser = new 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", From 8019bc391ab7052ed62608f1b5206cbb08c7e09b Mon Sep 17 00:00:00 2001 From: vilnytskyi Date: Wed, 5 Nov 2025 14:15:29 +0100 Subject: [PATCH 7/9] Added manual trigger to integration tests workflow --- .github/workflows/ci-workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index b1f6b252..998b7c60 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - master + workflow_dispatch: env: # Setting an environment variable with the value of a configuration variable @@ -31,7 +32,7 @@ jobs: siftDotNetIntegrationTest: runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' }} + if: ${{ github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' }} steps: - uses: actions/checkout@v5 - name: Setup .NET From f7bd16e7660b50bc64fa300571db2c5599b5a6cc Mon Sep 17 00:00:00 2001 From: vilnytskyi Date: Thu, 27 Nov 2025 15:46:58 +0100 Subject: [PATCH 8/9] Updated workflow --- .github/workflows/ci-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 998b7c60..07b4f3d0 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -32,7 +32,7 @@ jobs: siftDotNetIntegrationTest: runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' }} + if: ${{ github.ref == 'refs/heads/master' }} steps: - uses: actions/checkout@v5 - name: Setup .NET From cdfb9ba588843e01c42ea7ae4ae30ec0f2341d81 Mon Sep 17 00:00:00 2001 From: Ihor Prysiazhnyi <133665403+iprysiazhnyi-sift@users.noreply.github.com> Date: Mon, 1 Dec 2025 19:12:07 +0200 Subject: [PATCH 9/9] Apply suggestion from @iprysiazhnyi-sift --- .github/workflows/ci-workflow.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 07b4f3d0..b1f6b252 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -7,7 +7,6 @@ on: pull_request: branches: - master - workflow_dispatch: env: # Setting an environment variable with the value of a configuration variable