Skip to content

Commit 20ee8c9

Browse files
authored
chore: update code to v4.1.3 (#94)
1 parent c32e218 commit 20ee8c9

File tree

54 files changed

+52
-86
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+52
-86
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.2</version>
8+
<version>4.1.3</version>
99
<name>EG Rapid SDK for Java</name>
10-
<description>EG Rapid SDK v4.1.2</description>
10+
<description>EG Rapid SDK v4.1.3</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/core/model/Operation.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class Operation<T>(
2020
val method: String,
2121
val operationId: String,
2222
val requestBody: T?,
23-
val params: OperationParams
23+
val params: OperationParams?
2424
) {
2525
var transactionId: TransactionId = TransactionId()
2626
private set

code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/ExpediaGroupLogger.kt

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,23 @@ import com.expediagroup.sdk.core.constant.LoggingMessage.LOGGING_PREFIX
2121
import org.slf4j.Logger
2222

2323
internal class ExpediaGroupLogger(private val logger: Logger, private val client: Client? = null) : Logger by logger {
24-
override fun info(msg: String) = logger.info(decorate(msg))
24+
override fun info(msg: String) {
25+
if (logger.isInfoEnabled) {
26+
logger.info(decorate(msg))
27+
}
28+
}
2529

26-
override fun warn(msg: String) = logger.warn(decorate(msg))
30+
override fun warn(msg: String) {
31+
if (logger.isWarnEnabled) {
32+
logger.warn(decorate(msg))
33+
}
34+
}
2735

28-
override fun debug(msg: String) = logger.debug(decorate(msg))
36+
override fun debug(msg: String) {
37+
if (logger.isDebugEnabled) {
38+
logger.debug(decorate(msg))
39+
}
40+
}
2941

3042
private fun decorate(msg: String): String = "$LOGGING_PREFIX ${mask(msg, getMaskedBodyFields())}"
3143

code/src/main/kotlin/com/expediagroup/sdk/core/plugin/logging/LoggingConfiguration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal data class LoggingConfiguration(
2626
override val httpClientConfiguration: HttpClientConfig<out HttpClientEngineConfig>,
2727
val maskedLoggingHeaders: Set<String>,
2828
val maskedLoggingBodyFields: Set<String>,
29-
val level: LogLevel = LogLevel.ALL,
29+
val level: LogLevel = LogLevel.HEADERS,
3030
val getLogger: (client: Client) -> Logger = createCustomLogger
3131
) : KtorPluginConfiguration(httpClientConfiguration) {
3232
companion object {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ class RapidClient private constructor(clientConfiguration: RapidClientConfigurat
7272
method = HttpMethod.parse(operation.method)
7373
url(operation.url)
7474

75-
operation.params.getHeaders()?.forEach { (key, value) ->
75+
operation.params?.getHeaders()?.forEach { (key, value) ->
7676
headers.append(key, value)
7777
}
7878

79-
operation.params.getQueryParams()?.forEach { (key, value) ->
79+
operation.params?.getQueryParams()?.forEach { (key, value) ->
8080
url.parameters.appendAll(key, value)
8181
}
8282

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import com.expediagroup.sdk.rapid.models.ChangeRoomDetailsRequest
2323
* Change details of a room.
2424
* @property requestBody [ChangeRoomDetailsRequest]
2525
* @property params [ChangeRoomDetailsOperationParams]
26-
2726
*/
2827
class ChangeRoomDetailsOperation(
2928
requestBody: ChangeRoomDetailsRequest?,

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ package com.expediagroup.sdk.rapid.operations
1919
import com.expediagroup.sdk.core.model.OperationParams
2020

2121
/**
22-
* @property customerIp IP address of the customer, as captured by your integration.<br> Ensure your integration passes the customer's IP, not your own. This value helps determine their location and assign the correct payment gateway.<br> Also used for fraud recovery and other important analytics.
2322
* @property itineraryId This parameter is used only to prefix the token value - no ID value is used.<br>
2423
* @property roomId Room ID of a property.<br>
25-
* @property token Provided as part of the link object and used to maintain state across calls. This simplifies each subsequent call by limiting the amount of information required at each step and reduces the potential for errors. Token values cannot be viewed or changed.
26-
* @property changeRoomDetailsRequest The request body is required, but only the fields that are being changed need to be passed in. Fields that are not being changed should not be included in the request body.
24+
* @property customerIp IP address of the customer, as captured by your integration.<br> Ensure your integration passes the customer's IP, not your own. This value helps determine their location and assign the correct payment gateway.<br> Also used for fraud recovery and other important analytics.
2725
* @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.
2826
* @property test The change call has a test header that can be used to return set responses with the following keywords:<br> * `standard` - Requires valid test booking. * `service_unavailable` * `unknown_internal_error`
27+
* @property token Provided as part of the link object and used to maintain state across calls. This simplifies each subsequent call by limiting the amount of information required at each step and reduces the potential for errors. Token values cannot be viewed or changed.
2928
*/
3029
data class ChangeRoomDetailsOperationParams(
3130
val itineraryId: kotlin.String,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import com.expediagroup.sdk.rapid.models.CommitChangeRoomRequestBody
2323
* Commit a change of itinerary that may require additional payment or refund.
2424
* @property requestBody [CommitChangeRoomRequestBody]
2525
* @property params [CommitChangeOperationParams]
26-
2726
*/
2827
class CommitChangeOperation(
2928
requestBody: CommitChangeRoomRequestBody?,

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ package com.expediagroup.sdk.rapid.operations
1919
import com.expediagroup.sdk.core.model.OperationParams
2020

2121
/**
22-
* @property customerIp IP address of the customer, as captured by your integration. Send IPV4 addresses only.<br> Ensure your integration passes the customer's IP, not your own. This value helps determine their location and assign the correct payment gateway.<br> Also used for fraud recovery and other important analytics.
2322
* @property itineraryId This parameter is used only to prefix the token value - no ID value is used.<br>
2423
* @property roomId Room ID of a property.<br>
25-
* @property token Provided as part of the link object and used to maintain state across calls. This simplifies each subsequent call by limiting the amount of information required at each step and reduces the potential for errors. Token values cannot be viewed or changed.
24+
* @property customerIp IP address of the customer, as captured by your integration. Send IPV4 addresses only.<br> Ensure your integration passes the customer's IP, not your own. This value helps determine their location and assign the correct payment gateway.<br> Also used for fraud recovery and other important analytics.
2625
* @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.
2726
* @property test The change call has a test header that can be used to return set responses with the following keywords:<br> * `standard` - Requires valid test booking. * `service_unavailable` * `unknown_internal_error`
28-
* @property commitChangeRoomRequestBody The request body is required if additional payment is necessary. The body can optionally contain the `change_reference_id`.
27+
* @property token Provided as part of the link object and used to maintain state across calls. This simplifies each subsequent call by limiting the amount of information required at each step and reduces the potential for errors. Token values cannot be viewed or changed.
2928
*/
3029
data class CommitChangeOperationParams(
3130
val itineraryId: kotlin.String,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import com.expediagroup.sdk.core.model.Operation
2222
/**
2323
* Cancel Held Booking
2424
* @property params [DeleteHeldBookingOperationParams]
25-
2625
*/
2726
class DeleteHeldBookingOperation(
2827
params: DeleteHeldBookingOperationParams

0 commit comments

Comments
 (0)