Skip to content

Commit 2600b8c

Browse files
authored
chore: update code to v4.2.0 (#96)
1 parent 20ee8c9 commit 2600b8c

File tree

5 files changed

+130
-7
lines changed

5 files changed

+130
-7
lines changed

code/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
<groupId>com.expediagroup</groupId>
77
<artifactId>rapid-sdk</artifactId>
8-
<version>4.1.3</version>
8+
<version>4.2.0</version>
99
<name>EG Rapid SDK for Java</name>
10-
<description>EG Rapid SDK v4.1.3</description>
10+
<description>EG Rapid SDK v4.2.0</description>
1111
<url>https://github.com/ExpediaGroup/rapid-java-sdk</url>
1212
<inceptionYear>2022</inceptionYear>
1313
<packaging>jar</packaging>

code/src/main/kotlin/com/expediagroup/sdk/rapid/client/rapidClient.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,6 +1923,8 @@ class RapidClient private constructor(clientConfiguration: RapidClientConfigurat
19231923
propertyId: kotlin.String,
19241924
language: kotlin.String,
19251925
customerSessionId: kotlin.String? = null,
1926+
filter: kotlin.collections.List<kotlin.String>? = null,
1927+
tripReason: kotlin.collections.List<kotlin.String>? = null,
19261928
billingTerms: kotlin.String? = null,
19271929
paymentTerms: kotlin.String? = null,
19281930
partnerPointOfSale: kotlin.String? = null,
@@ -1933,6 +1935,8 @@ class RapidClient private constructor(clientConfiguration: RapidClientConfigurat
19331935
propertyId = propertyId,
19341936
customerSessionId = customerSessionId,
19351937
language = language,
1938+
filter = filter,
1939+
tripReason = tripReason,
19361940
billingTerms = billingTerms,
19371941
paymentTerms = paymentTerms,
19381942
partnerPointOfSale = partnerPointOfSale,
@@ -1953,6 +1957,8 @@ class RapidClient private constructor(clientConfiguration: RapidClientConfigurat
19531957
* @param propertyId Expedia Property ID.<br>
19541958
* @param language Desired language for the response as a subset of BCP47 format that only uses hyphenated pairs of two-digit language and country codes. Use only ISO 639-1 alpha-2 language codes and ISO 3166-1 alpha-2 country codes. See [https://www.w3.org/International/articles/language-tags/](https://www.w3.org/International/articles/language-tags/) Language Options: [https://developers.expediagroup.com/docs/rapid/resources/reference/language-options](https://developers.expediagroup.com/docs/rapid/resources/reference/language-options)
19551959
* @param customerSessionId Insert your own unique value for each user session, beginning with the first API call. Continue to pass the same value for each subsequent API call during the user's session, using a new value for every new customer session.<br> Including this value greatly eases EPS's internal debugging process for issues with partner requests, as it explicitly links together request paths for individual user's session. (optional)
1960+
* @param filter Single filter value. Send multiple instances of this parameter to request multiple filters. * `language` - Filters reviews to only those that match the specified `language` parameter value. Without this filter, the matching language will be preferred, but other language results can be returned. Specifying this filter could produce an error when there are no matching results. (optional)
1961+
* @param tripReason Desired reason provided for the reviewer's trip that you wish to display. This parameter can be supplied multiple times with different values, which will include reviews that match any of the requested trip reasons. (optional)
19561962
* @param billingTerms This parameter is to specify the terms of how a resulting booking should be billed. If this field is needed, the value for this will be provided to you separately. (optional)
19571963
* @param paymentTerms This parameter is to specify what terms should be used when being paid for a resulting booking. If this field is needed, the value for this will be provided to you separately. (optional)
19581964
* @param partnerPointOfSale This parameter is to specify what point of sale is being used to shop and book. If this field is needed, the value for this will be provided to you separately. (optional)
@@ -1967,12 +1973,14 @@ class RapidClient private constructor(clientConfiguration: RapidClientConfigurat
19671973
propertyId: kotlin.String,
19681974
language: kotlin.String,
19691975
customerSessionId: kotlin.String? = null,
1976+
filter: kotlin.collections.List<kotlin.String>? = null,
1977+
tripReason: kotlin.collections.List<kotlin.String>? = null,
19701978
billingTerms: kotlin.String? = null,
19711979
paymentTerms: kotlin.String? = null,
19721980
partnerPointOfSale: kotlin.String? = null,
19731981
platformName: kotlin.String? = null
19741982
): GuestReviews {
1975-
return getPropertyGuestReviewsWithResponse(propertyId, language, customerSessionId, billingTerms, paymentTerms, partnerPointOfSale, platformName).data
1983+
return getPropertyGuestReviewsWithResponse(propertyId, language, customerSessionId, filter, tripReason, billingTerms, paymentTerms, partnerPointOfSale, platformName).data
19761984
}
19771985

19781986
/**
@@ -1981,6 +1989,8 @@ class RapidClient private constructor(clientConfiguration: RapidClientConfigurat
19811989
* @param propertyId Expedia Property ID.<br>
19821990
* @param language Desired language for the response as a subset of BCP47 format that only uses hyphenated pairs of two-digit language and country codes. Use only ISO 639-1 alpha-2 language codes and ISO 3166-1 alpha-2 country codes. See [https://www.w3.org/International/articles/language-tags/](https://www.w3.org/International/articles/language-tags/) Language Options: [https://developers.expediagroup.com/docs/rapid/resources/reference/language-options](https://developers.expediagroup.com/docs/rapid/resources/reference/language-options)
19831991
* @param customerSessionId Insert your own unique value for each user session, beginning with the first API call. Continue to pass the same value for each subsequent API call during the user's session, using a new value for every new customer session.<br> Including this value greatly eases EPS's internal debugging process for issues with partner requests, as it explicitly links together request paths for individual user's session. (optional)
1992+
* @param filter Single filter value. Send multiple instances of this parameter to request multiple filters. * `language` - Filters reviews to only those that match the specified `language` parameter value. Without this filter, the matching language will be preferred, but other language results can be returned. Specifying this filter could produce an error when there are no matching results. (optional)
1993+
* @param tripReason Desired reason provided for the reviewer's trip that you wish to display. This parameter can be supplied multiple times with different values, which will include reviews that match any of the requested trip reasons. (optional)
19841994
* @param billingTerms This parameter is to specify the terms of how a resulting booking should be billed. If this field is needed, the value for this will be provided to you separately. (optional)
19851995
* @param paymentTerms This parameter is to specify what terms should be used when being paid for a resulting booking. If this field is needed, the value for this will be provided to you separately. (optional)
19861996
* @param partnerPointOfSale This parameter is to specify what point of sale is being used to shop and book. If this field is needed, the value for this will be provided to you separately. (optional)
@@ -1995,14 +2005,16 @@ class RapidClient private constructor(clientConfiguration: RapidClientConfigurat
19952005
propertyId: kotlin.String,
19962006
language: kotlin.String,
19972007
customerSessionId: kotlin.String? = null,
2008+
filter: kotlin.collections.List<kotlin.String>? = null,
2009+
tripReason: kotlin.collections.List<kotlin.String>? = null,
19982010
billingTerms: kotlin.String? = null,
19992011
paymentTerms: kotlin.String? = null,
20002012
partnerPointOfSale: kotlin.String? = null,
20012013
platformName: kotlin.String? = null
20022014
): Response<GuestReviews> {
20032015
try {
20042016
return GlobalScope.future(Dispatchers.IO) {
2005-
kgetPropertyGuestReviewsWithResponse(propertyId, language, customerSessionId, billingTerms, paymentTerms, partnerPointOfSale, platformName)
2017+
kgetPropertyGuestReviewsWithResponse(propertyId, language, customerSessionId, filter, tripReason, billingTerms, paymentTerms, partnerPointOfSale, platformName)
20062018
}.get()
20072019
} catch (exception: Exception) {
20082020
exception.handle()
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/*
2+
* Copyright (C) 2022 Expedia, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.expediagroup.sdk.rapid.models
18+
19+
/*
20+
* Copyright (C) 2022 Expedia, Inc.
21+
*
22+
* Licensed under the Apache License, Version 2.0 (the "License");
23+
* you may not use this file except in compliance with the License.
24+
* You may obtain a copy of the License at
25+
*
26+
* http://www.apache.org/licenses/LICENSE-2.0
27+
*
28+
* Unless required by applicable law or agreed to in writing, software
29+
* distributed under the License is distributed on an "AS IS" BASIS,
30+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31+
* See the License for the specific language governing permissions and
32+
* limitations under the License.
33+
*/
34+
35+
import com.fasterxml.jackson.annotation.JsonProperty
36+
import javax.validation.Valid
37+
38+
/**
39+
* A reply from the property management to the review left by the traveler.
40+
* @param text The text of the management response itself.
41+
* @param date When this management response was made, in ISO 8601 format.
42+
*/
43+
data class ManagementResponse(
44+
// The text of the management response itself.
45+
@JsonProperty("text")
46+
@field:Valid
47+
val text: kotlin.String? = null,
48+
// When this management response was made, in ISO 8601 format.
49+
@JsonProperty("date")
50+
@field:Valid
51+
val date: kotlin.String? = null
52+
) {
53+
companion object {
54+
@JvmStatic
55+
fun builder() = Builder()
56+
}
57+
58+
class Builder(
59+
private var text: kotlin.String? = null,
60+
private var date: kotlin.String? = null
61+
) {
62+
fun text(text: kotlin.String?) = apply { this.text = text }
63+
64+
fun date(date: kotlin.String?) = apply { this.date = date }
65+
66+
fun build(): ManagementResponse {
67+
return ManagementResponse(
68+
text = text,
69+
date = date
70+
)
71+
}
72+
}
73+
}

code/src/main/kotlin/com/expediagroup/sdk/rapid/models/Review.kt

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ import javax.validation.Valid
4242
* @param dateSubmitted When this review was made, in ISO 8601 format.
4343
* @param rating The rating for this property given by the reviewer. Returns a value between 1.0 and 5.0.
4444
* @param reviewerName The name of the person who wrote this review.
45+
* @param stayDate The year and month of the traveler's stay at the property, in ISO 8601 format (YYYY-MM).
4546
* @param tripReason
4647
* @param travelCompanion
4748
* @param text The text of the review itself.
49+
* @param managementResponses A collection of the management responses to this review.
4850
*/
4951
data class Review(
5052
// Where this review has been verified from.
@@ -67,6 +69,10 @@ data class Review(
6769
@JsonProperty("reviewer_name")
6870
@field:Valid
6971
val reviewerName: kotlin.String? = null,
72+
// The year and month of the traveler's stay at the property, in ISO 8601 format (YYYY-MM).
73+
@JsonProperty("stay_date")
74+
@field:Valid
75+
val stayDate: kotlin.String? = null,
7076
@JsonProperty("trip_reason")
7177
@field:Valid
7278
val tripReason: TripReason? = null,
@@ -76,7 +82,11 @@ data class Review(
7682
// The text of the review itself.
7783
@JsonProperty("text")
7884
@field:Valid
79-
val text: kotlin.String? = null
85+
val text: kotlin.String? = null,
86+
// A collection of the management responses to this review.
87+
@JsonProperty("management_responses")
88+
@field:Valid
89+
val managementResponses: kotlin.collections.List<ManagementResponse>? = null
8090
) {
8191
companion object {
8292
@JvmStatic
@@ -89,9 +99,11 @@ data class Review(
8999
private var dateSubmitted: kotlin.String? = null,
90100
private var rating: kotlin.String? = null,
91101
private var reviewerName: kotlin.String? = null,
102+
private var stayDate: kotlin.String? = null,
92103
private var tripReason: TripReason? = null,
93104
private var travelCompanion: TravelCompanion? = null,
94-
private var text: kotlin.String? = null
105+
private var text: kotlin.String? = null,
106+
private var managementResponses: kotlin.collections.List<ManagementResponse>? = null
95107
) {
96108
fun verificationSource(verificationSource: kotlin.String?) = apply { this.verificationSource = verificationSource }
97109

@@ -103,22 +115,28 @@ data class Review(
103115

104116
fun reviewerName(reviewerName: kotlin.String?) = apply { this.reviewerName = reviewerName }
105117

118+
fun stayDate(stayDate: kotlin.String?) = apply { this.stayDate = stayDate }
119+
106120
fun tripReason(tripReason: TripReason?) = apply { this.tripReason = tripReason }
107121

108122
fun travelCompanion(travelCompanion: TravelCompanion?) = apply { this.travelCompanion = travelCompanion }
109123

110124
fun text(text: kotlin.String?) = apply { this.text = text }
111125

126+
fun managementResponses(managementResponses: kotlin.collections.List<ManagementResponse>?) = apply { this.managementResponses = managementResponses }
127+
112128
fun build(): Review {
113129
return Review(
114130
verificationSource = verificationSource,
115131
title = title,
116132
dateSubmitted = dateSubmitted,
117133
rating = rating,
118134
reviewerName = reviewerName,
135+
stayDate = stayDate,
119136
tripReason = tripReason,
120137
travelCompanion = travelCompanion,
121-
text = text
138+
text = text,
139+
managementResponses = managementResponses
122140
)
123141
}
124142
}

code/src/main/kotlin/com/expediagroup/sdk/rapid/operations/GetPropertyGuestReviewsOperationParams.kt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import com.expediagroup.sdk.core.model.OperationParams
2222
* @property propertyId Expedia Property ID.<br>
2323
* @property customerSessionId Insert your own unique value for each user session, beginning with the first API call. Continue to pass the same value for each subsequent API call during the user's session, using a new value for every new customer session.<br> Including this value greatly eases EPS's internal debugging process for issues with partner requests, as it explicitly links together request paths for individual user's session.
2424
* @property language Desired language for the response as a subset of BCP47 format that only uses hyphenated pairs of two-digit language and country codes. Use only ISO 639-1 alpha-2 language codes and ISO 3166-1 alpha-2 country codes. See [https://www.w3.org/International/articles/language-tags/](https://www.w3.org/International/articles/language-tags/) Language Options: [https://developers.expediagroup.com/docs/rapid/resources/reference/language-options](https://developers.expediagroup.com/docs/rapid/resources/reference/language-options)
25+
* @property filter Single filter value. Send multiple instances of this parameter to request multiple filters. * `language` - Filters reviews to only those that match the specified `language` parameter value. Without this filter, the matching language will be preferred, but other language results can be returned. Specifying this filter could produce an error when there are no matching results.
26+
* @property tripReason Desired reason provided for the reviewer's trip that you wish to display. This parameter can be supplied multiple times with different values, which will include reviews that match any of the requested trip reasons.
2527
* @property billingTerms This parameter is to specify the terms of how a resulting booking should be billed. If this field is needed, the value for this will be provided to you separately.
2628
* @property paymentTerms This parameter is to specify what terms should be used when being paid for a resulting booking. If this field is needed, the value for this will be provided to you separately.
2729
* @property partnerPointOfSale This parameter is to specify what point of sale is being used to shop and book. If this field is needed, the value for this will be provided to you separately.
@@ -31,6 +33,8 @@ data class GetPropertyGuestReviewsOperationParams(
3133
val propertyId: kotlin.String,
3234
val customerSessionId: kotlin.String? = null,
3335
val language: kotlin.String,
36+
val filter: kotlin.collections.List<kotlin.String>? = null,
37+
val tripReason: kotlin.collections.List<kotlin.String>? = null,
3438
val billingTerms: kotlin.String? = null,
3539
val paymentTerms: kotlin.String? = null,
3640
val partnerPointOfSale: kotlin.String? = null,
@@ -45,6 +49,8 @@ data class GetPropertyGuestReviewsOperationParams(
4549
private var propertyId: kotlin.String? = null,
4650
private var customerSessionId: kotlin.String? = null,
4751
private var language: kotlin.String? = null,
52+
private var filter: kotlin.collections.List<kotlin.String>? = null,
53+
private var tripReason: kotlin.collections.List<kotlin.String>? = null,
4854
private var billingTerms: kotlin.String? = null,
4955
private var paymentTerms: kotlin.String? = null,
5056
private var partnerPointOfSale: kotlin.String? = null,
@@ -65,6 +71,16 @@ data class GetPropertyGuestReviewsOperationParams(
6571
*/
6672
fun language(language: kotlin.String) = apply { this.language = language }
6773

74+
/**
75+
* @param filter Single filter value. Send multiple instances of this parameter to request multiple filters. * `language` - Filters reviews to only those that match the specified `language` parameter value. Without this filter, the matching language will be preferred, but other language results can be returned. Specifying this filter could produce an error when there are no matching results.
76+
*/
77+
fun filter(filter: kotlin.collections.List<kotlin.String>) = apply { this.filter = filter }
78+
79+
/**
80+
* @param tripReason Desired reason provided for the reviewer's trip that you wish to display. This parameter can be supplied multiple times with different values, which will include reviews that match any of the requested trip reasons.
81+
*/
82+
fun tripReason(tripReason: kotlin.collections.List<kotlin.String>) = apply { this.tripReason = tripReason }
83+
6884
/**
6985
* @param billingTerms This parameter is to specify the terms of how a resulting booking should be billed. If this field is needed, the value for this will be provided to you separately.
7086
*/
@@ -92,6 +108,8 @@ data class GetPropertyGuestReviewsOperationParams(
92108
propertyId = propertyId!!,
93109
customerSessionId = customerSessionId,
94110
language = language!!,
111+
filter = filter,
112+
tripReason = tripReason,
95113
billingTerms = billingTerms,
96114
paymentTerms = paymentTerms,
97115
partnerPointOfSale = partnerPointOfSale,
@@ -118,6 +136,8 @@ data class GetPropertyGuestReviewsOperationParams(
118136
override fun getQueryParams(): Map<String, Iterable<String>> {
119137
return buildMap {
120138
language?.also { put("language", listOf(language.toString())) }
139+
filter?.also { put("filter", filter) }
140+
tripReason?.also { put("trip_reason", tripReason) }
121141
billingTerms?.also { put("billing_terms", listOf(billingTerms.toString())) }
122142
paymentTerms?.also { put("payment_terms", listOf(paymentTerms.toString())) }
123143
partnerPointOfSale?.also { put("partner_point_of_sale", listOf(partnerPointOfSale.toString())) }

0 commit comments

Comments
 (0)