Skip to content

Commit fafa950

Browse files
Merge pull request #48 from SiftScience/travel_and_ticketing_api
(For David) adding support for bookings complex field in $create_order and $update_order events
2 parents ad3dc88 + 4411b62 commit fafa950

File tree

10 files changed

+794
-5
lines changed

10 files changed

+794
-5
lines changed

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.0.0'
8+
version = '3.1.0'
99

1010
repositories {
1111
mavenCentral()

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public abstract class BaseOrderFieldSet<T extends BaseOrderFieldSet<T>>
1919
@Expose @SerializedName("$seller_user_id") private String sellerUserId;
2020
@Expose @SerializedName("$promotions") private List<Promotion> promotions;
2121
@Expose @SerializedName("$shipping_method") private String shippingMethod;
22+
@Expose @SerializedName("$bookings") private List<Booking> bookings;
2223

2324
public String getOrderId() {
2425
return orderId;
@@ -105,6 +106,15 @@ public T setItems(List<Item> items) {
105106
return (T) this;
106107
}
107108

109+
public List<Booking> getBookings() {
110+
return bookings;
111+
}
112+
113+
public T setBookings(List<Booking> bookings) {
114+
this.bookings = bookings;
115+
return (T) this;
116+
}
117+
108118
public String getSellerUserId() {
109119
return sellerUserId;
110120
}
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
package com.siftscience.model;
2+
3+
import java.util.List;
4+
5+
import com.google.gson.annotations.Expose;
6+
import com.google.gson.annotations.SerializedName;
7+
8+
public class Booking {
9+
@Expose @SerializedName("$booking_type") private String bookingType;
10+
@Expose @SerializedName("$title") private String title;
11+
@Expose @SerializedName("$start_time") private Long startTime;
12+
@Expose @SerializedName("$end_time") private Long endTime;
13+
@Expose @SerializedName("$price") private Long price;
14+
@Expose @SerializedName("$currency_code") private String currencyCode;
15+
@Expose @SerializedName("$quantity") private Long quantity;
16+
@Expose @SerializedName("$guests") private List<Guest> guests;
17+
@Expose @SerializedName("$segments") private List<Segment> segments;
18+
@Expose @SerializedName("$room_type") private String roomType;
19+
@Expose @SerializedName("$event_id") private String eventId;
20+
@Expose @SerializedName("$venue_id") private String venueId;
21+
@Expose @SerializedName("$location") private Address location;
22+
@Expose @SerializedName("$category") private String category;
23+
24+
public String getBookingType() {
25+
return bookingType;
26+
}
27+
28+
public Booking setBookingType(String bookingType) {
29+
this.bookingType = bookingType;
30+
return this;
31+
}
32+
33+
public String getTitle() {
34+
return title;
35+
}
36+
37+
public Booking setTitle(String title) {
38+
this.title = title;
39+
return this;
40+
}
41+
42+
public Long getStartTime() {
43+
return startTime;
44+
}
45+
46+
public Booking setStartTime(Long startTime) {
47+
this.startTime = startTime;
48+
return this;
49+
}
50+
51+
public Long getEndTime() {
52+
return endTime;
53+
}
54+
55+
public Booking setEndTime(Long endTime) {
56+
this.endTime = endTime;
57+
return this;
58+
}
59+
60+
public Long getPrice() {
61+
return price;
62+
}
63+
64+
public Booking setPrice(Long price) {
65+
this.price = price;
66+
return this;
67+
}
68+
69+
public String getCurrencyCode() {
70+
return currencyCode;
71+
}
72+
73+
public Booking setCurrencyCode(String currencyCode) {
74+
this.currencyCode = currencyCode;
75+
return this;
76+
}
77+
78+
public Long getQuantity() {
79+
return quantity;
80+
}
81+
82+
public Booking setQuantity(Long quantity) {
83+
this.quantity = quantity;
84+
return this;
85+
}
86+
87+
public List<Guest> getGuests() {
88+
return guests;
89+
}
90+
91+
public Booking setGuests(List<Guest> guests) {
92+
this.guests = guests;
93+
return this;
94+
}
95+
96+
public List<Segment> getSegments() {
97+
return segments;
98+
}
99+
100+
public Booking setSegments(List<Segment> segments) {
101+
this.segments = segments;
102+
return this;
103+
}
104+
105+
public String getRoomType() {
106+
return roomType;
107+
}
108+
109+
public Booking setRoomType(String roomType) {
110+
this.roomType = roomType;
111+
return this;
112+
}
113+
114+
public String getEventId() {
115+
return eventId;
116+
}
117+
118+
public Booking setEventId(String eventId) {
119+
this.eventId = eventId;
120+
return this;
121+
}
122+
123+
public String getVenueId() {
124+
return venueId;
125+
}
126+
127+
public Booking setVenueId(String venueId) {
128+
this.venueId = venueId;
129+
return this;
130+
}
131+
132+
public Address getLocation() {
133+
return location;
134+
}
135+
136+
public Booking setLocation(Address location) {
137+
this.location = location;
138+
return this;
139+
}
140+
141+
public String getCategory() {
142+
return category;
143+
}
144+
145+
public Booking setCategory(String category) {
146+
this.category = category;
147+
return this;
148+
}
149+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
package com.siftscience.model;
2+
3+
import com.google.gson.annotations.Expose;
4+
import com.google.gson.annotations.SerializedName;
5+
6+
public class Guest {
7+
@Expose @SerializedName("$name") private String name;
8+
@Expose @SerializedName("$email") private String email;
9+
@Expose @SerializedName("$phone") private String phone;
10+
@Expose @SerializedName("$loyalty_program") private String loyaltyProgram;
11+
@Expose @SerializedName("$loyalty_program_id") private String loyaltyProgramId;
12+
@Expose @SerializedName("$birth_date") private String birthDate;
13+
14+
public String getName() {
15+
return name;
16+
}
17+
18+
public Guest setName(String name) {
19+
this.name = name;
20+
return this;
21+
}
22+
23+
public String getEmail() {
24+
return email;
25+
}
26+
27+
public Guest setEmail(String email) {
28+
this.email = email;
29+
return this;
30+
}
31+
32+
public String getPhone() {
33+
return phone;
34+
}
35+
36+
public Guest setPhone(String phone) {
37+
this.phone = phone;
38+
return this;
39+
}
40+
41+
public String getLoyaltyProgram() {
42+
return loyaltyProgram;
43+
}
44+
45+
public Guest setLoyaltyProgram(String loyaltyProgram) {
46+
this.loyaltyProgram = loyaltyProgram;
47+
return this;
48+
}
49+
50+
public String getLoyaltyProgramId() {
51+
return loyaltyProgramId;
52+
}
53+
54+
public Guest setLoyaltyProgramId(String loyaltyProgramId) {
55+
this.loyaltyProgramId = loyaltyProgramId;
56+
return this;
57+
}
58+
59+
public String getBirthDate() {
60+
return birthDate;
61+
}
62+
63+
public Guest setBirthDate(String birthDate) {
64+
this.birthDate = birthDate;
65+
return this;
66+
}
67+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
package com.siftscience.model;
2+
3+
import com.google.gson.annotations.Expose;
4+
import com.google.gson.annotations.SerializedName;
5+
6+
public class Segment {
7+
@Expose @SerializedName("$departure_address") private Address departureAddress;
8+
@Expose @SerializedName("$arrival_address") private Address arrivalAddress;
9+
@Expose @SerializedName("$start_time") private Long startTime;
10+
@Expose @SerializedName("$end_time") private Long endTime;
11+
@Expose @SerializedName("$vessel_number") private String vesselNumber;
12+
@Expose @SerializedName("$arrival_airport_code") private String arrivalAirportCode;
13+
@Expose @SerializedName("$departure_airport_code") private String departureAirportCode;
14+
@Expose @SerializedName("$fare_class") private String fareClass;
15+
16+
17+
public Address getDepartureAddress() {
18+
return departureAddress;
19+
}
20+
21+
public Segment setDepartureAddress(Address departureAddress) {
22+
this.departureAddress = departureAddress;
23+
return this;
24+
}
25+
26+
public Address getArrivalAddress() {
27+
return arrivalAddress;
28+
}
29+
30+
public Segment setArrivalAddress(Address arrivalAddress) {
31+
this.arrivalAddress = arrivalAddress;
32+
return this;
33+
}
34+
35+
public Long getStartTime() {
36+
return startTime;
37+
}
38+
39+
public Segment setStartTime(Long startTime) {
40+
this.startTime = startTime;
41+
return this;
42+
}
43+
44+
public Long getEndTime() {
45+
return endTime;
46+
}
47+
48+
public Segment setEndTime(Long endTime) {
49+
this.endTime = endTime;
50+
return this;
51+
}
52+
53+
public String getVesselNumber() {
54+
return vesselNumber;
55+
}
56+
57+
public Segment setVesselNumber(String vesselNumber) {
58+
this.vesselNumber = vesselNumber;
59+
return this;
60+
}
61+
62+
public String getArrivalAirportCode() {
63+
return arrivalAirportCode;
64+
}
65+
66+
public Segment setArrivalAirportCode(String arrivalAirportCode) {
67+
this.arrivalAirportCode = arrivalAirportCode;
68+
return this;
69+
}
70+
71+
public String getDepartureAirportCode() {
72+
return departureAirportCode;
73+
}
74+
75+
public Segment setDepartureAirportCode(String departureAirportCode) {
76+
this.departureAirportCode = departureAirportCode;
77+
return this;
78+
}
79+
80+
public String getFareClass() {
81+
return fareClass;
82+
}
83+
84+
public Segment setFareClass(String fareClass) {
85+
this.fareClass = fareClass;
86+
return this;
87+
}
88+
}

0 commit comments

Comments
 (0)