Skip to content

Commit c41008a

Browse files
adding support for $iata_carrier_code for $booking complex field (#111)
* adding support for iata_carrier_code * correcting the version
1 parent df6ba5f commit c41008a

File tree

9 files changed

+24
-5
lines changed

9 files changed

+24
-5
lines changed

CHANGES.MD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
3.16.0 (2024-09-26)
2+
=================
3+
- Added support for `$iata_carrier_code` to the `$booking` complex field
4+
15
3.15.2 (2024-07-11)
26
=================
37
- Added support for `$guest_user_id` and `$guest_booking_reference_id` fields to `$guest` complex field for `$create_order` and `$update_order` events

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.15.2</version>
16+
<version>3.16.0</version>
1717
</dependency>
1818
```
1919
### Gradle
2020
```
2121
dependencies {
22-
compile 'com.siftscience:sift-java:3.15.2'
22+
compile 'com.siftscience:sift-java:3.16.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.15.2'
8+
version = '3.16.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.15.2";
6+
public static final String LIB_VERSION = "3.16.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/Booking.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class Booking {
1313
@Expose @SerializedName("$price") private Long price;
1414
@Expose @SerializedName("$currency_code") private String currencyCode;
1515
@Expose @SerializedName("$quantity") private Long quantity;
16+
@Expose @SerializedName("$iata_carrier_code") private String iataCarrierCode;
1617
@Expose @SerializedName("$guests") private List<Guest> guests;
1718
@Expose @SerializedName("$segments") private List<Segment> segments;
1819
@Expose @SerializedName("$room_type") private String roomType;
@@ -85,6 +86,15 @@ public Booking setQuantity(Long quantity) {
8586
return this;
8687
}
8788

89+
public String getIataCarrierCode() {
90+
return iataCarrierCode;
91+
}
92+
93+
public Booking setIataCarrierCode(String iataCarrierCode) {
94+
this.iataCarrierCode = iataCarrierCode;
95+
return this;
96+
}
97+
8898
public List<Guest> getGuests() {
8999
return guests;
90100
}

src/test/java/com/siftscience/CreateOrderEventTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public void testCreateOrderEventWithBookings() throws JSONException, IOException
127127
" ],\n" +
128128
" \"$price\": 49900000,\n" +
129129
" \"$currency_code\": \"USD\",\n" +
130+
" \"$iata_carrier_code\": \"AS\",\n" +
130131
" \"$quantity\": 1,\n" +
131132
" \"$tags\": [\n" +
132133
" \"team-123\",\n" +

src/test/java/com/siftscience/SiftRequestTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void testUserAgentHeader() throws Exception {
3737

3838
// Verify the request.
3939
RecordedRequest recordedRequest = server.takeRequest();
40-
Assert.assertEquals("SiftScience/v205 sift-java/3.15.2", recordedRequest.getHeader("User-Agent"));
40+
Assert.assertEquals("SiftScience/v205 sift-java/3.16.0", recordedRequest.getHeader("User-Agent"));
4141
}
4242

4343
@Test

src/test/java/com/siftscience/TestUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ static Booking sampleBooking() {
187187
.setSegments(segments)
188188
.setPrice(49900000L)
189189
.setCurrencyCode("USD")
190+
.setIataCarrierCode("AS")
190191
.setTags(sampleTags3())
191192
.setQuantity(1L);
192193
}

src/test/java/com/siftscience/UpdateOrderEventTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ public void testUpdateOrderEventWithBookings() throws JSONException, IOException
128128
" ],\n" +
129129
" \"$price\": 49900000,\n" +
130130
" \"$currency_code\": \"USD\",\n" +
131+
" \"$iata_carrier_code\": \"AS\",\n" +
131132
" \"$quantity\": 1,\n" +
132133
" \"$tags\": [\n" +
133134
" \"team-123\",\n" +
@@ -331,6 +332,7 @@ public void testUpdateOrderEventWithBookingsShippingCarrierIsNull() throws IOExc
331332
" ],\n" +
332333
" \"$price\": 49900000,\n" +
333334
" \"$currency_code\": \"USD\",\n" +
335+
" \"$iata_carrier_code\": \"AS\",\n" +
334336
" \"$quantity\": 1,\n" +
335337
" \"$tags\": [\n" +
336338
" \"team-123\",\n" +
@@ -497,6 +499,7 @@ public void testUpdateOrderEventWithBookingsShippingTrackingNumberIsNull() throw
497499
" ],\n" +
498500
" \"$price\": 49900000,\n" +
499501
" \"$currency_code\": \"USD\",\n" +
502+
" \"$iata_carrier_code\": \"AS\",\n" +
500503
" \"$quantity\": 1,\n" +
501504
" \"$tags\": [\n" +
502505
" \"team-123\",\n" +

0 commit comments

Comments
 (0)