Skip to content

Commit

Permalink
feat: update code to v.4.1.1 (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
anssari1 committed May 29, 2024
1 parent 1b9b757 commit d9a8c2a
Show file tree
Hide file tree
Showing 53 changed files with 1,239 additions and 22 deletions.
233 changes: 211 additions & 22 deletions code/src/main/kotlin/com/expediagroup/sdk/rapid/client/rapidClient.kt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ package com.expediagroup.sdk.rapid.operations
import com.expediagroup.sdk.core.model.Operation
import com.expediagroup.sdk.rapid.models.ChangeRoomDetailsRequest

/**
* Change details of a room.
* @property requestBody [ChangeRoomDetailsRequest]
* @property params [ChangeRoomDetailsOperationParams]
*/
class ChangeRoomDetailsOperation(
requestBody: ChangeRoomDetailsRequest?,
params: ChangeRoomDetailsOperationParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ package com.expediagroup.sdk.rapid.operations

import com.expediagroup.sdk.core.model.OperationParams

/**
* @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.
* @property itineraryId This parameter is used only to prefix the token value - no ID value is used.<br>
* @property roomId Room ID of a property.<br>
* @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.
* @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.
* @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.
* @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`
*/
data class ChangeRoomDetailsOperationParams(
val itineraryId: kotlin.String,
val roomId: kotlin.String,
Expand All @@ -39,16 +48,34 @@ data class ChangeRoomDetailsOperationParams(
private var test: kotlin.String? = null,
private var token: kotlin.String? = null
) {
/**
* @param itineraryId This parameter is used only to prefix the token value - no ID value is used.<br>
*/
fun itineraryId(itineraryId: kotlin.String) = apply { this.itineraryId = itineraryId }

/**
* @param roomId Room ID of a property.<br>
*/
fun roomId(roomId: kotlin.String) = apply { this.roomId = roomId }

/**
* @param 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.
*/
fun customerIp(customerIp: kotlin.String) = apply { this.customerIp = customerIp }

/**
* @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.
*/
fun customerSessionId(customerSessionId: kotlin.String) = apply { this.customerSessionId = customerSessionId }

/**
* @param 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`
*/
fun test(test: kotlin.String) = apply { this.test = test }

/**
* @param 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.
*/
fun token(token: kotlin.String) = apply { this.token = token }

fun build(): ChangeRoomDetailsOperationParams {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ package com.expediagroup.sdk.rapid.operations
import com.expediagroup.sdk.core.model.Operation
import com.expediagroup.sdk.rapid.models.CommitChangeRoomRequestBody

/**
* Commit a change of itinerary that may require additional payment or refund.
* @property requestBody [CommitChangeRoomRequestBody]
* @property params [CommitChangeOperationParams]
*/
class CommitChangeOperation(
requestBody: CommitChangeRoomRequestBody?,
params: CommitChangeOperationParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ package com.expediagroup.sdk.rapid.operations

import com.expediagroup.sdk.core.model.OperationParams

/**
* @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.
* @property itineraryId This parameter is used only to prefix the token value - no ID value is used.<br>
* @property roomId Room ID of a property.<br>
* @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.
* @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.
* @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`
* @property commitChangeRoomRequestBody The request body is required if additional payment is necessary. The body can optionally contain the `change_reference_id`.
*/
data class CommitChangeOperationParams(
val itineraryId: kotlin.String,
val roomId: kotlin.String,
Expand All @@ -39,16 +48,34 @@ data class CommitChangeOperationParams(
private var test: kotlin.String? = null,
private var token: kotlin.String? = null
) {
/**
* @param itineraryId This parameter is used only to prefix the token value - no ID value is used.<br>
*/
fun itineraryId(itineraryId: kotlin.String) = apply { this.itineraryId = itineraryId }

/**
* @param roomId Room ID of a property.<br>
*/
fun roomId(roomId: kotlin.String) = apply { this.roomId = roomId }

/**
* @param 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.
*/
fun customerIp(customerIp: kotlin.String) = apply { this.customerIp = customerIp }

/**
* @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.
*/
fun customerSessionId(customerSessionId: kotlin.String) = apply { this.customerSessionId = customerSessionId }

/**
* @param 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`
*/
fun test(test: kotlin.String) = apply { this.test = test }

/**
* @param 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.
*/
fun token(token: kotlin.String) = apply { this.token = token }

fun build(): CommitChangeOperationParams {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ package com.expediagroup.sdk.rapid.operations
import com.expediagroup.sdk.core.model.Nothing
import com.expediagroup.sdk.core.model.Operation

/**
* Cancel Held Booking
* @property params [DeleteHeldBookingOperationParams]
*/
class DeleteHeldBookingOperation(
params: DeleteHeldBookingOperationParams
) : Operation<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ package com.expediagroup.sdk.rapid.operations

import com.expediagroup.sdk.core.model.OperationParams

/**
* @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.
* @property itineraryId This parameter is used only to prefix the token value - no ID value is used.<br>
* @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.
* @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.
* @property test The cancel call has a test header that can be used to return set responses with the following keywords:<br> * `standard` - Requires valid test held booking. * `service_unavailable` * `internal_server_error` * `post_stay_cancel`
*/
data class DeleteHeldBookingOperationParams(
val itineraryId: kotlin.String,
val customerIp: kotlin.String,
Expand All @@ -37,14 +44,29 @@ data class DeleteHeldBookingOperationParams(
private var test: kotlin.String? = null,
private var token: kotlin.String? = null
) {
/**
* @param itineraryId This parameter is used only to prefix the token value - no ID value is used.<br>
*/
fun itineraryId(itineraryId: kotlin.String) = apply { this.itineraryId = itineraryId }

/**
* @param 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.
*/
fun customerIp(customerIp: kotlin.String) = apply { this.customerIp = customerIp }

/**
* @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.
*/
fun customerSessionId(customerSessionId: kotlin.String) = apply { this.customerSessionId = customerSessionId }

/**
* @param test The cancel call has a test header that can be used to return set responses with the following keywords:<br> * `standard` - Requires valid test held booking. * `service_unavailable` * `internal_server_error` * `post_stay_cancel`
*/
fun test(test: kotlin.String) = apply { this.test = test }

/**
* @param 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.
*/
fun token(token: kotlin.String) = apply { this.token = token }

fun build(): DeleteHeldBookingOperationParams {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ package com.expediagroup.sdk.rapid.operations
import com.expediagroup.sdk.core.model.Nothing
import com.expediagroup.sdk.core.model.Operation

/**
* Cancel a room.
* @property params [DeleteRoomOperationParams]
*/
class DeleteRoomOperation(
params: DeleteRoomOperationParams
) : Operation<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ package com.expediagroup.sdk.rapid.operations

import com.expediagroup.sdk.core.model.OperationParams

/**
* @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.
* @property itineraryId This parameter is used only to prefix the token value - no ID value is used.<br>
* @property roomId Room ID of a property.<br>
* @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.
* @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.
* @property test The cancel 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` * `post_stay_cancel`
*/
data class DeleteRoomOperationParams(
val itineraryId: kotlin.String,
val roomId: kotlin.String,
Expand All @@ -39,16 +47,34 @@ data class DeleteRoomOperationParams(
private var test: kotlin.String? = null,
private var token: kotlin.String? = null
) {
/**
* @param itineraryId This parameter is used only to prefix the token value - no ID value is used.<br>
*/
fun itineraryId(itineraryId: kotlin.String) = apply { this.itineraryId = itineraryId }

/**
* @param roomId Room ID of a property.<br>
*/
fun roomId(roomId: kotlin.String) = apply { this.roomId = roomId }

/**
* @param 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.
*/
fun customerIp(customerIp: kotlin.String) = apply { this.customerIp = customerIp }

/**
* @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.
*/
fun customerSessionId(customerSessionId: kotlin.String) = apply { this.customerSessionId = customerSessionId }

/**
* @param test The cancel 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` * `post_stay_cancel`
*/
fun test(test: kotlin.String) = apply { this.test = test }

/**
* @param 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.
*/
fun token(token: kotlin.String) = apply { this.token = token }

fun build(): DeleteRoomOperationParams {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ package com.expediagroup.sdk.rapid.operations
import com.expediagroup.sdk.core.model.Nothing
import com.expediagroup.sdk.core.model.Operation

/**
* Get additional property room rates and availability
* @property params [GetAdditionalAvailabilityOperationParams]
*/
class GetAdditionalAvailabilityOperation(
params: GetAdditionalAvailabilityOperationParams
) : Operation<
Expand Down
Loading

0 comments on commit d9a8c2a

Please sign in to comment.