Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sift/Schema/ComplexTypes/booking.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
"$currency_code": {
"type": [ "string", "null" ]
},
"$exchange_rate": {
"oneOf": [
{ "$ref": "exchange_rate.json" },
{ "type": "null" }
]
},
"$iata_carrier_code": {
"type": [ "string", "null" ]
},
Expand Down
6 changes: 6 additions & 0 deletions Sift/Schema/ComplexTypes/discount.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 18 additions & 0 deletions Sift/Schema/ComplexTypes/exchange_rate.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
6 changes: 6 additions & 0 deletions Sift/Schema/ComplexTypes/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
"$currency_code": {
"type": [ "string", "null" ]
},
"$exchange_rate": {
"oneOf": [
{ "$ref": "exchange_rate.json" },
{ "type": "null" }
]
},
"$quantity": {
"type": [ "integer", "null" ]
},
Expand Down
6 changes: 6 additions & 0 deletions Sift/Schema/create_order.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down
6 changes: 6 additions & 0 deletions Sift/Schema/transaction.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
"$currency_code": {
"type": [ "string", "null" ]
},
"$exchange_rate": {
"oneOf": [
{ "$ref": "ComplexTypes/exchange_rate.json" },
{ "type": "null" }
]
},
"$order_id": {
"type": [ "string", "null" ]
},
Expand Down
6 changes: 6 additions & 0 deletions Sift/Schema/update_order.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down
6 changes: 6 additions & 0 deletions Sift/Schema/wager.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
},
Expand Down
4 changes: 2 additions & 2 deletions Sift/Sift.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<Authors>Sift</Authors>
<AssemblyTitle>Sift</AssemblyTitle>
<AssemblyName>Sift</AssemblyName>
<VersionPrefix>1.5.0</VersionPrefix>
<PackageReleaseNotes>Release 1.5.0</PackageReleaseNotes>
<VersionPrefix>1.6.0</VersionPrefix>
<PackageReleaseNotes>Release 1.6.0</PackageReleaseNotes>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>Sift</PackageId>
<PackageTags>sift;siftscience;client;api;client;async</PackageTags>
Expand Down
21 changes: 18 additions & 3 deletions Test.Integration.Net7/EventsAPI/Order.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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
}
}
Expand Down
7 changes: 6 additions & 1 deletion Test.Integration.Net7/EventsAPI/Transactions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 6 additions & 1 deletion Test.Integration.Net7/EventsAPI/Wagers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
21 changes: 18 additions & 3 deletions Test.Integration.NetFx48/EventsAPI/Order.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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
}
}
Expand Down
7 changes: 6 additions & 1 deletion Test.Integration.NetFx48/EventsAPI/Transactions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 6 additions & 1 deletion Test.Integration.NetFx48/EventsAPI/Wagers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading
Loading