Skip to content

Commit 3e7ddae

Browse files
anssari1github-actions[bot]
authored andcommitted
chore: Publish v1.1.0-SNAPSHOT
1 parent 902d7f1 commit 3e7ddae

38 files changed

+5652
-13
lines changed

code/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<dependency>
66
<groupId>com.expediagroup</groupId>
77
<artifactId>xap-sdk</artifactId>
8-
<version>1.0.0</version>
8+
<version>1.1.0-SNAPSHOT</version>
99
</dependency>
1010
```
1111

code/pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.expediagroup</groupId>
66
<artifactId>xap-sdk</artifactId>
7-
<version>1.0.0</version>
7+
<version>1.1.0-SNAPSHOT</version>
88
<name>EG xap-sdk for Java</name>
9-
<description>EG xap-sdk v1.0.0</description>
9+
<description>EG xap-sdk v1.1.0-SNAPSHOT</description>
1010
<url>https://github.com/ExpediaGroup/test-sdk</url>
1111
<inceptionYear>2022</inceptionYear>
1212
<packaging>jar</packaging>
@@ -82,7 +82,7 @@
8282
<kotlin.version>2.0.21</kotlin.version>
8383
<kotlinx.coroutines.version>1.9.0</kotlinx.coroutines.version>
8484
<ktor.version>2.3.13</ktor.version>
85-
<kotlin-atomic.version>0.26.0</kotlin-atomic.version>
85+
<kotlin-atomic.version>0.26.1</kotlin-atomic.version>
8686
<slf4j.version>2.0.16</slf4j.version>
8787
<maven.nexus-staging.plugin.version>1.7.0</maven.nexus-staging.plugin.version>
8888
<maven.gpg.plugin.version>3.2.7</maven.gpg.plugin.version>
@@ -131,7 +131,7 @@
131131
<dependency>
132132
<groupId>com.fasterxml.jackson</groupId>
133133
<artifactId>jackson-bom</artifactId>
134-
<version>2.18.1</version>
134+
<version>2.18.2</version>
135135
<type>pom</type>
136136
<scope>import</scope>
137137
</dependency>
@@ -153,7 +153,7 @@
153153
<dependency>
154154
<groupId>com.fasterxml.jackson.core</groupId>
155155
<artifactId>jackson-annotations</artifactId>
156-
<version>2.18.1</version>
156+
<version>2.18.2</version>
157157
</dependency>
158158
</dependencies>
159159
</dependencyManagement>
@@ -732,25 +732,25 @@
732732
<dependency>
733733
<groupId>org.apache.commons</groupId>
734734
<artifactId>commons-lang3</artifactId>
735-
<version>3.14.0</version>
735+
<version>3.17.0</version>
736736
</dependency>
737737

738738
<dependency>
739739
<groupId>org.apache.commons</groupId>
740740
<artifactId>commons-text</artifactId>
741-
<version>1.12.0</version>
741+
<version>1.13.0</version>
742742
</dependency>
743743

744744
<dependency>
745745
<groupId>com.ebay.ejmask</groupId>
746746
<artifactId>ejmask-api</artifactId>
747-
<version>1.0.3</version>
747+
<version>1.3.0</version>
748748
</dependency>
749749

750750
<dependency>
751751
<groupId>com.ebay.ejmask</groupId>
752752
<artifactId>ejmask-extensions</artifactId>
753-
<version>1.0.3</version>
753+
<version>1.3.0</version>
754754
</dependency>
755755
</dependencies>
756756

code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseRapidClient.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ abstract class BaseRapidClient(
4444
private val engine: HttpClientEngine =
4545
_configurationProvider.okHttpClient?.let {
4646
OkHttp.create {
47-
preconfigured = it
47+
config {
48+
preconfigured = it
49+
dispatcher(it.dispatcher)
50+
}
4851
}
4952
} ?: httpClientEngine
5053

code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseXapClient.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ abstract class BaseXapClient(
4444
private val engine: HttpClientEngine =
4545
_configurationProvider.okHttpClient?.let {
4646
OkHttp.create {
47-
preconfigured = it
47+
config {
48+
preconfigured = it
49+
dispatcher(it.dispatcher)
50+
}
4851
}
4952
} ?: httpClientEngine
5053

code/src/main/kotlin/com/expediagroup/sdk/xap/client/XapClient.kt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ import com.expediagroup.sdk.xap.models.*
2929
import com.expediagroup.sdk.xap.models.exception.ErrorObjectMapper
3030
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiAPIGatewayErrorException
3131
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiAPIMErrorException
32+
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiActivitiesErrorsException
3233
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiCarsErrorsException
3334
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiErrorsException
3435
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiLodgingErrorsException
3536
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiPresignedUrlResponseException
3637
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiSdpAPIMErrorException
38+
import com.expediagroup.sdk.xap.operations.GetActivityDetailsOperation
39+
import com.expediagroup.sdk.xap.operations.GetActivityListingsOperation
3740
import com.expediagroup.sdk.xap.operations.GetCarDetailsOperation
3841
import com.expediagroup.sdk.xap.operations.GetCarsListingsOperation
3942
import com.expediagroup.sdk.xap.operations.GetFeedDownloadUrlOperation
@@ -154,6 +157,50 @@ class XapClient private constructor(clientConfiguration: XapClientConfiguration)
154157
}
155158
}
156159

160+
/**
161+
*
162+
* The Activity Details API provides detailed information about one selected activity.
163+
* @param operation [GetActivityDetailsOperation]
164+
* @throws ExpediaGroupApiActivitiesErrorsException
165+
* @throws ExpediaGroupApiAPIMErrorException
166+
* @throws ExpediaGroupApiException
167+
* @return a [Response] object with a body of type ActivityDetailsResponse
168+
*/
169+
fun execute(operation: GetActivityDetailsOperation): Response<ActivityDetailsResponse> = execute<Nothing, ActivityDetailsResponse>(operation)
170+
171+
/**
172+
*
173+
* The Activity Details API provides detailed information about one selected activity.
174+
* @param operation [GetActivityDetailsOperation]
175+
* @throws ExpediaGroupApiActivitiesErrorsException
176+
* @throws ExpediaGroupApiAPIMErrorException
177+
* @throws ExpediaGroupApiException
178+
* @return a [CompletableFuture<Response>] object with a body of type ActivityDetailsResponse
179+
*/
180+
fun executeAsync(operation: GetActivityDetailsOperation): CompletableFuture<Response<ActivityDetailsResponse>> = executeAsync<Nothing, ActivityDetailsResponse>(operation)
181+
182+
/**
183+
*
184+
* The Activities Search API allows partners to search for Expedia Activity inventory.
185+
* @param operation [GetActivityListingsOperation]
186+
* @throws ExpediaGroupApiActivitiesErrorsException
187+
* @throws ExpediaGroupApiAPIMErrorException
188+
* @throws ExpediaGroupApiException
189+
* @return a [Response] object with a body of type ActivityListingsResponse
190+
*/
191+
fun execute(operation: GetActivityListingsOperation): Response<ActivityListingsResponse> = execute<Nothing, ActivityListingsResponse>(operation)
192+
193+
/**
194+
*
195+
* The Activities Search API allows partners to search for Expedia Activity inventory.
196+
* @param operation [GetActivityListingsOperation]
197+
* @throws ExpediaGroupApiActivitiesErrorsException
198+
* @throws ExpediaGroupApiAPIMErrorException
199+
* @throws ExpediaGroupApiException
200+
* @return a [CompletableFuture<Response>] object with a body of type ActivityListingsResponse
201+
*/
202+
fun executeAsync(operation: GetActivityListingsOperation): CompletableFuture<Response<ActivityListingsResponse>> = executeAsync<Nothing, ActivityListingsResponse>(operation)
203+
157204
/**
158205
* Get Extended information with a single car offer
159206
* Extended information about the rates, charges, fees, and other terms associated with a single car offer.
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
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+
*
18+
* Please note:
19+
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20+
* Do not edit this file manually.
21+
*
22+
*/
23+
24+
@file:Suppress(
25+
"ArrayInDataClass",
26+
"EnumEntryName",
27+
"RemoveRedundantQualifierName",
28+
"UnusedImport"
29+
)
30+
31+
package com.expediagroup.sdk.xap.models
32+
33+
import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException
34+
import com.fasterxml.jackson.annotation.JsonProperty
35+
import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator
36+
import javax.validation.Valid
37+
import javax.validation.Validation
38+
39+
/**
40+
* Address information
41+
* @param address1 Street Number, Street Name, or PO Box.
42+
* @param address2 Apartment, Floor, Suite, Bldg
43+
* @param suite Suite/apartment number
44+
* @param city The city
45+
* @param province The state or province.
46+
* @param country 3-letter code for the country.
47+
* @param postalCode Zip/postal code.
48+
*/
49+
data class ActivitiesAddress(
50+
// Street Number, Street Name, or PO Box.
51+
@JsonProperty("Address1")
52+
@field:Valid
53+
val address1: kotlin.String? = null,
54+
// Apartment, Floor, Suite, Bldg
55+
@JsonProperty("Address2")
56+
@field:Valid
57+
val address2: kotlin.String? = null,
58+
// Suite/apartment number
59+
@JsonProperty("Suite")
60+
@field:Valid
61+
val suite: kotlin.String? = null,
62+
// The city
63+
@JsonProperty("City")
64+
@field:Valid
65+
val city: kotlin.String? = null,
66+
// The state or province.
67+
@JsonProperty("Province")
68+
@field:Valid
69+
val province: kotlin.String? = null,
70+
// 3-letter code for the country.
71+
@JsonProperty("Country")
72+
@field:Valid
73+
val country: kotlin.String? = null,
74+
// Zip/postal code.
75+
@JsonProperty("PostalCode")
76+
@field:Valid
77+
val postalCode: kotlin.String? = null
78+
) {
79+
companion object {
80+
@JvmStatic
81+
fun builder() = Builder()
82+
}
83+
84+
class Builder(
85+
private var address1: kotlin.String? = null,
86+
private var address2: kotlin.String? = null,
87+
private var suite: kotlin.String? = null,
88+
private var city: kotlin.String? = null,
89+
private var province: kotlin.String? = null,
90+
private var country: kotlin.String? = null,
91+
private var postalCode: kotlin.String? = null
92+
) {
93+
fun address1(address1: kotlin.String?) = apply { this.address1 = address1 }
94+
95+
fun address2(address2: kotlin.String?) = apply { this.address2 = address2 }
96+
97+
fun suite(suite: kotlin.String?) = apply { this.suite = suite }
98+
99+
fun city(city: kotlin.String?) = apply { this.city = city }
100+
101+
fun province(province: kotlin.String?) = apply { this.province = province }
102+
103+
fun country(country: kotlin.String?) = apply { this.country = country }
104+
105+
fun postalCode(postalCode: kotlin.String?) = apply { this.postalCode = postalCode }
106+
107+
fun build(): ActivitiesAddress {
108+
val instance =
109+
ActivitiesAddress(
110+
address1 = address1,
111+
address2 = address2,
112+
suite = suite,
113+
city = city,
114+
province = province,
115+
country = country,
116+
postalCode = postalCode
117+
)
118+
119+
validate(instance)
120+
121+
return instance
122+
}
123+
124+
private fun validate(instance: ActivitiesAddress) {
125+
val validator =
126+
Validation
127+
.byDefaultProvider()
128+
.configure()
129+
.messageInterpolator(ParameterMessageInterpolator())
130+
.buildValidatorFactory()
131+
.validator
132+
133+
val violations = validator.validate(instance)
134+
135+
if (violations.isNotEmpty()) {
136+
throw PropertyConstraintViolationException(
137+
constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" }
138+
)
139+
}
140+
}
141+
}
142+
143+
fun toBuilder() =
144+
Builder(
145+
address1 = address1,
146+
address2 = address2,
147+
suite = suite,
148+
city = city,
149+
province = province,
150+
country = country,
151+
postalCode = postalCode
152+
)
153+
}

0 commit comments

Comments
 (0)