Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Publish v1.1.0-SNAPSHOT #44

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/workflows/release-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,8 @@ on:
default: ''

jobs:
run-examples:
strategy:
matrix:
jdk: [ 8, 11, 17, 21 ]
uses: ./.github/workflows/run-examples.yaml
secrets: inherit
with:
branch: ${{ inputs.branch }}
jdk: ${{ matrix.jdk }}

release-sdk:
uses: ExpediaGroup/expediagroup-java-sdk/.github/workflows/selfserve-release-sdk.yaml@v20241126
needs: [ run-examples ]
secrets: inherit
with:
branch: ${{ inputs.branch }}
2 changes: 1 addition & 1 deletion code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<dependency>
<groupId>com.expediagroup</groupId>
<artifactId>xap-sdk</artifactId>
<version>1.0.0</version>
<version>1.1.0-SNAPSHOT</version>
</dependency>
```

Expand Down
18 changes: 9 additions & 9 deletions code/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.expediagroup</groupId>
<artifactId>xap-sdk</artifactId>
<version>1.0.0</version>
<version>1.1.0-SNAPSHOT</version>
<name>EG xap-sdk for Java</name>
<description>EG xap-sdk v1.0.0</description>
<description>EG xap-sdk v1.1.0-SNAPSHOT</description>
<url>https://github.com/ExpediaGroup/test-sdk</url>
<inceptionYear>2022</inceptionYear>
<packaging>jar</packaging>
Expand Down Expand Up @@ -82,7 +82,7 @@
<kotlin.version>2.0.21</kotlin.version>
<kotlinx.coroutines.version>1.9.0</kotlinx.coroutines.version>
<ktor.version>2.3.13</ktor.version>
<kotlin-atomic.version>0.26.0</kotlin-atomic.version>
<kotlin-atomic.version>0.26.1</kotlin-atomic.version>
<slf4j.version>2.0.16</slf4j.version>
<maven.nexus-staging.plugin.version>1.7.0</maven.nexus-staging.plugin.version>
<maven.gpg.plugin.version>3.2.7</maven.gpg.plugin.version>
Expand Down Expand Up @@ -131,7 +131,7 @@
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>2.18.1</version>
<version>2.18.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -153,7 +153,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.18.1</version>
<version>2.18.2</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down Expand Up @@ -732,25 +732,25 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
<version>3.17.0</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.12.0</version>
<version>1.13.0</version>
</dependency>

<dependency>
<groupId>com.ebay.ejmask</groupId>
<artifactId>ejmask-api</artifactId>
<version>1.0.3</version>
<version>1.3.0</version>
</dependency>

<dependency>
<groupId>com.ebay.ejmask</groupId>
<artifactId>ejmask-extensions</artifactId>
<version>1.0.3</version>
<version>1.3.0</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ abstract class BaseRapidClient(
private val engine: HttpClientEngine =
_configurationProvider.okHttpClient?.let {
OkHttp.create {
preconfigured = it
config {
preconfigured = it
dispatcher(it.dispatcher)
}
}
} ?: httpClientEngine

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ abstract class BaseXapClient(
private val engine: HttpClientEngine =
_configurationProvider.okHttpClient?.let {
OkHttp.create {
preconfigured = it
config {
preconfigured = it
dispatcher(it.dispatcher)
}
}
} ?: httpClientEngine

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ import com.expediagroup.sdk.xap.models.*
import com.expediagroup.sdk.xap.models.exception.ErrorObjectMapper
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiAPIGatewayErrorException
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiAPIMErrorException
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiActivitiesErrorsException
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiCarsErrorsException
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiErrorsException
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiLodgingErrorsException
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiPresignedUrlResponseException
import com.expediagroup.sdk.xap.models.exception.ExpediaGroupApiSdpAPIMErrorException
import com.expediagroup.sdk.xap.operations.GetActivityDetailsOperation
import com.expediagroup.sdk.xap.operations.GetActivityListingsOperation
import com.expediagroup.sdk.xap.operations.GetCarDetailsOperation
import com.expediagroup.sdk.xap.operations.GetCarsListingsOperation
import com.expediagroup.sdk.xap.operations.GetFeedDownloadUrlOperation
Expand Down Expand Up @@ -154,6 +157,50 @@ class XapClient private constructor(clientConfiguration: XapClientConfiguration)
}
}

/**
*
* The Activity Details API provides detailed information about one selected activity.
* @param operation [GetActivityDetailsOperation]
* @throws ExpediaGroupApiActivitiesErrorsException
* @throws ExpediaGroupApiAPIMErrorException
* @throws ExpediaGroupApiException
* @return a [Response] object with a body of type ActivityDetailsResponse
*/
fun execute(operation: GetActivityDetailsOperation): Response<ActivityDetailsResponse> = execute<Nothing, ActivityDetailsResponse>(operation)

/**
*
* The Activity Details API provides detailed information about one selected activity.
* @param operation [GetActivityDetailsOperation]
* @throws ExpediaGroupApiActivitiesErrorsException
* @throws ExpediaGroupApiAPIMErrorException
* @throws ExpediaGroupApiException
* @return a [CompletableFuture<Response>] object with a body of type ActivityDetailsResponse
*/
fun executeAsync(operation: GetActivityDetailsOperation): CompletableFuture<Response<ActivityDetailsResponse>> = executeAsync<Nothing, ActivityDetailsResponse>(operation)

/**
*
* The Activities Search API allows partners to search for Expedia Activity inventory.
* @param operation [GetActivityListingsOperation]
* @throws ExpediaGroupApiActivitiesErrorsException
* @throws ExpediaGroupApiAPIMErrorException
* @throws ExpediaGroupApiException
* @return a [Response] object with a body of type ActivityListingsResponse
*/
fun execute(operation: GetActivityListingsOperation): Response<ActivityListingsResponse> = execute<Nothing, ActivityListingsResponse>(operation)

/**
*
* The Activities Search API allows partners to search for Expedia Activity inventory.
* @param operation [GetActivityListingsOperation]
* @throws ExpediaGroupApiActivitiesErrorsException
* @throws ExpediaGroupApiAPIMErrorException
* @throws ExpediaGroupApiException
* @return a [CompletableFuture<Response>] object with a body of type ActivityListingsResponse
*/
fun executeAsync(operation: GetActivityListingsOperation): CompletableFuture<Response<ActivityListingsResponse>> = executeAsync<Nothing, ActivityListingsResponse>(operation)

/**
* Get Extended information with a single car offer
* Extended information about the rates, charges, fees, and other terms associated with a single car offer.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
/*
* Copyright (C) 2022 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
*
* Please note:
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit this file manually.
*
*/

@file:Suppress(
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
)

package com.expediagroup.sdk.xap.models

import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException
import com.fasterxml.jackson.annotation.JsonProperty
import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator
import javax.validation.Valid
import javax.validation.Validation

/**
* Address information
* @param address1 Street Number, Street Name, or PO Box.
* @param address2 Apartment, Floor, Suite, Bldg
* @param suite Suite/apartment number
* @param city The city
* @param province The state or province.
* @param country 3-letter code for the country.
* @param postalCode Zip/postal code.
*/
data class ActivitiesAddress(
// Street Number, Street Name, or PO Box.
@JsonProperty("Address1")
@field:Valid
val address1: kotlin.String? = null,
// Apartment, Floor, Suite, Bldg
@JsonProperty("Address2")
@field:Valid
val address2: kotlin.String? = null,
// Suite/apartment number
@JsonProperty("Suite")
@field:Valid
val suite: kotlin.String? = null,
// The city
@JsonProperty("City")
@field:Valid
val city: kotlin.String? = null,
// The state or province.
@JsonProperty("Province")
@field:Valid
val province: kotlin.String? = null,
// 3-letter code for the country.
@JsonProperty("Country")
@field:Valid
val country: kotlin.String? = null,
// Zip/postal code.
@JsonProperty("PostalCode")
@field:Valid
val postalCode: kotlin.String? = null
) {
companion object {
@JvmStatic
fun builder() = Builder()
}

class Builder(
private var address1: kotlin.String? = null,
private var address2: kotlin.String? = null,
private var suite: kotlin.String? = null,
private var city: kotlin.String? = null,
private var province: kotlin.String? = null,
private var country: kotlin.String? = null,
private var postalCode: kotlin.String? = null
) {
fun address1(address1: kotlin.String?) = apply { this.address1 = address1 }

fun address2(address2: kotlin.String?) = apply { this.address2 = address2 }

fun suite(suite: kotlin.String?) = apply { this.suite = suite }

fun city(city: kotlin.String?) = apply { this.city = city }

fun province(province: kotlin.String?) = apply { this.province = province }

fun country(country: kotlin.String?) = apply { this.country = country }

fun postalCode(postalCode: kotlin.String?) = apply { this.postalCode = postalCode }

fun build(): ActivitiesAddress {
val instance =
ActivitiesAddress(
address1 = address1,
address2 = address2,
suite = suite,
city = city,
province = province,
country = country,
postalCode = postalCode
)

validate(instance)

return instance
}

private fun validate(instance: ActivitiesAddress) {
val validator =
Validation
.byDefaultProvider()
.configure()
.messageInterpolator(ParameterMessageInterpolator())
.buildValidatorFactory()
.validator

val violations = validator.validate(instance)

if (violations.isNotEmpty()) {
throw PropertyConstraintViolationException(
constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" }
)
}
}
}

fun toBuilder() =
Builder(
address1 = address1,
address2 = address2,
suite = suite,
city = city,
province = province,
country = country,
postalCode = postalCode
)
}
Loading
Loading