Skip to content

Commit 7b4182a

Browse files
[PAY-5624] - Support for $exchange_rete field in Events API (#118)
1 parent ff69f36 commit 7b4182a

16 files changed

+305
-7
lines changed

CHANGES.MD

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
3.19.0 (2025-04-24)
2+
=================
3+
- Added support for `$exchange_rate` complex field to `$transaction`, `$create_order`,
4+
`$update_order` and `$wager` events, `$booking`, `$discount` and `$item` event fields
5+
16
3.18.0 (2025-03-28)
27
=================
38
- Added support for `$card_bin_metadata` complex field to `$payment_method`

README.md

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

build.gradle

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

77
group = 'com.siftscience'
8-
version = '3.18.0'
8+
version = '3.19.0'
99

1010
repositories {
1111
mavenCentral()

src/main/java/com/siftscience/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
public class Constants {
44

55
public static final String API_VERSION = "v205";
6-
public static final String LIB_VERSION = "3.18.0";
6+
public static final String LIB_VERSION = "3.19.0";
77
public static final String USER_AGENT_HEADER = String.format("SiftScience/%s sift-java/%s", API_VERSION, LIB_VERSION);
88
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public abstract class BaseOrderFieldSet<T extends BaseOrderFieldSet<T>>
1111
@Expose @SerializedName(USER_EMAIL) private String userEmail;
1212
@Expose @SerializedName("$amount") private Long amount;
1313
@Expose @SerializedName("$currency_code") private String currencyCode;
14+
@Expose @SerializedName("$exchange_rate") private ExchangeRate exchangeRate;
1415
@Expose @SerializedName("$billing_address") private Address billingAddress;
1516
@Expose @SerializedName("$shipping_address") private Address shippingAddress;
1617
@Expose @SerializedName("$payment_methods") private List<PaymentMethod> paymentMethods;
@@ -63,6 +64,15 @@ public T setCurrencyCode(String currencyCode) {
6364
return (T) this;
6465
}
6566

67+
public ExchangeRate getExchangeRate() {
68+
return exchangeRate;
69+
}
70+
71+
public T setExchangeRate(ExchangeRate exchangeRate) {
72+
this.exchangeRate = exchangeRate;
73+
return (T) this;
74+
}
75+
6676
public Boolean getExpeditedShipping() {
6777
return expeditedShipping;
6878
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class Booking {
1212
@Expose @SerializedName("$end_time") private Long endTime;
1313
@Expose @SerializedName("$price") private Long price;
1414
@Expose @SerializedName("$currency_code") private String currencyCode;
15+
@Expose @SerializedName("$exchange_rate") private ExchangeRate exchangeRate;
1516
@Expose @SerializedName("$quantity") private Long quantity;
1617
@Expose @SerializedName("$iata_carrier_code") private String iataCarrierCode;
1718
@Expose @SerializedName("$guests") private List<Guest> guests;
@@ -77,6 +78,15 @@ public Booking setCurrencyCode(String currencyCode) {
7778
return this;
7879
}
7980

81+
public ExchangeRate getExchangeRate() {
82+
return exchangeRate;
83+
}
84+
85+
public Booking setExchangeRate(ExchangeRate exchangeRate) {
86+
this.exchangeRate = exchangeRate;
87+
return this;
88+
}
89+
8090
public Long getQuantity() {
8191
return quantity;
8292
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public class Discount {
77
@Expose @SerializedName("$percentage_off") private Double percentageOff;
88
@Expose @SerializedName("$amount") private Long amount;
99
@Expose @SerializedName("$currency_code") private String currencyCode;
10+
@Expose @SerializedName("$exchange_rate") private ExchangeRate exchangeRate;
1011
@Expose @SerializedName("$minimum_purchase_amount") private Long minimumPurchaseAmount;
1112

1213
public Double getPercentageOff() {
@@ -36,6 +37,15 @@ public Discount setCurrencyCode(String currencyCode) {
3637
return this;
3738
}
3839

40+
public ExchangeRate getExchangeRate() {
41+
return exchangeRate;
42+
}
43+
44+
public Discount setExchangeRate(ExchangeRate exchangeRate) {
45+
this.exchangeRate = exchangeRate;
46+
return this;
47+
}
48+
3949
public Long getMinimumPurchaseAmount() {
4050
return minimumPurchaseAmount;
4151
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.siftscience.model;
2+
3+
import com.google.gson.annotations.Expose;
4+
import com.google.gson.annotations.SerializedName;
5+
6+
public class ExchangeRate {
7+
@Expose @SerializedName("$quote_currency_code") private String quoteCurrencyCode;
8+
@Expose @SerializedName("$rate") private Float rate;
9+
10+
public String getQuoteCurrencyCode() {
11+
return quoteCurrencyCode;
12+
}
13+
14+
public ExchangeRate setQuoteCurrencyCode(String quoteCurrencyCode) {
15+
this.quoteCurrencyCode = quoteCurrencyCode;
16+
return this;
17+
}
18+
19+
public Float getRate() {
20+
return rate;
21+
}
22+
23+
public ExchangeRate setRate(Float rate) {
24+
this.rate = rate;
25+
return this;
26+
}
27+
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public class Item {
1010
@Expose @SerializedName("$product_title") private String productTitle;
1111
@Expose @SerializedName("$price") private Long price;
1212
@Expose @SerializedName("$currency_code") private String currencyCode;
13+
@Expose @SerializedName("$exchange_rate") private ExchangeRate exchangeRate;
1314
@Expose @SerializedName("$quantity") private Long quantity;
1415
@Expose @SerializedName("$upc") private String upc;
1516
@Expose @SerializedName("$sku") private String sku;
@@ -70,6 +71,15 @@ public String getCurrencyCode() {
7071
return currencyCode;
7172
}
7273

74+
public ExchangeRate getExchangeRate() {
75+
return exchangeRate;
76+
}
77+
78+
public Item setExchangeRate(ExchangeRate exchangeRate) {
79+
this.exchangeRate = exchangeRate;
80+
return this;
81+
}
82+
7383
public Item setCurrencyCode(String currencyCode) {
7484
this.currencyCode = currencyCode;
7585
return this;

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
public class TransactionFieldSet extends BaseAppBrowserSiteBrandFieldSet<TransactionFieldSet> {
99
@Expose @SerializedName("$amount") private Long amount;
1010
@Expose @SerializedName("$currency_code") private String currencyCode;
11+
@Expose @SerializedName("$exchange_rate") private ExchangeRate exchangeRate;
1112
@Expose @SerializedName(USER_EMAIL) private String userEmail;
1213
@Expose @SerializedName("$transaction_type") private String transactionType;
1314
@Expose @SerializedName("$transaction_status") private String transactionStatus;
@@ -66,6 +67,15 @@ public TransactionFieldSet setCurrencyCode(String currencyCode) {
6667
return this;
6768
}
6869

70+
public ExchangeRate getExchangeRate() {
71+
return exchangeRate;
72+
}
73+
74+
public TransactionFieldSet setExchangeRate(ExchangeRate exchangeRate) {
75+
this.exchangeRate = exchangeRate;
76+
return this;
77+
}
78+
6979
public String getUserEmail() {
7080
return userEmail;
7181
}

0 commit comments

Comments
 (0)