Skip to content

Commit c14a6ed

Browse files
tearebbgithub-actions[bot]Jeremy D. Young
authored
update specs.yaml with schema changes (#324)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: tearebb <[email protected]> Co-authored-by: Jeremy D. Young <[email protected]>
1 parent cfdb708 commit c14a6ed

Some content is hidden

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

49 files changed

+10253
-592
lines changed

.github/workflows/release-sdk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
description: |
88
SDK Stack Core branch or ref to use
99
type: string
10-
default: 'legacy'
10+
default: 'main'
1111

1212
jobs:
1313
# run-examples:

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>rapid-sdk</artifactId>
8-
<version>5.4.0</version>
8+
<version>5.4.1</version>
99
</dependency>
1010
```
1111

code/pom.xml

Lines changed: 12 additions & 12 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>rapid-sdk</artifactId>
7-
<version>5.4.0</version>
7+
<version>5.4.1</version>
88
<name>EG rapid-sdk for Java</name>
9-
<description>EG rapid-sdk v5.4.0</description>
9+
<description>EG rapid-sdk v5.4.1</description>
1010
<url>https://github.com/ExpediaGroup/test-sdk</url>
1111
<inceptionYear>2022</inceptionYear>
1212
<packaging>jar</packaging>
@@ -71,17 +71,17 @@
7171
<maven-shade-plugin.version>3.6.0</maven-shade-plugin.version>
7272
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
7373
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
74-
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
74+
<build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
7575
<ktlint-plugin.version>3.5.0</ktlint-plugin.version>
7676
<jacoco-plugin.version>0.8.13</jacoco-plugin.version>
7777
<dokka-plugin.version>2.0.0</dokka-plugin.version>
7878
<dokka-old-versions.location/> <!-- passed as a property when running dokka:dokka-->
7979
<properties.maven.plugin.version>1.2.1</properties.maven.plugin.version>
80-
<maven.licence.plugin.version>4.6</maven.licence.plugin.version>
81-
<flatten.maven.plugin.version>1.7.0</flatten.maven.plugin.version>
82-
<kotlin.version>2.1.20</kotlin.version>
83-
<kotlinx.coroutines.version>1.10.1</kotlinx.coroutines.version>
84-
<ktor.version>3.1.2</ktor.version>
80+
<maven.licence.plugin.version>5.0.0</maven.licence.plugin.version>
81+
<flatten.maven.plugin.version>1.7.1</flatten.maven.plugin.version>
82+
<kotlin.version>2.1.21</kotlin.version>
83+
<kotlinx.coroutines.version>1.10.2</kotlinx.coroutines.version>
84+
<ktor.version>3.1.3</ktor.version>
8585
<kotlin-atomic.version>0.27.0</kotlin-atomic.version>
8686
<slf4j.version>2.0.17</slf4j.version>
8787
<maven.nexus-staging.plugin.version>1.7.0</maven.nexus-staging.plugin.version>
@@ -131,14 +131,14 @@
131131
<dependency>
132132
<groupId>com.fasterxml.jackson</groupId>
133133
<artifactId>jackson-bom</artifactId>
134-
<version>2.18.3</version>
134+
<version>2.19.1</version>
135135
<type>pom</type>
136136
<scope>import</scope>
137137
</dependency>
138138
<dependency>
139139
<groupId>com.squareup.okio</groupId>
140140
<artifactId>okio-jvm</artifactId>
141-
<version>3.10.2</version>
141+
<version>3.15.0</version>
142142
</dependency>
143143
<dependency>
144144
<groupId>org.jetbrains</groupId>
@@ -153,7 +153,7 @@
153153
<dependency>
154154
<groupId>com.fasterxml.jackson.core</groupId>
155155
<artifactId>jackson-annotations</artifactId>
156-
<version>2.18.3</version>
156+
<version>2.19.1</version>
157157
</dependency>
158158
</dependencies>
159159
</dependencyManagement>
@@ -733,7 +733,7 @@
733733
<dependency>
734734
<groupId>org.apache.commons</groupId>
735735
<artifactId>commons-lang3</artifactId>
736-
<version>3.18.0</version>
736+
<version>3.17.0</version>
737737
</dependency>
738738

739739
<dependency>

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

Lines changed: 1131 additions & 18 deletions
Large diffs are not rendered by default.
Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
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.rapid.models
32+
33+
import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException
34+
import com.expediagroup.sdk.rapid.models.AdditionalHandlingCardContact
35+
import com.expediagroup.sdk.rapid.models.Amount
36+
import com.fasterxml.jackson.annotation.JsonProperty
37+
import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator
38+
import javax.validation.Valid
39+
import javax.validation.Validation
40+
import javax.validation.constraints.NotNull
41+
42+
/**
43+
* Parent object for additional VCC handling instructions, to be included as part of the payment object when virtual_card is the requested payment type for property collect inventory. If not included, existing behavior regarding handling of VCCs with property collect inventory is to be preserved. This object will be ignored for non-property collect/non-VCC transactions. total_charges_allowed represents the total ceiling of all charges allowed on the VCC, including the booking price and any allowed incidentals. The value of total_charges_allowed must be at least the booking value.
44+
* @param authorizedExpenses Indicates which types of expenses are authorized to be charged to the VCC. * `prestay_expenses_only` - Indicates that the provided VCC is for pre-stay charges only (e.g., deposits, cancellation fees, no-show fees). A physical card must be presented at check-in for any remaining balance, as well as incidentals. * `total_booking_amount` - Indicates that both pre-stay charges and the total booking amount are authorized, but no incidentals are authorized. A physical card must be presented at check-in for any incidentals. * `total_plus_incidentals` - Indicates that pre-stay, total booking, and incidental expenses are authorized. See `specified_incidental_expenses`. A physical card may be required for additional incidental expenses. * `see_authorization_form` - Indicates that a property should refer to the authorization form that will be sent either by the card provider or the authorizing company.
45+
* @param specifiedIncidentalExpenses Included list of enumerated categories to restrict the authorized incidentals. This is only utilized when `authorized_expenses` is supplied with `total_plus_incidentals` and restrictions on incidentals are desired.<br> Example: To allow any incidental expenses, specify `authorized_expenses` equal to `total_plus_incidentals` and omit `specified_incidental_expenses`.
46+
* @param totalChargesAllowed
47+
* @param isCvcRequired Indicates whether a CVC is required for the provided VCC. If this is marked required, the security_code field for the payment MUST be provided.
48+
* @param authorizingCompany Company that will issue the authorization form for the virtual credit card payment.
49+
* @param cardContact
50+
* @param maxPaymentAttemptCount Requested limit to number of payment attempts.
51+
* @param paymentAllowablePeriodStart Start date for valid range of the VCC payment instrument, in ISO 8601 format (YYYY-MM-DD).
52+
* @param paymentAllowablePeriodEnd End date for valid range of the VCC payment instrument, in ISO 8601 format (YYYY-MM-DD).
53+
*/
54+
data class AdditionalHandling(
55+
// Indicates which types of expenses are authorized to be charged to the VCC. * `prestay_expenses_only` - Indicates that the provided VCC is for pre-stay charges only (e.g., deposits, cancellation fees, no-show fees). A physical card must be presented at check-in for any remaining balance, as well as incidentals. * `total_booking_amount` - Indicates that both pre-stay charges and the total booking amount are authorized, but no incidentals are authorized. A physical card must be presented at check-in for any incidentals. * `total_plus_incidentals` - Indicates that pre-stay, total booking, and incidental expenses are authorized. See `specified_incidental_expenses`. A physical card may be required for additional incidental expenses. * `see_authorization_form` - Indicates that a property should refer to the authorization form that will be sent either by the card provider or the authorizing company.
56+
@JsonProperty("authorized_expenses")
57+
@field:NotNull
58+
val authorizedExpenses: AdditionalHandling.AuthorizedExpenses,
59+
// Included list of enumerated categories to restrict the authorized incidentals. This is only utilized when `authorized_expenses` is supplied with `total_plus_incidentals` and restrictions on incidentals are desired.<br> Example: To allow any incidental expenses, specify `authorized_expenses` equal to `total_plus_incidentals` and omit `specified_incidental_expenses`.
60+
@JsonProperty("specified_incidental_expenses")
61+
val specifiedIncidentalExpenses: kotlin.collections.List<AdditionalHandling.SpecifiedIncidentalExpenses>? = null,
62+
@JsonProperty("total_charges_allowed")
63+
@field:Valid
64+
val totalChargesAllowed: Amount? = null,
65+
// Indicates whether a CVC is required for the provided VCC. If this is marked required, the security_code field for the payment MUST be provided.
66+
@JsonProperty("is_cvc_required")
67+
@field:Valid
68+
val isCvcRequired: kotlin.Boolean? = null,
69+
// Company that will issue the authorization form for the virtual credit card payment.
70+
@JsonProperty("authorizing_company")
71+
@field:Valid
72+
val authorizingCompany: kotlin.String? = null,
73+
@JsonProperty("card_contact")
74+
@field:Valid
75+
val cardContact: AdditionalHandlingCardContact? = null,
76+
// Requested limit to number of payment attempts.
77+
@JsonProperty("max_payment_attempt_count")
78+
@field:Valid
79+
val maxPaymentAttemptCount: java.math.BigDecimal? = null,
80+
// Start date for valid range of the VCC payment instrument, in ISO 8601 format (YYYY-MM-DD).
81+
@JsonProperty("payment_allowable_period_start")
82+
@field:Valid
83+
val paymentAllowablePeriodStart: kotlin.String? = null,
84+
// End date for valid range of the VCC payment instrument, in ISO 8601 format (YYYY-MM-DD).
85+
@JsonProperty("payment_allowable_period_end")
86+
@field:Valid
87+
val paymentAllowablePeriodEnd: kotlin.String? = null
88+
) {
89+
companion object {
90+
@JvmStatic
91+
fun builder() = Builder()
92+
}
93+
94+
class Builder(
95+
private var authorizedExpenses: AdditionalHandling.AuthorizedExpenses? = null,
96+
private var specifiedIncidentalExpenses: kotlin.collections.List<AdditionalHandling.SpecifiedIncidentalExpenses>? = null,
97+
private var totalChargesAllowed: Amount? = null,
98+
private var isCvcRequired: kotlin.Boolean? = null,
99+
private var authorizingCompany: kotlin.String? = null,
100+
private var cardContact: AdditionalHandlingCardContact? = null,
101+
private var maxPaymentAttemptCount: java.math.BigDecimal? = null,
102+
private var paymentAllowablePeriodStart: kotlin.String? = null,
103+
private var paymentAllowablePeriodEnd: kotlin.String? = null
104+
) {
105+
fun authorizedExpenses(authorizedExpenses: AdditionalHandling.AuthorizedExpenses) = apply { this.authorizedExpenses = authorizedExpenses }
106+
107+
fun specifiedIncidentalExpenses(specifiedIncidentalExpenses: kotlin.collections.List<AdditionalHandling.SpecifiedIncidentalExpenses>?) =
108+
apply {
109+
this.specifiedIncidentalExpenses =
110+
specifiedIncidentalExpenses
111+
}
112+
113+
fun totalChargesAllowed(totalChargesAllowed: Amount?) = apply { this.totalChargesAllowed = totalChargesAllowed }
114+
115+
fun isCvcRequired(isCvcRequired: kotlin.Boolean?) = apply { this.isCvcRequired = isCvcRequired }
116+
117+
fun authorizingCompany(authorizingCompany: kotlin.String?) = apply { this.authorizingCompany = authorizingCompany }
118+
119+
fun cardContact(cardContact: AdditionalHandlingCardContact?) = apply { this.cardContact = cardContact }
120+
121+
fun maxPaymentAttemptCount(maxPaymentAttemptCount: java.math.BigDecimal?) = apply { this.maxPaymentAttemptCount = maxPaymentAttemptCount }
122+
123+
fun paymentAllowablePeriodStart(paymentAllowablePeriodStart: kotlin.String?) = apply { this.paymentAllowablePeriodStart = paymentAllowablePeriodStart }
124+
125+
fun paymentAllowablePeriodEnd(paymentAllowablePeriodEnd: kotlin.String?) = apply { this.paymentAllowablePeriodEnd = paymentAllowablePeriodEnd }
126+
127+
fun build(): AdditionalHandling {
128+
val instance =
129+
AdditionalHandling(
130+
authorizedExpenses = authorizedExpenses!!,
131+
specifiedIncidentalExpenses = specifiedIncidentalExpenses,
132+
totalChargesAllowed = totalChargesAllowed,
133+
isCvcRequired = isCvcRequired,
134+
authorizingCompany = authorizingCompany,
135+
cardContact = cardContact,
136+
maxPaymentAttemptCount = maxPaymentAttemptCount,
137+
paymentAllowablePeriodStart = paymentAllowablePeriodStart,
138+
paymentAllowablePeriodEnd = paymentAllowablePeriodEnd
139+
)
140+
141+
validate(instance)
142+
143+
return instance
144+
}
145+
146+
private fun validate(instance: AdditionalHandling) {
147+
val validator =
148+
Validation
149+
.byDefaultProvider()
150+
.configure()
151+
.messageInterpolator(ParameterMessageInterpolator())
152+
.buildValidatorFactory()
153+
.validator
154+
155+
val violations = validator.validate(instance)
156+
157+
if (violations.isNotEmpty()) {
158+
throw PropertyConstraintViolationException(
159+
constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" }
160+
)
161+
}
162+
}
163+
}
164+
165+
fun toBuilder() =
166+
Builder(
167+
authorizedExpenses = authorizedExpenses!!,
168+
specifiedIncidentalExpenses = specifiedIncidentalExpenses,
169+
totalChargesAllowed = totalChargesAllowed,
170+
isCvcRequired = isCvcRequired,
171+
authorizingCompany = authorizingCompany,
172+
cardContact = cardContact,
173+
maxPaymentAttemptCount = maxPaymentAttemptCount,
174+
paymentAllowablePeriodStart = paymentAllowablePeriodStart,
175+
paymentAllowablePeriodEnd = paymentAllowablePeriodEnd
176+
)
177+
178+
/**
179+
* Indicates which types of expenses are authorized to be charged to the VCC. * `prestay_expenses_only` - Indicates that the provided VCC is for pre-stay charges only (e.g., deposits, cancellation fees, no-show fees). A physical card must be presented at check-in for any remaining balance, as well as incidentals. * `total_booking_amount` - Indicates that both pre-stay charges and the total booking amount are authorized, but no incidentals are authorized. A physical card must be presented at check-in for any incidentals. * `total_plus_incidentals` - Indicates that pre-stay, total booking, and incidental expenses are authorized. See `specified_incidental_expenses`. A physical card may be required for additional incidental expenses. * `see_authorization_form` - Indicates that a property should refer to the authorization form that will be sent either by the card provider or the authorizing company.
180+
* Values: PRESTAY_EXPENSES_ONLY,TOTAL_BOOKING_AMOUNT,TOTAL_PLUS_INCIDENTALS,SEE_AUTHORIZATION_FORM
181+
*/
182+
enum class AuthorizedExpenses(val value: kotlin.String) {
183+
@JsonProperty("prestay_expenses_only")
184+
PRESTAY_EXPENSES_ONLY("prestay_expenses_only"),
185+
186+
@JsonProperty("total_booking_amount")
187+
TOTAL_BOOKING_AMOUNT("total_booking_amount"),
188+
189+
@JsonProperty("total_plus_incidentals")
190+
TOTAL_PLUS_INCIDENTALS("total_plus_incidentals"),
191+
192+
@JsonProperty("see_authorization_form")
193+
SEE_AUTHORIZATION_FORM("see_authorization_form")
194+
}
195+
196+
/**
197+
* Included list of enumerated categories to restrict the authorized incidentals. This is only utilized when `authorized_expenses` is supplied with `total_plus_incidentals` and restrictions on incidentals are desired.<br> Example: To allow any incidental expenses, specify `authorized_expenses` equal to `total_plus_incidentals` and omit `specified_incidental_expenses`.
198+
* Values: BREAKFAST,ENTERTAINMENT,INTERNET,MEETING_EXPENSES,OTHER_FOOD_BEVERAGE,PARKING,PHONE,TAXES,TRANSFER,OTHER
199+
*/
200+
enum class SpecifiedIncidentalExpenses(val value: kotlin.String) {
201+
@JsonProperty("breakfast")
202+
BREAKFAST("breakfast"),
203+
204+
@JsonProperty("entertainment")
205+
ENTERTAINMENT("entertainment"),
206+
207+
@JsonProperty("internet")
208+
INTERNET("internet"),
209+
210+
@JsonProperty("meeting_expenses")
211+
MEETING_EXPENSES("meeting_expenses"),
212+
213+
@JsonProperty("other_food_beverage")
214+
OTHER_FOOD_BEVERAGE("other_food_beverage"),
215+
216+
@JsonProperty("parking")
217+
PARKING("parking"),
218+
219+
@JsonProperty("phone")
220+
PHONE("phone"),
221+
222+
@JsonProperty("taxes")
223+
TAXES("taxes"),
224+
225+
@JsonProperty("transfer")
226+
TRANSFER("transfer"),
227+
228+
@JsonProperty("other")
229+
OTHER("other")
230+
}
231+
}

0 commit comments

Comments
 (0)